Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: HTTP status 403 #9457

Closed
thomasbnt opened this issue May 17, 2024 · 7 comments
Closed

Error: HTTP status 403 #9457

thomasbnt opened this issue May 17, 2024 · 7 comments

Comments

@thomasbnt
Copy link

thomasbnt commented May 17, 2024

Bug Description

Hello, when I run a workflow with Spotify oauth2, I've got an error.
so I went to the connection parameters and checked the client ID and secret client. All's well, I've validated the app in my personal account.

However, during the callback I get this as an error.

"\n<html><head>\n<meta http-equiv=\"content-type\" content=\"text/html;charset=utf-8\">\n<title>403 Forbidden</title>\n</head>\n<body text=#000000 bgcolor=#ffffff>\n<h1>Error: Forbidden</h1>\n<h2>Your client does not have permission to get URL <code>/api/token</code> from this server.</h2>\n<h2></h2>\n</body></html>\n"

image

My env :

N8N_PROXY_HOPS: 1,
N8N_BASIC_AUTH_ACTIVE: true,
N8N_HOST: "[REDACTED]",
N8N_PROTOCOL: "https",
N8N_DEFAULT_LOCALE: "fr-FR",
N8N_HIRING_BANNER_ENABLED: false,
EXECUTIONS_DATA_PRUNE: true,
EXECUTIONS_DATA_PRUNE_MAX_COUNT: 5000,
N8N_LOG_FILE_COUNT_MAX: 50,
WEBHOOK_URL: "https://[REDACTED]/",
VUE_APP_URL_BASE_API: "https://[REDACTED]/"

Incidentally, I'm using pm2, so to start the server, I hit pm2 start n8n. But my conf env doesn't go through, having my ecosystem.config.js in the same folder. So I manually exported my values as export N8N_PROXY_HOPS=1 and ran pm2 restart n8n --update-env again.

I thought it was an error due to my node.js upgrade from v18 to v20. And so after some research, came across this
#9172 as I had the same error. But even if I set the variable, it doesn't work anymore.

To Reproduce

  1. A workflow with spotify oauth2 connection
  2. Check the workflow
  3. See the workflow not working

Problem in node ‘Get playlists‘
Forbidden - perhaps check your credentials?

  1. Edit the spotify connection
  2. Click to "reconnect"
  3. See the error HTTP status 403

Expected behavior

To be able to have a connection that simply works.

Operating System

Debian 11

n8n Version

1.39.1

Node.js Version

20.13.0

Database

SQLite (default)

Execution mode

main (default)

@Joffcom
Copy link
Member

Joffcom commented May 17, 2024

Hey @thomasbnt

The Spotify node appears to be working ok in my instance, the error looks like Spotify is saying the client doesn't have permission.

I would check the app again in Spotify, depending on where you are running n8n from it could be that they have banned the IP for some reason so reaching out to Spotify support could be worth doing.

I would also recommend using Docker over pm2 as I have seen a lot of users have issues with pm2 that are unrelated to n8n and more around how pm2 works and how it should be configured.

@thomasbnt
Copy link
Author

Hey @thomasbnt

The Spotify node appears to be working ok in my instance, the error looks like Spotify is saying the client doesn't have permission.

I would check the app again in Spotify, depending on where you are running n8n from it could be that they have banned the IP for some reason so reaching out to Spotify support could be worth doing.

I would also recommend using Docker over pm2 as I have seen a lot of users have issues with pm2 that are unrelated to n8n and more around how pm2 works and how it should be configured.

Arg... I contact Spotify then. I tested with another fresh App, same issue. I never really wanted to use Docker for one app, but maybe I'll have to!

@thomasbnt
Copy link
Author

@Joffcom I've got others informations, maybe Spotify have a problem. Two hours ago, I've got an 503 error on the Spotify dashboard for some minuts.

This is the output information when I test the connection :

image

@Joffcom
Copy link
Member

Joffcom commented May 17, 2024

Hey @thomasbnt,

Oddly my workflow is still running but it is very possible that Spotify have an issue on their end.

I sometimes find that their api doesn't reply at all which bugs me. Let's give it 24 hours and see if that changes anything or if they update a status page.

@Joffcom
Copy link
Member

Joffcom commented May 18, 2024

Morning @thomasbnt

Bit earlier than planned but is it connecting today?

I did find this post on the Spotify forum: https://community.spotify.com/t5/Android/Your-client-does-not-have-permission-to-get-URL/td-p/5349887 that also suggests it could be an ip restriction, if you are using a shared hosting provider it could be that or maybe a VPS IP that has been previously banned.

@thomasbnt
Copy link
Author

Hello @Joffcom !

I haven't tried again since yesterday. I had to check if the IP was banned, but I didn't do anything else. It was working before yesterday, I've changed the workflows that use Spotify to make fewer requests. I'll have to ask support if I've been banned.

@thomasbnt
Copy link
Author

Morning @thomasbnt

Bit earlier than planned but is it connecting today?

I did find this post on the Spotify forum: community.spotify.com/t5/Android/Your-client-does-not-have-permission-to-get-URL/td-p/5349887 that also suggests it could be an ip restriction, if you are using a shared hosting provider it could be that or maybe a VPS IP that has been previously banned.

Hello @Joffcom, It still doesn't work. I'm going to cut everything and switch to Docker. But I'm pretty sure that's not what's causing it. I have a big doubt about the connection, since I'm getting a 403 error. Or simply how Node works. I went from v18 to v20, maybe there was a security change or something, or just a variable omission, but which one I don't know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants