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

unknown_error in MsalBrokerResultAdapter.getBaseExceptionFromExceptionType #2087

Open
gcastaldi opened this issue Apr 24, 2024 · 1 comment

Comments

@gcastaldi
Copy link

gcastaldi commented Apr 24, 2024

Describe the bug
We are in production with an android app using msal. We are still using version 4.7.0 (soon 4.10.0) and some users are having now the failure of the login (below the excpetion). Until the day before, they were able to successfully log in.
If we execute a factory reset of the device and reinstall the apps the problem is solved.

Smartphone (please complete the following information):

  • Device: Samsung A52
  • Android Version: Android 12, Sdk 31
  • Browser: Internet Samsung
  • MSAL Version: 4.7.0
  • Microsoft Authenticator installed

Stacktrace
error code: unknown_error error message: ex: com.microsoft.identity.common.exception.BaseException com.microsoft.identity.client.exception.MsalClientException: at com.microsoft.identity.client.internal.controllers.MsalExceptionAdapter.msalExceptionFromBaseException(MsalExceptionAdapter.java:24) at com.microsoft.identity.client.SingleAccountPublicClientApplication$3.onError(SingleAccountPublicClientApplication.java:2) at com.microsoft.identity.client.SingleAccountPublicClientApplication$3.onError(SingleAccountPublicClientApplication.java:1) at com.microsoft.identity.common.java.controllers.CommandDispatcher.commandCallbackOnError(CommandDispatcher.java:15) at com.microsoft.identity.common.java.controllers.CommandDispatcher.access$900(CommandDispatcher.java:1) at com.microsoft.identity.common.java.controllers.CommandDispatcher$4.run(CommandDispatcher.java:47) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135) Caused by: com.microsoft.identity.common.java.exception.ClientException at com.microsoft.identity.common.internal.result.MsalBrokerResultAdapter.getBaseExceptionFromExceptionType(MsalBrokerResultAdapter.java:125) at com.microsoft.identity.common.internal.result.MsalBrokerResultAdapter.getBaseExceptionFromBundle(MsalBrokerResultAdapter.java:39) at com.microsoft.identity.common.internal.result.MsalBrokerResultAdapter.getAcquireTokenResultFromResultBundle(MsalBrokerResultAdapter.java:27) at com.microsoft.identity.common.internal.controllers.BrokerMsalController.acquireToken(BrokerMsalController.java:148) at com.microsoft.identity.common.java.commands.InteractiveTokenCommand.execute(InteractiveTokenCommand.java:10) at com.microsoft.identity.common.java.commands.InteractiveTokenCommand.execute(InteractiveTokenCommand.java:1) at com.microsoft.identity.common.java.controllers.CommandDispatcher.executeCommand(CommandDispatcher.java:2) at com.microsoft.identity.common.java.controllers.CommandDispatcher.access$100(CommandDispatcher.java:1) at com.microsoft.identity.common.java.controllers.CommandDispatcher$5.run(CommandDispatcher.java:106) at io.opentelemetry.context.Context.lambda$wrap$1(Context.java:5) at io.opentelemetry.context.Context.c(Unknown Source:0) at io.opentelemetry.context.e.run(Unknown Source:4) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) at java.lang.Thread.run(Thread.java:1012)

To Reproduce
In code are executed the following steps:

  • Create accountApp (account mode single)
  • Call signIn with userHint parameter
    The exception happens before inserting the password

Expected behavior
The user can insert the password and execute the login with success

Actual Behavior
unknown_error and login failed

@negoe
Copy link
Contributor

negoe commented May 23, 2024

Hi @gcastaldi Thanks for your patience. Can you please try upgrading to the latest version of MSAL? Please let me know if you are still seeing this issue.

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

2 participants