Crash - dataIntent must not be null
Hi!
Looks like some react-native-app-auth users are still facing this issue. I'm forwarding it here - it might be useful to find out whether this issue somehow could be solved on the react-native-app-auth library itself or only on AppAuth-Android where crash is triggered.
original issue thread: https://github.com/FormidableLabs/react-native-app-auth/issues/130
Crash scenario:
- Open the app
- Start authorizing - login page is displayed in browser
- Put the app in background
- Start the app again from the device launcher
- App user sees "Critical Error Occured!" with crashlogs
Fatal Exception: java.lang.RuntimeException
Failure delivering result ResultInfo{who=null, request=0, result=0, data=null} to activity {<app's Main Activity>}: java.lang.NullPointerException: dataIntent must not be null
...
net.openid.appauth.Preconditions.checkNotNull + 55 (Preconditions.java:55)
net.openid.appauth.AuthorizationResponse.fromIntent + 564 (AuthorizationResponse.java:564)
com.rnappauth.RNAppAuthModule.onActivityResult + 303 (RNAppAuthModule.java:303)
Crash is avoided if on step 4 the app is resumed instead of relaunched.
Note: in this case, AndroidManifest.xml contains android:launchMode="singleTask"
Is this fixed??