NullPointerException in createConnectionBuilder (Android)
See original GitHub issueWe just release a new app based on React Native and react-native-app-auth and Azure AD as IDP.
react-native-app-auth: 5.0.0-rc3 react-native: 0.61.5 react: 16.9.0
We never saw this during testing with emulator and a Huawei P30(Android 9). But now we have logged hundreds of these errors over the last couple of days, on a range of different phone models, and Android 8, 9 and 10. iOS seems fine.
Based on the exception, it seems like dangerouslyAllowInsecureHttpRequests
. How could this be?
This seems related to this issue: https://github.com/FormidableLabs/react-native-app-auth/issues/95
Caused by java.lang.NullPointerException
Attempt to invoke virtual method 'boolean java.lang.Boolean.equals(java.lang.Object)' on a null
com.rnappauth.RNAppAuthModule.createConnectionBuilder (RNAppAuthModule.java:546)
com.rnappauth.RNAppAuthModule.onActivityResult (RNAppAuthModule.java:316)
com.facebook.react.bridge.ReactContext.onActivityResult (ReactContext.java:275)
com.facebook.react.ReactInstanceManager.onActivityResult (ReactInstanceManager.java:703)
com.facebook.react.ReactDelegate.onActivityResult (ReactDelegate.java:89)
com.facebook.react.ReactActivityDelegate.onActivityResult (ReactActivityDelegate.java:110)
com.facebook.react.ReactActivity.onActivityResult (ReactActivity.java:67)
android.app.Activity.dispatchActivityResult (Activity.java:7193)
android.app.ActivityThread.deliverResults (ActivityThread.java:4280)
android.app.ActivityThread.handleSendResult (ActivityThread.java:4327)
android.app.ActivityThread.-wrap22 (ActivityThread.java)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1624)
android.os.Handler.dispatchMessage (Handler.java:105)
android.os.Looper.loop (Looper.java:156)
android.app.ActivityThread.main (ActivityThread.java:6523)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:942)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:832)
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Null pointer exception error in android - java - Stack Overflow
I am getting the following exception when I run the texter application in android. STACK_TRACE : java.lang.NullPointerException at ...
Read more >NullPointerException - Android Developers
NullPointerException objects may be constructed by the virtual machine as if stack trace was ... Constructs a NullPointerException with no detail message.
Read more >Fix "java.lang.NullPointerException" in Android Studio
Hey Geeks, today we will see what NullPointerException means and how we can fix it in Android Studio. To understand NullPointerException ...
Read more >NullPointerException Constructor (Java.Lang) - Microsoft Learn
Constructs a NullPointerException with no detail message. ... page are modifications based on work created and shared by the Android Open Source Project...
Read more >Java NullPointerException - Detect, Fix, and Best Practices
NullPointerException. java lang nullpointerexception hierarchy. NullPointerException is a runtime exception, so we don't need to catch it in the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Looks like this is fixed by https://github.com/FormidableLabs/react-native-app-auth/commit/0b356a541c5c8e713d3f27c523f3b55b87ead999, included in v5.1.2. Please close this issue 😃
@kadikraman We are using 5.0.2 and getting a lot of reports via Google Play Console:
Changing line 713 to
might help.