zmb3 / spotify

A Go wrapper for the Spotify Web API
Apache License 2.0
1.34k stars 284 forks source link

OAuth2: cannot fetch token #153

Closed FlorianLoch closed 2 years ago

FlorianLoch commented 3 years ago

In the last days fetching active devices results in some oauth2 error - something that never happened before. I upgraded my dependencies, issue still exists.

Is anyone else seeing similar errors recently?

 error="Get \"https://api.spotify.com/v1/me/player/devices\": oauth2: cannot fetch token: 503 Service Unavailable\nResponse: upstream connect error or disconnect/reset before headers. reset reason: connection termination"
strideynet commented 3 years ago

Hmm, that error would definitely suggest an error at spotifies end. Is this an "all the time" thing or are you only seeing this now and again?

FlorianLoch commented 3 years ago

Yep, looks like an issue with their systems... It's sporadic - I'd say perhaps 10% or so of my requests are terminated with this. So far I only noticed it for this specific endpoint - but I would need to check my logs properly to be sure.

Saw it the first time a few days ago and hoped it would be some outtage and go away soon - but seems like it does not. Would not be the first strange issue I am experiencing with Spotify's Web API...

I also made the request from different machines, so different IP addresses. Only the credentials are the same.

strideynet commented 3 years ago

Interesting, there's been some interesting reports of issues with spotify the past few days. Will re-review this in a week.

strideynet commented 3 years ago

@FlorianLoch Are you still seeing this issue?

FlorianLoch commented 3 years ago

I did not work on that specific project the last days but will check tomorrow whether I still get these responses or whether they are gone again ;)

FlorianLoch commented 3 years ago

Sorry for the late reply. I checked today, I still see these errors. I do not have enough data on this to tell something about the frequency the error occurs, but my gut feeling is that it did not change....

kimtore commented 3 years ago

I am experiencing this error today with oauth2 token exchange, and also token refresh.

brodin commented 3 years ago

I am experiencing this error today with oauth2 token exchange, and also token refresh.

Same here. Did Spotify just update something in their auth? 🤔

strideynet commented 3 years ago

I'll take a look at this tonight and see if I can reproduce with oauth2 token exchange.

palashjain95 commented 3 years ago

Same here, getting 503 service unavailable

strideynet commented 3 years ago

@palashjain95 Could 503s be related to this https://community.spotify.com/t5/Spotify-for-Developers/Constant-503-errors-from-API/td-p/5203816 ?

strideynet commented 3 years ago

@ambientsound / @brodin are you still experiencing this? I've not been able to reproduce with examples/authenticate/authcode or examples/player.

FlorianLoch commented 3 years ago

Had issues with my app yesterday, seems to fine again today ;)

palashjain95 commented 3 years ago

@palashjain95 Could 503s be related to this https://community.spotify.com/t5/Spotify-for-Developers/Constant-503-errors-from-API/td-p/5203816 ?

@strideynet My issue was related to the same as you mentioned. Seems like Spotify resolved the issue from their side. Works fine now. Thank you

strideynet commented 2 years ago

I'm going to go ahead and close this issue unless it recurs