Skip to content

[iOS] App crash after authorization flow #138

@reinhardholl

Description

@reinhardholl

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions