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

Parse error when using the get refresh token #64

Open
HeikkiHietala opened this issue Feb 7, 2024 · 10 comments
Open

Parse error when using the get refresh token #64

HeikkiHietala opened this issue Feb 7, 2024 · 10 comments

Comments

@HeikkiHietala
Copy link

HeikkiHietala commented Feb 7, 2024

Hi,

I had this running smooth for a couple years already, but now I had a persistent connection error. I plugged the ESP32 to my computer and tried to run the get refresh token routine, but I get this:

13:43:16.423 -> MDNS responder started
13:43:16.423 -> HTTP server started
13:43:22.755 -> grant_type=authorization_code&code=AQBrOGhJAHCDyNpYZ[... lots more,,,]
13:43:22.755 -> accounts.spotify.com
13:43:25.841 -> Connection failed
13:43:25.841 -> status Code-1
13:43:27.838 -> Could not parse errorgrant_type=authorization_code&code=AQBrOGhJAHCDyNpYZ-[... lots more,,,]
13:43:48.826 -> accounts.spotify.com
13:43:48.921 -> Connection failed
13:43:48.921 -> status Code-1
13:43:50.898 -> Could not parse error

I created another app in the Spotify dashboard, and I got to see Spotify allowing me to verify that app, but then the ESP error occurred again.

Could you please help me out on this one?

Many thanks in advance!

@ZaleAnderson
Copy link

Redownload the library, it has been updated. It fixed it sorta for me

@LinuxlasGNUleaf
Copy link
Contributor

LinuxlasGNUleaf commented Feb 10, 2024

I'm having the same issue (I think), I can neither complete the workflow for getting a refresh token, nor can I use an exisiting one. I get a "Connection failed- status Code-1" message as well with DEBUG on. It really seems to be the POST request here that's causing the error. Did Spotify make changes to their API recently? This worked a week ago. The new certs didn't fix the issue either.

@ZaleAnderson
Copy link

ZaleAnderson commented Feb 10, 2024 via email

@LinuxlasGNUleaf
Copy link
Contributor

@ZaleAnderson thanks for your willingness to help, but I checked your issue out beforehand and it sadly did not fix it for me. I increased some other buffer sizes as well just in case, but nothing helped. And the error is different to yours as well, it seems for me there's an issue with connecting with the Spotify API at all, not with the access token. I of course tried different WiFis and hotspots, but nothing helped.

@noelPellkvist
Copy link

Same issue for me, have tried updating the library and changing this line:
#define SPOTIFY_ACCESS_TOKEN_LENGTH 600

Im using a NodeMCU 12S

@LinuxlasGNUleaf
Copy link
Contributor

Has anyone been able to get this to work? I still have the exact same issue. I'm using an D1 mini PRO (ESP8266)

@HeikkiHietala
Copy link
Author

I asked Chatgpt to fix this and reported it on my blog:

https://www.sabulo.com/sb/esp32-development-board/revising-the-esp32-spotify-display-with-chatgpt/

@LinuxlasGNUleaf
Copy link
Contributor

Interesting, I managed to figure out what my problem with the library was, see #68
Turns out the SSL fingerprints are outdated. You might try that as well, would be interesting to know if this fixes your issue as well, even though you seem to have found an alternative for your project :)

@HeikkiHietala
Copy link
Author

Well done you! Just now i don't have the time to test the solution, but I probably will try it later.

@fladmas
Copy link

fladmas commented Jun 30, 2024

@LinuxlasGNUleaf Worked for me. Thanks.

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

5 participants