react-native-spotify icon indicating copy to clipboard operation
react-native-spotify copied to clipboard

Warning: Attempt to present <RNSpotifyAuthController: 0x7ff563a58e00> on <RCTModalHostViewController: 0x7ff55dd45cf0> whose view is not in the window hierarchy!

Open sslash opened this issue 5 years ago • 6 comments

Platform: ios React-native version:: 0.61.2 rn-spotify-sdk: 1.2.11

This error suddenly started happening after I placed the Spotify authentication screen in a different place in my app:

Warning: Attempt to present <RNSpotifyAuthController: 0x7fc60a4b5200> on <RCTModalHostViewController: 0x7fc609040960> whose view is not in the window hierarchy!

The error happens after a call to Spotify.initialize followed by Spotify.login

Any idea what could trigger this?

sslash avatar Oct 15 '19 05:10 sslash

To be honest no idea. I present the auth controller on whatever the top visible view controller is in the app

lufinkey avatar Oct 15 '19 13:10 lufinkey

To be honest no idea. I present the auth controller on whatever the top visible view controller is in the app

Hah yeah really confusing. I am showing (and hiding) a modal just before trying to show the Spotify login modal, so it might be that it hasn't closed itself properly before I start the Spotify flow. I will do some more investigation!

sslash avatar Oct 15 '19 14:10 sslash

@sslash did you ever find anything on this?

lufinkey avatar Dec 08 '20 16:12 lufinkey

Not really. I've just settled with the fact that we have to make sure that any other modal must be completely removed before we show the Spotify authentication modal

sslash avatar Dec 08 '20 18:12 sslash

Any chance you could post a view controller stack for when it fails?

lufinkey avatar Dec 08 '20 22:12 lufinkey

I'll try, yeah!

sslash avatar Dec 09 '20 05:12 sslash