Skip to content
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

Can't run the application on physical iOS device #19553

Closed
MichaelSL opened this issue Dec 22, 2023 · 7 comments
Closed

Can't run the application on physical iOS device #19553

MichaelSL opened this issue Dec 22, 2023 · 7 comments
Labels
area-tooling XAML & C# Hot Reload, XAML Editor, Live Visual Tree, Live Preview, Debugging platform/iOS 🍎 potential-regression This issue described a possible regression on a currently supported version., verification pending s/triaged Issue has been reviewed s/try-latest-version Please try to reproduce the potential issue on the latest public version t/bug Something isn't working

Comments

@MichaelSL
Copy link

Description

I've updated my M2 Mac Mini to the latest Sonoma and I can't debug my application anymore. Application builds, deploys, launches, and never passes splash screen.
Visual Studio has "The app has been terminated." in Debug Output.

I've tried to create a new MAUI app and the result is the same.

It works with iOS simulator.

I tried to do the same thing on the Mac itself using Rider and I got a deployment error. So I assume it's not a VS issue.

Workloads list:

Installed Workload Id      Manifest Version       Installation Source
---------------------------------------------------------------------
android                    34.0.52/8.0.100        VS 17.9.34407.89
ios                        17.0.8490/8.0.100      VS 17.9.34407.89
maui-windows               8.0.3/8.0.100          VS 17.9.34407.89
maccatalyst                17.0.8490/8.0.100      VS 17.9.34407.89

Steps to Reproduce

  1. Create new MAUI project
  2. Connect VS to Mac build host
  3. Start debugging

Expected outcome: app starts and debugger attaches
Outcome: app starts, but gets terminated on a splashscreen

Link to public reproduction project repository

No response

Version with bug

Unknown/Other

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

8.0.3

Affected platforms

iOS

Affected platform versions

iOS 17

Did you find any workaround?

no

Relevant log output

Build log:

Launching 'MauiApp1' on 'Michael’s iPhone SE'...
Launching...
Xamarin.Hosting: Device discovery started
Using Xcode 15.0 found in /Applications/Xcode.app/Contents/Developer
Xamarin.Hosting: Device discovery event: Connected (00008030-001428D23AE8C02E)
Xamarin.Hosting: Connected to Michael???s iPhone SE (00008030-001428D23AE8C02E) in 00:00:00.0037840
Xamarin.Hosting:     Xcode: /Applications/Xcode.app
Xamarin.Hosting:     Version: 699ed5eaf2 (refs/heads/main)
Xamarin.Hosting: Xamarin.Hosting
Xamarin.Hosting:     Verbosity: 1
Xamarin.Hosting:     Xcode Version: 15.0
xcrun devicectl -j /var/folders/m0/668nqyl96k3g67lblgmv86yh0000gn/T/tmpUNEYBe.tmp -v device info lockState --device "Michael???s iPhone SE"
	? unlockedSinceBoot: true
	? passcodeRequired: false
	Saving JSON output file to /var/folders/m0/668nqyl96k3g67lblgmv86yh0000gn/T/tmpUNEYBe.tmp
	Command Completed, took 0.387 seconds
	? deviceIdentifier: 32C0EFC3-BB80-4F6C-AA6D-79F011142A52
	2023-12-22 01:07:28.739-0700  Acquired usage assertion.
	2023-12-22 01:07:28.738-0700  Acquired tunnel connection to device.
	Current device lock state:
	Using verbose logging.
xcrun devicectl -j /var/folders/m0/668nqyl96k3g67lblgmv86yh0000gn/T/tmph4l3pr.tmp -v device process launch --terminate-existing --device "Michael???s iPhone SE" com.companyname.mauiapp1 --monodevelop-port 10000 --connection-mode usb
	Command Completed, took 0.403 seconds
	Saving JSON output file to /var/folders/m0/668nqyl96k3g67lblgmv86yh0000gn/T/tmph4l3pr.tmp
	Launched application with com.companyname.mauiapp1 bundle identifier.
	2023-12-22 01:07:29.477-0700  Acquired usage assertion.
	2023-12-22 01:07:29.302-0700  Acquired tunnel connection to device.
	2023-12-22 01:07:29.303-0700  Enabling developer disk image services.
	Using verbose logging.
The app 'com.companyname.mauiapp1' launched with pid 9774
Launch succeeded. The app 'MauiApp1' has been successfully launched on 'Michael’s iPhone SE'.

Debug log:

The app has been terminated.
@MichaelSL MichaelSL added the t/bug Something isn't working label Dec 22, 2023
@HansenPeter
Copy link

I tried to do the same thing on the Mac itself using Rider and I got a deployment error. So I assume it's not a VS issue.

There is currently a bug in the latest Rider release (2023.3.2), preventing iOS from launching.
It gives a generic "Deployment failed. See deployment output for details." error, so if this is what you're experincing on Rider, you could try downgrading to 2023.3.1 to see if the issue is still present - otherwise it might be configuration/VS related

@MichaelSL
Copy link
Author

Ok, so issues on the Mac (rider IDE) and Windows (VS IDE) are most likely not connected.

I didn't change any VS settings since I was able to debug several days ago.

@MichaelSL
Copy link
Author

Also tried to run from Mac with VSCode and it works. So this issue is most likely VS related

@SupermindPT
Copy link

There is a known issue that causes long build times when deploying to iOS, and because iOS terminates the app after 20 seconds or so we are stuck at the splashscreen before the app is terminated. Github issue

@MichaelSL
Copy link
Author

I think this is something else. iOS is slow to start under debug, but empty new app should be able to launch (also my app was working fine before and there were no significant changes made).

I've found this thread on VS feedback forum, it seems like a regression in VS.

@samhouts samhouts added potential-regression This issue described a possible regression on a currently supported version., verification pending area-tooling XAML & C# Hot Reload, XAML Editor, Live Visual Tree, Live Preview, Debugging labels Jan 2, 2024
@Zhanglirong-Winnie Zhanglirong-Winnie added s/triaged Issue has been reviewed s/try-latest-version Please try to reproduce the potential issue on the latest public version labels Mar 7, 2024
@Zhanglirong-Winnie
Copy link
Collaborator

Verified this issue with Visual Studio 17.10.0 Preview 1. Not repro on iOS device. I tried M2's Sonoma and Ventura systems, and they were both successfully deployed.

@MichaelSL
Copy link
Author

It works with VS after the VS update. Didn't try Rider yet. Will try and post here.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-tooling XAML & C# Hot Reload, XAML Editor, Live Visual Tree, Live Preview, Debugging platform/iOS 🍎 potential-regression This issue described a possible regression on a currently supported version., verification pending s/triaged Issue has been reviewed s/try-latest-version Please try to reproduce the potential issue on the latest public version t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants