-
Notifications
You must be signed in to change notification settings - Fork 91
Description
When the user cancels the Spotify connection dialog on Android (i.e., declines to connect the app to Spotify), the SpotifySdk.connectToSpotifyRemote() call does not throw an exception or return a response. This causes the app to silently hang without any feedback.
Further, once this has happened once, any subsequent calls to connectToSpotifyRemote() will also not respond — leaving the app in a permanently broken state.
🔁 Steps to Reproduce
Call SpotifySdk.connectToSpotifyRemote() from your Flutter app.
On Android, when prompted by Spotify, tap "Cancel" or back out of the dialog.
Try calling connectToSpotifyRemote() again — it does not respond.
Observe: Nothing happens — no response, no exception error.
🤔 Expected Behavior
The SDK should throw an exception or return an error when the user canceled the Spotify authorization.
Implementation
I’m using connectToSpotifyRemote() only and have already handled known exceptions such as "Spotify app not installed", "user not logged in", etc.
However, when the user cancels the Spotify connection prompt (by pressing "Cancel"), the method does not return any response or throw an exception. The app becomes unresponsive, and all subsequent calls to connectToSpotifyRemote() also stop working.
This cancellation case appears to be unhandled in the SDK and should ideally throw an exception or return an error so that the app can recover gracefully and allow the user to retry the connection.
