[MSAL Plugin] Fatal error when trying to sign in

Forge Component
Published on 27 May by Walter Robins
2 votes
Published on 27 May by Walter Robins

When I try to sign in on the demo app, the app crashes and the following error is reported in the log.

A fatal error has occurred. Please contact OutSystems support: Failed resolution of: Landroidx/browser/customtabs/CustomTabsServiceConnection;


java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/browser/customtabs/CustomTabsServiceConnection;
at com.microsoft.identity.common.internal.ui.browser.BrowserAuthorizationStrategy.requestAuthorization(BrowserAuthorizationStrategy.java:85)
at com.microsoft.identity.common.internal.providers.oauth2.OAuth2Strategy.requestAuthorization(OAuth2Strategy.java:97)
at com.microsoft.identity.client.internal.controllers.LocalMSALController.performAuthorizationRequest(LocalMSALController.java:171)
at com.microsoft.identity.client.internal.controllers.LocalMSALController.acquireToken(LocalMSALController.java:111)
at com.microsoft.identity.common.internal.controllers.InteractiveTokenCommand.execute(InteractiveTokenCommand.java:57)
at com.microsoft.identity.common.internal.controllers.ApiDispatcher$3.run(ApiDispatcher.java:192)
at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:784)
Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.browser.customtabs.CustomTabsServiceConnection" on path: DexPathList[[zip file "/data/app/com.borealisgroup.myappsdev.MSALPluginDemo-LpaYMwNIkbgFtjDWIqgInw==/base.apk"],nativeLibraryDirectories=[/data/app/com.borealisgroup.myappsdev.MSALPluginDemo-LpaYMwNIkbgFtjDWIqgInw==/lib/arm64, /data/app/com.borealisgroup.myappsdev.MSALPluginDemo-LpaYMwNIkbgFtjDWIqgInw==/base.apk!/lib/arm64-v8a, /system/lib64, /product/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 10 more

In the configuration I've defined the Tenant_ID and Client_Id but not the Key_Hash because I'm not using a keystore. Is this issue caused by not defining the Key_Hash or is your plugin still trying to call an AndroidX class?


Thanks for providing this component to the Forge, was really looking for a followup on the ADAL plugin.

Unfortunately I am having the same issue as mentioned above on a Android 10 device (Samsung S10E). Crashreport from adb logcat attached. I used version 1.1.1 of this component, and have built the demo app with ClientId as only variable.

Could you have a look at the AndroidX reference? Thanks in advance.


Hi Christopher and Rob,

Thank you for your feedback and I apologize for this issue. I have just fixed it in my latest release, so you can either update your plugin in Service Studio, or achieve the same effect by simply updating your extensibility configuration for the plugin to point to https://github.com/wrobins/cordova-plugin-msal.git#OutSystems-v1.1.2

Then, re-generate your mobile apps and try again. Please let me know if that gets it working for you.

Happy weekend and hope you are staying safe!


Thank you Walter, I'm now able to sign in!

Great news! Glad I was able to help.