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

Crash on Preconditions.java line 55 net.openid.appauth.Preconditions.checkNotNull #101

Closed
sattaman opened this issue Apr 23, 2018 · 8 comments

Comments

@sattaman
Copy link
Contributor

sattaman commented Apr 23, 2018

We have pushed out a version of our app with app auth embedded, and crashlytics is picking up a big increase in crashes (below is last 7 days).

image

Fatal Exception: java.lang.RuntimeExceptionFailure delivering result ResultInfo{who=null, request=0, result=0, data=null} to activity {com.myapp/com.myapp.MainActivity}: java.lang.NullPointerException: dataIntent must not be null Raw Text
--
  | android.app.ActivityThread.deliverResults (ActivityThread.java:3521)
  | android.app.ActivityThread.handleSendResult (ActivityThread.java:3564)
  | android.app.ActivityThread.access$1300 (ActivityThread.java:163)
  | android.app.ActivityThread$H.handleMessage (ActivityThread.java:1305)
  | android.os.Handler.dispatchMessage (Handler.java:102)
  | android.os.Looper.loop (Looper.java:157)
  | android.app.ActivityThread.main (ActivityThread.java:5335)
  | java.lang.reflect.Method.invokeNative (Method.java)
  | java.lang.reflect.Method.invoke (Method.java:515)
  | com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1265)
  | com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1081)
  | dalvik.system.NativeStart.main (NativeStart.java)
net.openid.appauth.Preconditions.checkNotNull (Preconditions.java:55)
--
  | net.openid.appauth.AuthorizationResponse.fromIntent (AuthorizationResponse.java:565)
  | com.reactlibrary.RNAppAuthModule.onActivityResult (RNAppAuthModule.java:212)
  | com.facebook.react.bridge.ReactContext.onActivityResult (ReactContext.java:265)
  | com.facebook.react.ReactInstanceManager.onActivityResult (ReactInstanceManager.java:675)
  | com.facebook.react.ReactActivityDelegate.onActivityResult (ReactActivityDelegate.java:149)
  | com.facebook.react.ReactActivity.onActivityResult (ReactActivity.java:77)
  | android.app.Activity.dispatchActivityResult (Activity.java:5581)
  | android.app.ActivityThread.deliverResults (ActivityThread.java:3517)
  | android.app.ActivityThread.handleSendResult (ActivityThread.java:3564)
  | android.app.ActivityThread.access$1300 (ActivityThread.java:163)
  | android.app.ActivityThread$H.handleMessage (ActivityThread.java:1305)
  | android.os.Handler.dispatchMessage (Handler.java:102)
  | android.os.Looper.loop (Looper.java:157)
  | android.app.ActivityThread.main (ActivityThread.java:5335)
  | java.lang.reflect.Method.invokeNative (Method.java)
  | java.lang.reflect.Method.invoke (Method.java:515)
  | com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1265)
  | com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1081)
  | dalvik.system.NativeStart.main (NativeStart.java)
@kadikraman
Copy link
Contributor

kadikraman commented Apr 23, 2018

Looks like it's coming from here
Do you have any device breakdown for the crashes? Clearly Android, but are there any particular API versions that are affected?

@kadikraman
Copy link
Contributor

Also, which version of the library are you using?

@sattaman
Copy link
Contributor Author

image

@sattaman
Copy link
Contributor Author

We're on ^2.0.0 currently.

@sattaman
Copy link
Contributor Author

sattaman commented Apr 23, 2018

65% of crashes are on the Samsung SM-N005. This looks like the most common crash:

OS Version: 4.4.2
Device: Galaxy Note3

@kadikraman
Copy link
Contributor

kadikraman commented Apr 23, 2018

I think the issue is with older Android phones.

Upgrade to the latest version v2.4.1. Support for older Android phones (API 16-19) was added in v2.4.0 (See release notes here).

The upgrade should fix it.

@sattaman
Copy link
Contributor Author

Ok brilliant, I'll do that now

@duro
Copy link

duro commented Sep 19, 2018

@kadikraman We are seeing this exact same crash on the latest version of this package, and most of the crashes are coming from Android 8.

Here is our Crashlytics stack trace from the most recent crash:

# Crashlytics - plaintext stacktrace downloaded
# Platform: android
# OS Version: 8.0.0
# Device: SM-G950U1

#0. Crashed: main
       at android.app.ActivityThread.deliverResults(ActivityThread.java:4489)
       at android.app.ActivityThread.handleSendResult(ActivityThread.java:4532)
       at android.app.ActivityThread.-wrap20(Unknown Source)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1752)
       at android.os.Handler.dispatchMessage(Handler.java:105)
       at android.os.Looper.loop(Looper.java:164)
       at android.app.ActivityThread.main(ActivityThread.java:6938)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

--

Fatal Exception: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=0, result=0, data=null} to activity {com.freebirdrides.android/com.freebirdrides.android.MainActivity}: java.lang.RuntimeException: java.lang.NullPointerException: dataIntent must not be null
       at android.app.ActivityThread.deliverResults(ActivityThread.java:4489)
       at android.app.ActivityThread.handleSendResult(ActivityThread.java:4532)
       at android.app.ActivityThread.-wrap20(Unknown Source)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1752)
       at android.os.Handler.dispatchMessage(Handler.java:105)
       at android.os.Looper.loop(Looper.java:164)
       at android.app.ActivityThread.main(ActivityThread.java:6938)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

Caused by java.lang.RuntimeException: java.lang.NullPointerException: dataIntent must not be null
       at com.facebook.react.bridge.ReactContext.handleException(ReactContext.java:311)
       at com.facebook.react.bridge.ReactContext.onActivityResult(ReactContext.java:255)
       at com.facebook.react.ReactInstanceManager.onActivityResult(ReactInstanceManager.java:692)
       at com.facebook.react.ReactActivityDelegate.onActivityResult(ReactActivityDelegate.java:126)
       at com.facebook.react.ReactActivity.onActivityResult(ReactActivity.java:75)
       at com.freebirdrides.android.MainActivity.onActivityResult(MainActivity.java:13)
       at android.app.Activity.dispatchActivityResult(Activity.java:7548)
       at android.app.ActivityThread.deliverResults(ActivityThread.java:4485)
       at android.app.ActivityThread.handleSendResult(ActivityThread.java:4532)
       at android.app.ActivityThread.-wrap20(Unknown Source)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1752)
       at android.os.Handler.dispatchMessage(Handler.java:105)
       at android.os.Looper.loop(Looper.java:164)
       at android.app.ActivityThread.main(ActivityThread.java:6938)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

Caused by java.lang.NullPointerException: dataIntent must not be null
       at net.openid.appauth.Preconditions.checkNotNull(Preconditions.java:55)
       at net.openid.appauth.AuthorizationResponse.fromIntent(AuthorizationResponse.java:565)
       at com.reactlibrary.RNAppAuthModule.onActivityResult(RNAppAuthModule.java:210)
       at com.facebook.react.bridge.ReactContext.onActivityResult(ReactContext.java:253)
       at com.facebook.react.ReactInstanceManager.onActivityResult(ReactInstanceManager.java:692)
       at com.facebook.react.ReactActivityDelegate.onActivityResult(ReactActivityDelegate.java:126)
       at com.facebook.react.ReactActivity.onActivityResult(ReactActivity.java:75)
       at com.freebirdrides.android.MainActivity.onActivityResult(MainActivity.java:13)
       at android.app.Activity.dispatchActivityResult(Activity.java:7548)
       at android.app.ActivityThread.deliverResults(ActivityThread.java:4485)
       at android.app.ActivityThread.handleSendResult(ActivityThread.java:4532)
       at android.app.ActivityThread.-wrap20(Unknown Source)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1752)
       at android.os.Handler.dispatchMessage(Handler.java:105)
       at android.os.Looper.loop(Looper.java:164)
       at android.app.ActivityThread.main(ActivityThread.java:6938)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

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

3 participants