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

Used to be able to auth with player, now no longer can. #414

Open
markd2 opened this issue Mar 20, 2024 · 7 comments
Open

Used to be able to auth with player, now no longer can. #414

markd2 opened this issue Mar 20, 2024 · 7 comments

Comments

@markd2
Copy link

markd2 commented Mar 20, 2024

My app has been working well until today. I do authorizeAndPlayURI, the Spotify app comes forward, shows an "X", returns to my app, but did not authorize. I get these two errors. The Spotify app is installed, and it does play music. There are no complaints in the developer console. There is no email communication from the developer program saying we've been delisted. Happens with the Spotify app prior to the March 4 update, as well as that version.

AppRemote: Failed connection attempt with error: Error Domain=com.spotify.app-remote.transport Code=-2000 "Stream error." UserInfo={NSLocalizedDescription=Stream error., NSUnderlyingError=0x2829a6bb0 {Error Domain=NSPOSIXErrorDomain Code=61 "Connection refused" UserInfo={_kCFStreamErrorCodeKey=61, _kCFStreamErrorDomainKey=1}}, NSLocalizedRecoverySuggestion=Reconnect the transport to the Spotify app., NSLocalizedFailureReason=A stream error has occured in the transport.}

2024-03-20-14:20:33.54-AppDelegate.swift:58 - 2055 - spotify didFailConnectionAttemptWithError Optional(Error Domain=com.spotify.app-remote Code=-1000 "Connection attempt failed." UserInfo={NSLocalizedDescription=Connection attempt failed., NSUnderlyingError=0x2829a6a00 {Error Domain=com.spotify.app-remote.transport Code=-2000 "Stream error." UserInfo={NSLocalizedDescription=Stream error., NSUnderlyingError=0x2829a6bb0 {Error Domain=NSPOSIXErrorDomain Code=61 "Connection refused" UserInfo={_kCFStreamErrorCodeKey=61, _kCFStreamErrorDomainKey=1}}, NSLocalizedRecoverySuggestion=Reconnect the transport to the Spotify app., NSLocalizedFailureReason=A stream error has occured in the transport.}}, NSLocalizedRecoverySuggestion=Ensure the Spotify app is installed, and try to reconnect., NSLocalizedFailureReason=Could not connect to the Spotify app.})

Thanks!
++md

@zallanx
Copy link

zallanx commented Mar 20, 2024

Upon looking through the issue list from the Spotify forum, it appears that the URI redirect was suddenly no longer accepted today: https://community.spotify.com/t5/Spotify-for-Developers/User-Authorization-failing-in-production/m-p/5956550

According to this issue (posted 37 minutes ago as of writing), the word spotify must be added, so it appears as "yourappname://spotify"

I am honestly quite hazy on this whole redirect URI thing, but perhaps it could be helpful to you to figuring out a solution.

To be sure, I would imagine that when your app redirects to open the Spotify app, you see briefly a "X" flash before redirecting back to your app?

@markd2
Copy link
Author

markd2 commented Mar 20, 2024

awesome! I'll go take a look and see if that fixes it for me. (and I wonder if this new restriction was communicated somewhere...)

@zallanx
Copy link

zallanx commented Mar 20, 2024

Nowhere as far as I am aware of. These things tend to just happen suddenly and everyone is left scrambling.

@zallanx
Copy link

zallanx commented Mar 20, 2024

Can confirm, I just updated my prod apps, and by adding spotify to my redirect URI so that it goes from myappname:// to myappname://spotify solves the issue.

I am also refreshing the tokens via a backend, and note that if you are using config variables, you must also update it to myappname://spotify as well

Hope this helps.

@litvakle
Copy link

Adding spotify helped me.
How did you know that it should help?

@zallanx
Copy link

zallanx commented Mar 21, 2024

@litvakle There was a post about this issue on the Spotify forums (https://community.spotify.com/t5/Spotify-for-Developers/User-Authorization-failing-in-production/m-p/5956550) and the person noted in passing about a redirect URI featuring spotify appended at the end of their original URI

Edit: specifically, the person noted

We've already added a new RedirectURI mixonset://spotify although it seems not to have taken effect yet.

That was my hint to append spotify at the end of the original URI.

@romoore
Copy link

romoore commented May 8, 2024

I'd love to recommend adding Spotify to our clients, but breaking changes like this make the company feel more like a fly-by-night startup than an established enterprise. :( Hopefully they'll learn from this and announce/migrate changes like this in the future.

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

4 participants