The Blazor part of the UI just stops working.
The app works fine on ios & windows just not android.
It seems to work momentarily for varying lengths of time but not more than a minute and then just becomes unresponsive.
The debug output looks like this:
[DOTNET] Debug: No cached file to process.
[DOTNET] Debug: Worker signal triggered: flushing cached envelopes.
[DOTNET] Debug: No cached file to process.
[chromium] [ERROR:ssl_client_socket_impl.cc(983)] handshake failed; returned -1, SSL error code 1, net_error -2
Thread finished: <Thread Pool> #7
Thread finished: <Thread Pool> #8
Thread finished: <Thread Pool> #5
The thread 0x7 has exited with code 0 (0x0).
The thread 0x8 has exited with code 0 (0x0).
The thread 0x5 has exited with code 0 (0x0).
[DOTNET] Debug: Unable to find scroll target. No breadcrumb captured.
[chatty] uid=10585(app.name) identical 30 lines
[DOTNET] Debug: Unable to find scroll target. No breadcrumb captured.
[DOTNET] Debug: Unable to find scroll target. No breadcrumb captured.
[chatty] uid=10585(app.name) identical 3 lines
[DOTNET] Debug: Unable to find scroll target. No breadcrumb captured.
[DOTNET] Debug: Unable to find scroll target. No breadcrumb captured.
[chatty] uid=10585(app.name) identical 2 lines
[DOTNET] Debug: Unable to find scroll target. No breadcrumb captured.
[app.name] No package ID ff found for ID 0xffffffff.
Then often when I click something this gets printed to the debug output No package ID ff found for ID 0xffffffff.
Googling around for that error a lot of the fixes reference updating android version. My physical device is running Android 10.0 - API 29 whilst the emulator is Android. Just updated my device to Android 11.0 and API 30, same problems.
It's most confusing because there's nothing consistent about the failures. Sometimes it crashes, sometimes it works for a minute before becoming blazor stuff becomes unresponsive, sometimes the UI freezes entirely. Sometimes I get that error when I click things, sometimes no output at all.
The only thing that I can think is that there must be some threading issues? But I'm not explicitly doing multi threading. I tried changing the startup page to the simplest page possible and it's still happening.
I'm currently trying to reproduce the problem in another .net maui project and slowly moving bits of functionality across but lord it's painful, any theories even would be appreciated.
Some other suspicious debug output that occasionally happens:
[Choreographer] Frame time is 0.184582 ms in the future! Check that graphics HAL is generating vsync timestamps using the correct timebase.
[chromium] [INFO:CONSOLE(1)] "Uncaught ReferenceError: none is not defined", source: https://0.0.0.0/places (1)
[Choreographer] Skipped 2364 frames! The application may be doing too much work on its main thread.
[Activity] Slow Operation: Activity app.name/crc64fcc440589469de96.MainActivity onActivityResult took 39379ms
Update
It seems to work fine in an android emulator ON A MAC... must be something to do with my .net environment on my PC. Perhaps un-coincidentally my previous SO question was related to .net 7 breaking MAUI....
Update 2
Publishing the android app from my Mac doesn't work. The app just crashes on launch.
I also can't run it in release mode on the emulator, I get the error: The "AndroidSignPacakge" task was not given a value for the required parameter "KeyPass". Googling this error returns 0 results, I tried to run it from the command line and supply the parameter like so:
dotnet run -f:net6.0-android -c:Release /p:AndroidSigningKeyPass=mypassword /p:AndroidSigningStorePass=mypassword /p:KeyPass=mypassword
but I still get the same error. Further, there's no option to run on a local android device on Mac. So how do I get the crash log / figure why it's crashing?