Auth0.Android icon indicating copy to clipboard operation
Auth0.Android copied to clipboard

NullPointerException in WebAuthProvider

Open LouisPennachio opened this issue 1 year ago • 0 comments

Checklist

  • [X] The issue can be reproduced in the Auth0.Android sample app (or N/A).
  • [X] I have looked into the Readme, Examples, and FAQ and have not found a suitable solution or answer.
  • [X] I have looked into the API documentation and have not found a suitable solution or answer.
  • [X] I have searched the issues and have not found a suitable solution or answer.
  • [X] I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • [X] I agree to the terms within the Auth0 Code of Conduct.

Description

I notice the Android Auth0 SDK sometimes throws this exception :

Fatal Exception: java.lang.NullPointerException:
       at com.auth0.android.provider.WebAuthProvider.failure$auth0_release(WebAuthProvider.java:149)
       at com.auth0.android.provider.AuthenticationActivity.deliverAuthenticationFailure$auth0_release(AuthenticationActivity.java:149)
       at com.auth0.android.provider.AuthenticationActivity$launchAuthenticationIntent$1.apply(AuthenticationActivity.java:149)
       at com.auth0.android.provider.AuthenticationActivity$launchAuthenticationIntent$1.apply(AuthenticationActivity.java:149)
       at com.auth0.android.provider.CustomTabsController.lambda$null$0(CustomTabsController.java:149)
       at android.os.Handler.handleCallback(Handler.java:789)
       at android.os.Handler.dispatchMessage(Handler.java:98)
       at android.os.Looper.loop(Looper.java:164)
       at android.app.ActivityThread.main(ActivityThread.java:6944)
       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)

It originates from here :

WebAuthProvider.login(auth0)
    .withAudience(...)
    .withNonce(...)
    .withParameters(...)
    .withRedirectUri(...)
    .withScope(...)
    .await(context)

Impacted Android devices: Samsung, Oppo, Transsion, Vivo, Huawei Application state: 100% foreground Occurence: 26 times over the last 90 days

Any hint on what could cause this ?

Thanks

Reproduction

Reproduction steps are unknown. I've tried with my own app as well as the Auth0 sample app. The crashes happen only for end-users in production.

Additional context

No response

Auth0.Android version

2.10.2

Android version(s)

9, 10, 11, 12, 13

LouisPennachio avatar Mar 15 '24 15:03 LouisPennachio