Facing `An error occurred when trying to authenticate with the server.`


I am using Auth0 Android SDK to authenticate users.

It used to work well, however over the last 7 days I’ve faced 30 occurrences of An error occurred when trying to authenticate with the server..

The issue happens on any Android version from 11 to 14, and any kind of Android device (Samsung, Huawei, Oppo, Xiami, Google).

Here is the stacktrace :

An error occurred when trying to authenticate with the server.
com.auth0.android.provider.OAuthManager.resume (OAuthManager.java:53)
com.auth0.android.provider.WebAuthProvider.resume (WebAuthProvider.java:22)
com.auth0.android.provider.AuthenticationActivity.deliverAuthenticationResult$auth0_release (AuthenticationActivity.java:22)
com.auth0.android.provider.AuthenticationActivity.onResume (AuthenticationActivity.java:189)
android.app.Instrumentation.callActivityOnResume (Instrumentation.java:1587)
android.app.Activity.performResume (Activity.java:8690)
android.app.ActivityThread.performResumeActivity (ActivityThread.java:5061)
android.app.ActivityThread.handleResumeActivity (ActivityThread.java:5104)
android.app.servertransaction.ResumeActivityItem.execute (ResumeActivityItem.java:54)
android.app.servertransaction.ActivityTransactionItem.execute (ActivityTransactionItem.java:45)
android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:176)
android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:97)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:2415)
android.os.Handler.dispatchMessage (Handler.java:106)
android.os.Looper.loopOnce (Looper.java:211)
android.os.Looper.loop (Looper.java:300)
android.app.ActivityThread.main (ActivityThread.java:8395)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:559)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:954)

To authenticate users I use WebAuthProvider#login().

Additional info:

  • Auth0 Android SDK version 2.10.2
  • Compile SDK 34
  • Target SDK 34

Users are reporting they land on the Auth0 error page that says “This could be a misconfiguration in the system or a service outage. We track these errors automatically, but if the problem persists feel free to contact us.”

Looking for help to troubleshoot this further.


I realise that this exception is misleading :

com.auth0.android.authentication.AuthenticationException: An error occurred when trying to authenticate with the server.

It is thrown when the authentication flow is aborted, for instance when you click the close button inside the custom tab.

That means it’s not directly related to the fact users are facing the Auth0 error page.

I am still looking for ways to investigate this issue.