Bug 18699 - [Ad-hoc] Failed to start application on the target device
Summary: [Ad-hoc] Failed to start application on the target device
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 1.12.x
Hardware: PC Windows
: High normal
Target Milestone: 3.1
Assignee: dean.ellis
Depends on:
Reported: 2014-04-01 10:26 UTC by narayanp
Modified: 2014-06-05 10:54 UTC (History)
7 users (show)

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

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 narayanp 2014-04-01 10:26:21 UTC
Steps to reproduce:
1. Open or create iOS application in VS.
2. Select configuration as Ad-hoc.
3. Connect to Build host.
4. Run the application.

Actual result: Application deployed to device but does not launch on device and showing error "Failed to start application on the target device". While using XS on Mac we are not seeing this error.

Expected result: Application should launch on device when run in Ad-hoc.

Supplement info:
Error details: https://gist.github.com/saurabh360/34dc99d2099fd2649d39
Solution Output: https://gist.github.com/saurabh360/4bb07a76cf13155798b5
Debug Output: https://gist.github.com/saurabh360/7e20d701f2d91e8c3f6c
Build Order Output: https://gist.github.com/saurabh360/28a28e5f74f79574705e
mtbserver log : https://gist.github.com/Mohit-Kheterpal/8e22a9fd62496d9ac9bf

Environment details:
All Windows
VS 2013/2012
Xamarin for VS 1.12.249
X.iOS 7.2.1-63

Regression Status:
Same behavior happening with stable MTVS 1.10.47
Comment 1 PJ 2014-04-01 10:37:58 UTC
This issue looks similar to https://bugzilla.xamarin.com/show_bug.cgi?id=18177

There's an expected MT1107 error when the device used is >= iOS 7.1 and the Xcode used is <5.1.

Is this the case here?
Comment 2 narayanp 2014-04-02 03:08:22 UTC
NO PJ, Here I have checked on following device

iPhone5 version 6.0.2
iPod Touch Version 6.1
iPad1 version 5.1

And used Xcode 4.6.3 and Xcode 5.1
Comment 3 narayanp 2014-04-02 03:11:09 UTC
An update to comment#2

If user run application in debug or Release mode then application deployed and launched successfully on these devices. This error only happens when run in Ad-hoc mode.
Comment 4 dean.ellis 2014-04-03 09:33:47 UTC
Can someone check the behaviour of Xamarin Studio with the Adhoc configuration. Because I get the following message when trying to run the app in Adhoc mode in XS


If VS needs to emulate this behaviour then that is fine but I don't think that can be done for the 1.12 release especially as this behaviour is the same in 1.10.
Comment 5 dean.ellis 2014-04-03 09:34:47 UTC
btw, when you do start the app as XS suggests you don't go into debug mode as far as I can see.
Comment 6 Atin 2014-04-03 11:44:01 UTC
We have checked this with:
XS 4.2.4(build 32)

With the Adhoc configuration we are successfully able to deploy the application and we are not getting any message in XS.
Comment 7 dean.ellis 2014-04-04 05:11:19 UTC
I'm running the latest Alpha XS (4.3.4) Is it possible that the behaviour in XS has changed? PJ what do we do in this case?
Comment 8 PJ 2014-04-04 11:12:14 UTC
I'm not sure why Dean and 360logica are seeing different behavior in XS on Mac (there should be no difference there between 4.2.4 and 4.3.4), but I agree with this:

> If VS needs to emulate this behaviour then that is fine but I don't think that can be done for the 1.12 release especially as this behaviour is the same in 1.10.

Especially since that's something 360logica agrees with:

> Same behavior happening with stable MTVS 1.10.47

I would like to figure out why you are seeing different behavior in XS, but for now I'm moving to 1.1x (and it will probably be moved again).

At the very least, we can get the same warning XS shows us in the cases where it can't launch on device (http://www.screencast.com/t/Mn4xwE6Ynz). Setting to CONFIRMED for that behavior.
Comment 9 dean.ellis 2014-04-22 10:57:27 UTC

I'm implementing something like this for VS when it detects a Ad-Hoc configuration is being run

Comment 10 dean.ellis 2014-04-23 05:25:30 UTC
ok new version of dialog uploaded

Comment 11 dean.ellis 2014-04-23 08:43:51 UTC
Fixed in XamarinVS/master/b020634b23

The dialog is now implemented as in XS
Comment 12 Mohit Kheterpal 2014-06-05 10:54:10 UTC
Today, I have checked this issue and now we are getting same behavior as mentioned in comment 10.

Screencast : http://screencast.com/t/uXOGj4uyMQw

Hence, Closing this issue.

Environment info :

Microsoft Visual Studio Professional 2012
Version 11.0.61030.00 Update 4
Microsoft .NET Framework
Version 4.5.50938
Xamarin (c376d19d2984310ff50a6e741e3e3e9ce4f920a5)