Closed wylzt8384 closed 2 years ago
add more detailed traces.
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.support.customtabs.CustomTabsSession android.support.customtabs.CustomTabsClient.newSession(android.support.customtabs.CustomTabsCallback)' on a null object reference
at com.microsoft.identity.common.internal.ui.browser.CustomTabsManager.bind(CustomTabsManager.java:108)
at com.microsoft.identity.common.internal.ui.browser.BrowserAuthorizationStrategy.requestAuthorization(BrowserAuthorizationStrategy.java:79)
at com.microsoft.identity.common.internal.providers.oauth2.OAuth2Strategy.requestAuthorization(OAuth2Strategy.java:93)
at com.microsoft.identity.client.internal.controllers.LocalMSALController.performAuthorizationRequest(LocalMSALController.java:124)
at com.microsoft.identity.client.internal.controllers.LocalMSALController.acquireToken(LocalMSALController.java:99)
at com.microsoft.identity.client.internal.controllers.MSALInteractiveTokenCommand.execute(MSALInteractiveTokenCommand.java:60)
at com.microsoft.identity.client.internal.controllers.MSALApiDispatcher$1.run(MSALApiDispatcher.java:70)
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:764)
Thank you for providing the trace information and reporting this issue; we'll prioritize and investigate accordingly.
I created a brand new Nougat (API 24) emulator to test out an unrelated crash and got a crash with this stacktrace:
E/LoginActivity$authenticationCallback: Authentication error
com.microsoft.identity.client.exception.MsalClientException: Attempt to invoke virtual method 'androidx.browser.customtabs.CustomTabsSession androidx.browser.customtabs.CustomTabsClient.newSession(androidx.browser.customtabs.CustomTabsCallback)' on a null object reference
at com.microsoft.identity.client.internal.controllers.ExceptionAdapter.msalExceptionFromException(ExceptionAdapter.java:108)
at com.microsoft.identity.client.internal.controllers.MSALApiDispatcher$1.run(MSALApiDispatcher.java:81)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'androidx.browser.customtabs.CustomTabsSession androidx.browser.customtabs.CustomTabsClient.newSession(androidx.browser.customtabs.CustomTabsCallback)' on a null object reference
at com.microsoft.identity.common.internal.ui.browser.CustomTabsManager.bind(CustomTabsManager.java:108)
at com.microsoft.identity.common.internal.ui.browser.BrowserAuthorizationStrategy.requestAuthorization(BrowserAuthorizationStrategy.java:79)
at com.microsoft.identity.common.internal.providers.oauth2.OAuth2Strategy.requestAuthorization(OAuth2Strategy.java:93)
at com.microsoft.identity.client.internal.controllers.LocalMSALController.performAuthorizationRequest(LocalMSALController.java:124)
at com.microsoft.identity.client.internal.controllers.LocalMSALController.acquireToken(LocalMSALController.java:99)
at com.microsoft.identity.client.internal.controllers.MSALInteractiveTokenCommand.execute(MSALInteractiveTokenCommand.java:60)
at com.microsoft.identity.client.internal.controllers.MSALApiDispatcher$1.run(MSALApiDispatcher.java:70)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
Currently using v0.2.2 of the library
@joshfriend do you still encounter this issue with the latest version?
@heidijinxujia I have met the same problem today with 0.2.2 version. Using Samsung Note 9 with Android P.
I have not been able to upgrade to the v0.3.1-alpha tag because of the large amount of breaking api changes. I'm also holding off on updating until the synchronous APIs are available.
Assigning @shahzaibj -- if you have capacity, can you examine the v1.0.0 for bugs here and close if this doesn't appear to be an issue or repro?
When Attempt to using MSAL acquireToken method, the flow always end up with NullPointerException, please check below. Attempt to invoke virtual method 'ar ao.a(an)' on a null object reference :android.support.customtabs.CustomTabsSession newSession(android.support.customtabs.CustomTabsCallback)
seems it is like a ChromeTab usage problem.
Notes: If we select to ‘always use Chrome’ as the default browser for any URL access in another App, the problem disappear. That’s, the problem happens in the scenario of the S9+ default browser.