maui
                                
                                
                                
                                    maui copied to clipboard
                            
                            
                            
                        [IOS] Maui .NET 8 (VS 2022 17.9.6) The app has been terminated when start debugging
Description
Default template MAUI app debug is crashing after splash screen on iPhone (iOS 15.8.2) "The app has been terminated."
Steps to Reproduce
- Default MAUI app.
 - Debug it on iOS device.
 
Link to public reproduction project repository
No response
Version with bug
8.0.21 SR4.1
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
iOS 15.8.2
Did you find any workaround?
No
Relevant log output
The app has been terminated.
                                    
                                    
                                    
                                
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:
- [IOS] Maui .NET 8 The app has been terminated when start debugging (#19358), similarity score: 0.85
 - Can't run the application on physical iOS device (#19553), similarity score: 0.84
 - [IOS] Maui .Net7 Debug Crashing on Physical Device - The app has been terminated. (#11324), similarity score: 0.84
 - Integrated Hello World Maui startup project crashes after splashscreen on iOS 16.5.1 and .NET8.0 in release mode. (#19522), similarity score: 0.83
 - [regression/8.0.0-rc.2.9511] [iOS] Can't debug or deploy to a physical device (#18528), similarity score: 0.82
 
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Thanks for the issue report @MaheshTFS! This issue appears to be a problem with Visual Studio, so we ask that you use the VS feedback tool to report the issue. That way it will get to the routed to the team that owns this experience in VS.
If you encounter a problem with Visual Studio, we want to know about it so that we can diagnose and fix it. By using the Report a Problem tool, you can collect detailed information about the problem, and send it to Microsoft with just a few button clicks.
- Go to the Visual Studio for Windows feedback tool or Visual Studio for Mac feedback tool to report the issue
 - Close this bug, and consider adding a link to the VS Feedback issue so that others can follow its activity there.
 
Thanks for the issue report @MaheshTFS! This issue appears to be a problem with Visual Studio (Code), so we ask that you use the VS feedback tool to report the issue. That way it will get to the routed to the team that owns this experience in VS (Code).
If you encounter a problem with Visual Studio or the .NET MAUI VS Code Extension, we want to know about it so that we can diagnose and fix it. By using the Report a Problem tool, you can collect detailed information about the problem, and send it to Microsoft with just a few button clicks.
- Go to the Visual Studio for Windows feedback tool or .NET MAUI VS Code Extension repository to report the issue
 - Close this bug, and consider adding a link to the VS Feedback issue so that others can follow its activity there.
 
Has the same issue.
Trying to debug (throught usb) maui app on IPad (5th generation, IOS 16.7.7) using Visual Studio 17.9.6 on Windows. Output log on first my computer:
The app has been terminated
Output log on second my computer:
13:03:11:977	Loaded assembly: /private/var/containers/Bundle/Application/65DE3163-8BF3-4911-839A-762447AB7D13/MauiExample.app/System.Private.CoreLib.dll [External]
13:03:12:032	Loaded assembly: /private/var/containers/Bundle/Application/65DE3163-8BF3-4911-839A-762447AB7D13/MauiExample.app/Microsoft.iOS.dll [External]
13:03:12:032	Loaded assembly: /private/var/containers/Bundle/Application/65DE3163-8BF3-4911-839A-762447AB7D13/MauiExample.app/System.Runtime.dll [External]
13:03:12:032	Loaded assembly: /private/var/containers/Bundle/Application/65DE3163-8BF3-4911-839A-762447AB7D13/MauiExample.app/System.Collections.dll [External]
13:03:12:095	Loaded assembly: /private/var/containers/Bundle/Application/65DE3163-8BF3-4911-839A-762447AB7D13/MauiExample.app/System.Runtime.InteropServices.dll [External]
13:03:12:095	Loaded assembly: /private/var/containers/Bundle/Application/65DE3163-8BF3-4911-839A-762447AB7D13/MauiExample.app/System.Threading.Thread.dll [External]
13:03:12:159	Loaded assembly: /private/var/containers/Bundle/Application/65DE3163-8BF3-4911-839A-762447AB7D13/MauiExample.app/System.Threading.dll [External]
13:03:12:256	Loaded assembly: /private/var/containers/Bundle/Application/65DE3163-8BF3-4911-839A-762447AB7D13/MauiExample.app/System.Net.Http.dll [External]
13:03:12:316	Loaded assembly: /private/var/containers/Bundle/Application/65DE3163-8BF3-4911-839A-762447AB7D13/MauiExample.app/System.Net.Primitives.dll [External]
13:03:13:051	Loaded assembly: /private/var/containers/Bundle/Application/65DE3163-8BF3-4911-839A-762447AB7D13/MauiExample.app/System.Numerics.Vectors.dll [External]
13:03:22:632	Loaded assembly: /private/var/containers/Bundle/Application/65DE3163-8BF3-4911-839A-762447AB7D13/MauiExample.app/System.Net.Sockets.dll [External]
13:03:22:686	Loaded assembly: /private/var/containers/Bundle/Application/65DE3163-8BF3-4911-839A-762447AB7D13/MauiExample.app/System.Drawing.Primitives.dll [External]
13:03:22:686	Loaded assembly: /private/var/containers/Bundle/Application/65DE3163-8BF3-4911-839A-762447AB7D13/MauiExample.app/System.Private.Uri.dll [External]
13:03:31:844	The app has been terminated
                                    
                                    
                                    
                                
This seems like a duplicate of #11392.
@MaheshTFS @alex-dubatov I listed some things that might be able to help get around this here: https://github.com/dotnet/maui/issues/11392#issuecomment-2069827471
@bzd3y Thanks for the advice! Nothing helps.
Build log:
11:50:52:600	1>------ Deploy started: Project: MauiExample, Configuration: Debug Any CPU ------
11:50:52:654	1>Starting deploy 'MauiExample' into the device 'iPad (Pro) - real'...
11:50:52:717	1>Deploying 'MauiExample.app' into the device 'iPad (Pro) - real'...
11:51:12:591	1>Deploy succeeded. The app 'MauiExample.app' has been successfully deployed on iPad (Pro) - real.
11:51:12:601	========== Deploy: 1 succeeded, 0 failed, 0 skipped ==========
11:51:12:601	========== Deploy completed at 11:51 AM and took 20.027 seconds ==========
11:51:12:865	Launching 'MauiExample' on 'iPad (Pro) - real'...
11:51:12:946	Connecting iOS Debugger to 'iPad (Pro) - real' over USB on port 10000...
11:51:15:493	Connected iOS Debugger to 'iPad (Pro) - real' over USB on port 10000
11:51:15:493	Connecting iOS Debugger to 'iPad (Pro) - real' over USB on port 10000...
11:51:15:493	Connecting iOS Debugger to 'iPad (Pro) - real' over USB on port 10000...
11:51:15:493	Connected iOS Debugger to 'iPad (Pro) - real' over USB on port 10000
11:51:15:493	Reading from debug console stream...
11:51:15:493	Reading from device stream...
11:51:15:493	Reading from machine (TCP) stream...
11:51:15:493	Connected iOS Debugger to 'iPad (Pro) - real' over USB on port 10000
11:51:15:493	Connected IDB.Local to Debugger port 55968
11:51:15:493	Please launch the application 'MauiExample' on the device 'iPad (Pro) - real' to continue. For the first launch, if the application does not show up, please reboot your device.
11:51:35:805	Closing debug communication from device stream
11:51:35:819	Error writting to debug stream. Details: Cannot access a disposed object.
11:51:35:819	Object name: 'AppleDeviceUsbStream'.
11:51:35:907	Closing debug communication from machine (TCP)
11:51:35:907	Cannot read from machine (TCP) stream anymore...
                                    
                                    
                                    
                                
@alex-dubatov from the build output I see you are using Hot Restart (iOS device connected directly to Windows). As this is a tooling issue, could you report it from inside VS -> Help -> Send Feedback -> Report a problem
@MaheshTFS Are you also trying to debug using Hot Restart by plugging your device to your Windows PC?
@emaf looks like issue is already exists https://developercommunity.visualstudio.com/t/cant-debug-with-Maui--iOS-iPad-physical/10632315?q=maui+ios+debug&ref=native&refTime=1716021583535&refUserId=5dd9c650-854b-62f7-8920-d90490483bd9
@alex-dubatov If you haven't done already, could you please upvote it?
I'm closing this in favor of the issue you linked.