question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fatal Exception: java.lang.ClassCastException

See original GitHub issue

Describe the bug We’re having this exception reported by crashlytics on the latest MSAL version (2.0.4):

Fatal Exception: java.lang.ClassCastException: java.util.concurrent.ExecutionException cannot be cast to com.microsoft.identity.common.exception.BaseException
       at com.microsoft.identity.client.PublicClientApplication$16.onError(PublicClientApplication.java:1738)
       at com.microsoft.identity.common.internal.controllers.CommandDispatcher.commandCallBackOnError(CommandDispatcher.java:256)
       at com.microsoft.identity.common.internal.controllers.CommandDispatcher.access$900(CommandDispatcher.java:74)
       at com.microsoft.identity.common.internal.controllers.CommandDispatcher$2$1.run(CommandDispatcher.java:241)
       at android.os.Handler.handleCallback(Handler.java:739)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at android.os.Looper.loop(Looper.java:145)
       at android.app.ActivityThread.main(ActivityThread.java:5835)
       at java.lang.reflect.Method.invoke(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:372)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)

it seems to be a cast exception caused by some newly thrown exception. Could you guys have a look?

Smartphone (please complete the following information):

  • Device: Galaxy S5
  • Android Version: 5.0
  • MSAL Version: 2.0.4

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
leonardochiarandacommented, Dec 11, 2020

@iambmelt Thanks for the release date info. We’ll keep track of it when the time comes.

1reaction
iambmeltcommented, Dec 10, 2020

Thanks for confirming @xyzwilliamxyz

@gitaumoses4 and I took a peek at this together; we have indeed developed a fix for this crash already in https://github.com/AzureAD/microsoft-authentication-library-common-for-android/pull/1121 and it will be released in a future release of MSAL. This fix was developed for common@3.0.7; MSAL 2.0.4 consumes 3.0.6 – that is why you continue to see this crash in your telemetry.

This fix will ship in the January 2021 timeframe

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fatal Exception - java.lang.ClassCastException - Stack Overflow
1 Answer 1 ... The method getColumnIndexOrThrow is undefined for LauncherActivity.ListItem. How should I change this? ... If you just want the row ......
Read more >
ClassCastException - Android Developers
On this page; Summary. Public constructors; Inherited methods. Public constructors. ClassCastException; ClassCastException. Android Developers.
Read more >
Handling the ClassCastException Runtime Exception in Java
As its name implies, ClassCastException is an exception that happens when the JVM tries to cast an object to a class (or in...
Read more >
java.lang.ClassCastException thrown in a class's constructor ...
Our app is hitting a crash in builds minified with R8. 2021-11-05 18:51:46.111 13346-13346/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.
Read more >
Fatal Exception: java.lang.ClassCastException: android ...
Operating systems only 8.0.0 Fatal Exception: java.lang.ClassCastException: android.system.UnixSocketAddress cannot be cast to java.net.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found