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

[iOS] App crash after authorization flow #138

Closed
reinhardholl opened this issue May 11, 2021 · 2 comments
Closed

[iOS] App crash after authorization flow #138

reinhardholl opened this issue May 11, 2021 · 2 comments
Assignees

Comments

@reinhardholl
Copy link

reinhardholl commented May 11, 2021

In some cases we are seeing a crash when the .authorize call fails. This happens when testing with a Spotify free account and trying to auth using a playlistURI. I am not to sure about the exact reason of the Spotify auth failure yet but I have managed to track down the actual crash:

The return url from spotify is:

appname://spotify-login-callback/?code=auth-code&error_description=The%20operation%20couldn%E2%80%99t%20be%20completed.%20(com.spotify.cosmos.dataloader%20error%20500.)&spotify_version=8.6.24.1302

RNSpotifyRemoteAuth then tries to handle the error_description case, but it seems that errorCode is nil causing the crash. I managed to patch it locally by handling the nil case in initWithCode on RNSpotifyRemoteError.m.

EDIT: Added a PR to illustrate the fix I did locally. Not sure if its the best overall fix but worked for what I needed

@cjam
Copy link
Owner

cjam commented May 17, 2021

Thanks for the PR! I'll try and get a new version pushed out with the fix.

@cjam cjam self-assigned this May 17, 2021
@cjam
Copy link
Owner

cjam commented May 17, 2021

released in 0.3.9

@cjam cjam closed this as completed May 17, 2021
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