DeadObjectException & TransactionTooLargeException on devices with Broker app
See original GitHub issueDescribe the bug Yammer is migrating from ADAL to MSAL. Silent AcquireToken requests succeed when the device has no broker app installed. Found exceptions in the logs when trying silent AcquireToken on a device with the Microsoft Authenticator app installed
Smartphone (please complete the following information):
- Device: Pixel3 XL
- Android Version: API version 30, Android 10
- Browser: Chrome android
- MSAL Version: 1.3.0
Stacktrace
android.accounts.AuthenticatorException: addAccount failed
at android.accounts.AccountManager.convertErrorToException(AccountManager.java:2558)
at android.accounts.AccountManager.access$700(AccountManager.java:162)
at android.accounts.AccountManager$AmsTask$Response.onError(AccountManager.java:2394)
at android.accounts.IAccountManagerResponse$Stub.onTransact(IAccountManagerResponse.java:107)
at android.os.Binder.execTransactInternal(Binder.java:1021)
at android.os.Binder.execTransact(Binder.java:994)
android.os.DeadObjectException: Transaction failed on small parcel; remote process probably died
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(BinderProxy.java:511)
at com.microsoft.identity.client.IMicrosoftAuthService$Stub$Proxy.getAccounts(IMicrosoftAuthService.java:269)
at com.microsoft.identity.client.internal.controllers.BrokerAuthServiceStrategy$4.perform(BrokerAuthServiceStrategy.java:225)
at com.microsoft.identity.client.internal.controllers.BrokerAuthServiceStrategy$4.perform(BrokerAuthServiceStrategy.java:220)
at com.microsoft.identity.client.internal.controllers.BrokerAuthServiceStrategy.performAuthServiceOperation(BrokerAuthServiceStrategy.java:119)
at com.microsoft.identity.client.internal.controllers.BrokerAuthServiceStrategy.getBrokerAccounts(BrokerAuthServiceStrategy.java:219)
at com.microsoft.identity.client.internal.controllers.BrokerMsalController$3.perform(BrokerMsalController.java:348)
at com.microsoft.identity.client.internal.controllers.BrokerMsalController$3.perform(BrokerMsalController.java:344)
at com.microsoft.identity.client.internal.controllers.BrokerMsalController.invokeBrokerOperation(BrokerMsalController.java:196)
at com.microsoft.identity.client.internal.controllers.BrokerMsalController.getAccounts(BrokerMsalController.java:343)
at com.microsoft.identity.client.internal.controllers.BrokerMsalController.getCurrentAccount(BrokerMsalController.java:433)
at com.microsoft.identity.common.internal.controllers.GetCurrentAccountCommand.execute(GetCurrentAccountCommand.java:66)
at com.microsoft.identity.common.internal.controllers.GetCurrentAccountCommand.execute(GetCurrentAccountCommand.java:37)
at com.microsoft.identity.common.internal.controllers.CommandDispatcher.executeCommand(CommandDispatcher.java:138)
at com.microsoft.identity.common.internal.controllers.CommandDispatcher.access$200(CommandDispatcher.java:53)
at com.microsoft.identity.common.internal.controllers.CommandDispatcher$1.run(CommandDispatcher.java:95)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
android.os.DeadObjectException: Transaction failed on small parcel; remote process probably died
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(BinderProxy.java:511)
at com.microsoft.identity.client.IMicrosoftAuthService$Stub$Proxy.getAccounts(IMicrosoftAuthService.java:269)
at com.microsoft.identity.client.internal.controllers.BrokerAuthServiceStrategy$4.perform(BrokerAuthServiceStrategy.java:225)
at com.microsoft.identity.client.internal.controllers.BrokerAuthServiceStrategy$4.perform(BrokerAuthServiceStrategy.java:220)
at com.microsoft.identity.client.internal.controllers.BrokerAuthServiceStrategy.performAuthServiceOperation(BrokerAuthServiceStrategy.java:119)
at com.microsoft.identity.client.internal.controllers.BrokerAuthServiceStrategy.getBrokerAccounts(BrokerAuthServiceStrategy.java:219)
at com.microsoft.identity.client.internal.controllers.BrokerMsalController$3.perform(BrokerMsalController.java:348)
at com.microsoft.identity.client.internal.controllers.BrokerMsalController$3.perform(BrokerMsalController.java:344)
at com.microsoft.identity.client.internal.controllers.BrokerMsalController.invokeBrokerOperation(BrokerMsalController.java:196)
at com.microsoft.identity.client.internal.controllers.BrokerMsalController.getAccounts(BrokerMsalController.java:343)
at com.microsoft.identity.client.internal.controllers.BrokerMsalController.getCurrentAccount(BrokerMsalController.java:433)
at com.microsoft.identity.common.internal.controllers.GetCurrentAccountCommand.execute(GetCurrentAccountCommand.java:66)
at com.microsoft.identity.common.internal.controllers.GetCurrentAccountCommand.execute(GetCurrentAccountCommand.java:37)
at com.microsoft.identity.common.internal.controllers.CommandDispatcher.executeCommand(CommandDispatcher.java:138)
at com.microsoft.identity.common.internal.controllers.CommandDispatcher.access$200(CommandDispatcher.java:53)
at com.microsoft.identity.common.internal.controllers.CommandDispatcher$1.run(CommandDispatcher.java:95)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
2020-03-16 15:59:05.906 27523-27540/? W/AccountAuthenticator: addAccount(com.microsoft.workaccount)
android.os.TransactionTooLargeException: data parcel size 2830992 bytes
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(BinderProxy.java:511)
at android.accounts.IAccountAuthenticatorResponse$Stub$Proxy.onResult(IAccountAuthenticatorResponse.java:156)
at android.accounts.AbstractAccountAuthenticator$Transport.addAccount(AbstractAccountAuthenticator.java:176)
at android.accounts.IAccountAuthenticator$Stub.onTransact(IAccountAuthenticator.java:236)
at android.os.Binder.execTransactInternal(Binder.java:1021)
at android.os.Binder.execTransact(Binder.java:994)
2020-03-16 15:59:05.915 28489-28537/com.yammer.v1.debug E/BrokerAccountManagerStrategy:getBrokerAccountsWithAccountManager: [2020-03-16 10:29:05 - {"thread_id":"12313","correlation_id":"e1892da9-5a95-4b50-af27-c067e8a4fc25"}] addAccount failed Android 29
android.accounts.AuthenticatorException: addAccount failed
at android.accounts.AccountManager.convertErrorToException(AccountManager.java:2558)
at android.accounts.AccountManager.access$700(AccountManager.java:162)
at android.accounts.AccountManager$AmsTask$Response.onError(AccountManager.java:2394)
at android.accounts.IAccountManagerResponse$Stub.onTransact(IAccountManagerResponse.java:107)
at android.os.Binder.execTransactInternal(Binder.java:1021)
at android.os.Binder.execTransact(Binder.java:994)
2020-03-16 15:59:05.919 28489-30268/com.yammer.v1.debug E/AuthCallbackUtils: App's acquireToken callback threw an exception.
com.microsoft.identity.client.exception.MsalClientException: MSAL failed to communicate to Broker.
at com.microsoft.identity.client.internal.controllers.MsalExceptionAdapter.msalExceptionFromBaseException(MsalExceptionAdapter.java:82)
at com.microsoft.identity.client.SingleAccountPublicClientApplication$1.onError(SingleAccountPublicClientApplication.java:122)
at com.microsoft.identity.client.SingleAccountPublicClientApplication$1.onError(SingleAccountPublicClientApplication.java:111)
at com.microsoft.identity.common.internal.controllers.CommandDispatcher$2.run(CommandDispatcher.java:177)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)`
To Reproduce Steps to reproduce the behavior:
-
Microsoft Authenticator as the broker app
-
Perform acquireTokenSilent() using MSAL
If related to user experience, use the format:
- Go to ‘…’
- Click on ‘…’
- Scroll down to ‘…’
- See error
If related to development, please provide relevant configuration details necessary to understand your problem including any relevant traces, logs, or otherwise. The exception is seen when getAccounts() is called on a MultipleAccountPublicClientApplication
In our config file, we have and redirect_uri as
"broker_redirect_uri_registered": true
Expected behavior Account migration should be done successfully
Actual Behavior Exception is thrown
Please note: Do not include sensitive information like PII, OII, credentials, secrets, and tokens.
For privacy/security issues please see instructions here
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (5 by maintainers)
Top GitHub Comments
Synced offline and provided new build with caching fixes.
@shoatman @shahzaibj - This looks related to the logs attached (not in the description) to this work item (corpnet required): https://domoreexp.visualstudio.com/DefaultCollection/MSTeams/_workitems/edit/786557
@prmeno Is there more to these logs? Perhaps more detailed repro steps?