Bug 22797 - Getting "Failed to start application on the target simulator" when trying to launch application
Summary: Getting "Failed to start application on the target simulator" when trying to ...
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: General ()
Version: 3.5
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2014-09-09 15:49 UTC by Alexandre Pepin
Modified: 2015-10-06 17:00 UTC (History)
7 users (show)

Is this bug a regression?: ---
Last known good build:

mtbserver.log (3.98 KB, application/octet-stream)
2014-09-09 15:50 UTC, Alexandre Pepin
Logs from above desk case (138.18 KB, application/zip)
2014-10-13 16:50 UTC, Jon Goldberger [MSFT]

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Alexandre Pepin 2014-09-09 15:49:12 UTC
See the attached sample project. When trying to debug, I'm getting "Failed to start application on the target simulator" and it doesn't run.

To reproduce :

1. Open the attached solution
2. Click start

I also attached the mtbserver.log

I'm having a lot of trouble with your latest version of Xamarin....
Xamarin (2db5ccd228887372e207e112bc3b5f1b16b24293)
Comment 1 Alexandre Pepin 2014-09-09 15:50:05 UTC
Created attachment 7974 [details]
Comment 2 Alexandre Pepin 2014-09-09 15:53:49 UTC
Here's the attached project : https://www.dropbox.com/s/vf0wu072v8r9pjf/iPadTest.zip?dl=0
Comment 3 Ram Chandra 2014-09-10 06:19:47 UTC
I have checked this issue with attached sample and I am not getting any error.  I am unable to reproduce this, we may have to see if a developer can figure out what's going on from the logs. 

Steps I followed:

1. Clean the attached project.
2. Debug the project to iPad iOS 7.1 simulator.

Screencast: http://www.screencast.com/t/8rRCavTvpN9

Environment Info:

Windows Info:

Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.50938
Installed Version: Professional
Xamarin (2db5ccd228887372e207e112bc3b5f1b16b24293)

Mac Info:

Mac OS X 10.9.3
Mono 3.8.0 ((no/0806328)	
Xcode 5.1 (5084)
Xamarin.iOS : (Enterprise Edition)
Comment 4 Alexandre Pepin 2014-09-10 09:39:49 UTC
I tried with the new version of Xamarin (Xamarin (3f0c2c501a1c42ac9d362dd1970c001bdce7ce6b) and I'm still getting the same error

Screencast : http://screencast-o-matic.com/watch/c2Q6IAnRaZ
Comment 5 John Miller [MSFT] 2014-09-10 15:05:55 UTC
I have also got this issue with 3.5.57. The more detail error message was:

error MT1008: Failed to launch the simulator: Could not find a part of the path "/Users/johnmiller/Library/Caches/Xamarin/mtbs/builds/{project name}/191cfb4b64c214de83395c52d260e93a/bin/iPhoneSimulator/Debug/simulator-config".

Deleting the "bin" and "obj" folders in by project resolved the issue for the next time I tried to deploy.
Comment 8 Jon Goldberger [MSFT] 2014-10-13 16:53:08 UTC
Comments from another customer, noted above in private comments 6 & 7) who may be hitting this bug:

we have problems to start the iOS simulator from Visual Studio.

That happens since we have installed the latest version.

We see any error message, but visual studio remains blocked when we try to build a project. We can't neither start the simulator from the menu above (TOOLS->IOS->Show iOS Simulator). In this case, we see the error "Failed to show simulator on build server".

It works if we reset settings and content from the simulator. (We open Xcode, start the simulator, and click on Reset settings and content). Sometimes it resolves the problem, if we restart Visual Studio after doing that. Sometimes we have to do it several times.

Once it works, we can build and deploy one or two times. After that, it is blocked again.
Comment 9 Jatin 2014-11-04 06:39:37 UTC
I have tried to reproduce this issue at my end and I could successfully able to reproduce this issue for the first time I debug the attached project as per comment #2.

However, when I cleaned the project and start debugging again, the next it successfully deployed the project on the build host on the iPad simulator.

I used the latest stable builds and VS 2012 for the same.

Below is the supplement information:

mtbserver logs: https://gist.github.com/Mohit-Kheterpal/20a22cd012edde9bee36
VS Logs: https://gist.github.com/saurabh360/b6654bcea1960671d569

Build information:

VS 2012
XVS 3.7.248
Build Host: Xamarin.iOS

As of now confirming this issue, considering it as an intermittent issue.
Comment 10 Joaquin Jares 2015-10-06 17:00:09 UTC
We made a lot of performance and stability improvements on this part of the code, now available in alpha and this issue may have been fixed as a consequence of that. Marking as fixed for verification, feel free to reopen if this is still an issue.