.NET Maui App Crashes on Android Emulator After Upgrading to .NET 8

Matt Lovell 20 Reputation points
2024-04-11T09:41:30.4866667+00:00

After upgrading my project to .NET 8 Maui, authentication type code examples (MSAL or Auth0) cause my app (running on Android 34) to crash the emulator but with no specific error message.

Other than:

Failed to clear debug property on device

Unable to terminate Android app in debugger cleanup

The issue does not occur on .NET 7 or Android 33 Emulator.

I don't know if the there is a bug with Maui, .Net 8, or Android 34, was wondering if anyone else has seen anything like this?

Developer technologies | .NET | .NET MAUI
{count} votes

Accepted answer
  1. Thorsten Fiedler 80 Reputation points
    2024-04-14T11:35:37.65+00:00

    Having exact the same issue. Creating a new maui app with core 8 - just standard template. Starting a emulator Pixel 7 pro API 34. Emulator comes up, app is compiled, pushed and started on the emulator. For a twinkel of an eye a messagebox on the emulator comes up "Waiting for ..." then everything freezes. Even after waiting for minutes. Changing to net 7 had no effect.

    After serveral tests I figured out the issue is API 34! Using API 33 works with every tested hardware template of device manager also with net 7 and 8.

    Couldn't find out what the message box means, but I think this might have to do with debugger that can not connect to the emulator vm.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.