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

java.lang.NullPointerException error #676

Closed
mharrisweb opened this issue Oct 4, 2021 · 5 comments
Closed

java.lang.NullPointerException error #676

mharrisweb opened this issue Oct 4, 2021 · 5 comments
Labels
needs-more-info This issue may not have sufficient information for a contributor to take action

Comments

@mharrisweb
Copy link

Issue

WHen using the latest version 6.4.0 I get the error below can anyone help?

java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
	at net.openid.appauth.IdToken.validate(IdToken.java:141)
	at net.openid.appauth.AuthorizationService$TokenRequestTask.onPostExecute(AuthorizationService.java:698)
	at net.openid.appauth.AuthorizationService$TokenRequestTask.onPostExecute(AuthorizationService.java:564)
	at android.os.AsyncTask.finish(AsyncTask.java:771)
	at android.os.AsyncTask.access$900(AsyncTask.java:199)
	at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:788)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:246)
	at android.app.ActivityThread.main(ActivityThread.java:8512)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1139)


Environment

  • Your Identity Provider: e.g. IdentityServer 4 / Okta / Azure

  • Platform that you're experiencing the issue on: iOS / Android / both

Android

  • Are you using Expo?

No

@ANIBIT14
Copy link

I am also getting the same error

java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Boolean.booleanValue()' on a null object reference

Stack trace is

com.rnappauth.RNAppAuthModule.onActivityResult RNAppAuthModule.java:419
com.facebook.react.bridge.ReactContext.onActivityResult ReactContext.java:305
com.facebook.react.ReactInstanceManager.onActivityResult ReactInstanceManager.java:762
com.facebook.react.ReactDelegate.onActivityResult ReactDelegate.java:90
com.facebook.react.ReactActivityDelegate.onActivityResult ReactActivityDelegate.java:112
com.facebook.react.ReactActivity.onActivityResult ReactActivity.java:68
android.app.Activity.dispatchActivityResult Activity.java:8550
android.app.ActivityThread.deliverResults ActivityThread.java:5534
android.app.ActivityThread.handleSendResult ActivityThread.java:5582
android.app.servertransaction.ActivityResultItem.execute ActivityResultItem.java:51
android.app.servertransaction.TransactionExecutor.executeCallbacks TransactionExecutor.java:135
android.app.servertransaction.TransactionExecutor.execute TransactionExecutor.java:95
android.app.ActivityThread$H.handleMessage ActivityThread.java:2317
android.os.Handler.dispatchMessage Handler.java:106
android.os.Looper.loop Looper.java:246
android.app.ActivityThread.main ActivityThread.java:8595
java.lang.reflect.Method.invoke Method.java
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run RuntimeInit.java:602
com.android.internal.os.ZygoteInit.main ZygoteInit.java:1130

Can anyone tell what might be causing it

@ghost
Copy link

ghost commented Nov 17, 2021

@ANIBIT14 Your issue is related to #672

@Jay-A-McBee
Copy link
Contributor

👋 hey @mharrisweb - If you can give us more information (identity provider, config, etc.), we can try to help with this issue.

@ANIBIT14 - your issue is unrelated. Your error occurs in the onActivityResult handler. The OP's error is being thrown by the backing native library AppAuth-Android.

@Jay-A-McBee Jay-A-McBee added the needs-more-info This issue may not have sufficient information for a contributor to take action label Jan 28, 2022
@Jay-A-McBee
Copy link
Contributor

No response from OP - closing this out.

@thomasrose
Copy link

I ran into the same issue, albeit using FusionAuth. The issuer in the FusionAuth tenant was configured without a protocol (e.g. example.com instead of https://example.com). Adding https:// resolved the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-more-info This issue may not have sufficient information for a contributor to take action
Projects
None yet
Development

No branches or pull requests

4 participants