-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maui Blazor Hybrid app crashes on connected device after splash screen, but works on simulator #105421
Comments
Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! Closed similar issues:
|
FWIW, I went ahead and created a brand new Maui blazor hybrid app, completely boilerplate and just changed the app identifier to match my in progress app. Exact same thing happened. Goes to splash screen, crashes out. This is without a single other CSProj modification other than the package identifier.
|
One other update. I updated the boilerplate/template blazor maui hybrid to .net core 8.0 and now it gets past the splash screen but just hangs on a white screen. In this case, here's the log output:
|
Last update - tested by using a non-blazor hybrid app (XAML) - same result using the bolierplate template. |
@rolfbjarne thoughts? |
@rolfbjarne @PureWeen? Sorry, don't want to bug you guys too much, but I've been trying to get this going still, no luck. |
@jeffschwMSFT I was able to get my device connected to my laptop to test with a direct connected device. Here's the logs that come up after the splash screen appears and we go right to the white screen: Here are the unique errors extracted from the provided log: Failed to force load assembly - System.Security.AccessControl.dll Type: System.Security.Policy.Evidence Type: System.Security.AccessControl.AuthorizationRuleCollection Type: System.Security.AccessControl.PrivilegeNotHeldException Type: System.IO.FileSystemWatcher Type: System.IO.InternalBufferOverflowException Type: System.Net.Quic.QuicClientConnectionOptions Type: System.Net.Quic.QuicListenerOptions Type: System.Net.Quic.QuicReceiveWindowSizes Type: System.Net.Quic.QuicServerConnectionOptions Type: Microsoft.Win32.SafeHandles.SafeAccessTokenHandle Type: System.Security.Principal.IdentityNotMappedException Type: System.Security.Principal.IdentityReferenceCollection Type: System.IO.Pipes.PipeSecurity Type: Microsoft.Win32.SafeHandles.SafeRegistryHandle Type: System.Security.AccessControl.RegistrySecurity Type: System.Runtime.InteropServices.JavaScript.JSExportAttribute Details: Could not load file or assembly '/var/mobile/Containers/Data/Application/9089F844-7390-4E2B-B8DB-E5A41A0088B4/Documents/AbMobileMaui.content/Microsoft.VisualStudio.DesignTools.MobileTapContracts.dll' or one of its dependencies. Details: Could not load file or assembly '/var/mobile/Containers/Data/Application/9089F844-7390-4E2B-B8DB-E5A41A0088B4/Documents/AbMobileMaui.content/Microsoft.VisualStudio.DesignTools.TapContract.dll' or one of its dependencies. Message: You've implemented -[ application:performFetchWithCompletionHandler:], but you still need to add "fetch" to the list of your supported UIBackgroundModes in your Info.plist. |
@mattleibow so I have a bit more info here - it seems it's iOS18. I just tested the app on an iOS 17 device and it loads fine. That itself is still concerning though, because iOS 18 will be available to the public in 2 months, so whatever this issue is really needs to be fixed before iOS goes gold. |
@Redth Could you help us get this triaged from the MAUI side of things first to see it can be narrowed down? |
@rolfbjarne @dalexsoto could you help take a look? |
This is fixed in .NET 9 Preview 7 once it is released, this goes back to #105813 |
@dalexsoto I'm not 100% convinced - this error is occurring on my testflight build in release mode as well. The exact same build works fine from testflight on iOS 17, but the error occurs on iOS 18. |
I will of course try it on Preview 7, but if it's a matter of release vs debug, my error occurs on both. |
@caliberdigitalllc fair enough, I'll re-open this and you let us know :) |
Thanks man. Not trying to doubt you in any way, but I do think this fix needs to be validated on a testlight release build to be sure. FWIW, here's my release build command for test flight:
|
If it's the same issue as #105813, I believe it can happen even in Release if you use |
This sort of speaks to requesting better documentation on what flags should be set for all of the target systems and release types, like what are the "best setups" in the CSProj for each. |
hello @caliberdigitalllc! Regarding the "best setups", ideally when you target iOS platforms you shouldn't have to enable intepreter and the default setting of the project file would give you the best performance. However, it is possible that some apps or referenced nuget packages are not AOT-compatible (require dynamic code) for which the AOT compiler is not able to generate code ahead of time. For such apps, enabling the interpreter is needed as otherwise the app would crash during runtime. This is documented in: https://learn.microsoft.com/en-us/dotnet/maui/macios/interpreter?view=net-maui-8.0 Unfortunately, it seems that you are experiencing a bug with our previous .NET9 preview releases which made these configurations additionally confusing. As @dalexsoto mentioned, we fixed this for our next release and will validate it once it is out. |
Thanks @ivanpovazan :) I'll look forward to trying again in a week or two when P7 comes out. |
@caliberdigitalllc preview 7 is now publicly available https://dotnet.microsoft.com/en-us/download/dotnet/9.0 I verified that the template hybrid blazor app does not crash on startup in Release mode when |
Yep! I should be pushing a fresh build out in the next couple of days compiled on P7. I'll let you know. |
This issue has been marked |
Preview 7 fixed this, thank you! |
Description
Hey all,
Been fighting with this for a while now. My app works fine on mac os, but on ios it only works on the simulator.
The same error occurs whether I send it to test flight or use a connected ios device (connected to a mac on my network)
It crashes after the splash screen displays.
Here is my debug config for ios:
Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
9.0.0-preview.6.24327.7
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
17+
Did you find any workaround?
no
Relevant log output
The text was updated successfully, but these errors were encountered: