Bug 16316 - Getting build error "Failed to run application" using Tools->Publish iOS Application
Summary: Getting build error "Failed to run application" using Tools->Publish iOS Appl...
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 1.8.x
Hardware: PC Windows
: High normal
Target Milestone: 1.12 (Merge)
Assignee: Dominique Louis
Depends on: 18677
  Show dependency tree
Reported: 2013-11-18 09:26 UTC by Nischal
Modified: 2014-04-01 10:44 UTC (History)
11 users (show)

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 Nischal 2013-11-18 09:26:48 UTC
Steps to reproduce:
1. Open VS
2. Connect VS to Build host.
3. Create or open iOS application.
4. Select configuration as Ad-Hoc and Bundle Signing Identity as Distribution. 
5. Click Start button to deploy app on device.
6. Observe that application deploy to device.
7. Select Tools->Publish iOS Application from VS.
8. Observe that Application Loader and IPA file in Finder opens on build host.

Actual Result: Getting exception as 'System.Exception: Failed to run application (Generic)'.

Expected Result: User should able to publish application.

Supplement info:
Mac Server log: https://gist.github.com/saurabh360/a4e52407111ee1766933
Debug log: https://gist.github.com/saurabh360/6c0562cb709342658381

Environment details:
All Windows
VS 2013/2012/2010
iOS for VS 1.8.365
Comment 1 Dominique Louis 2013-11-19 15:40:52 UTC
Hi Nischal,
1. Can you confirm when you do this that the IPA is actually created on the Mac side or not?
2. If instead of Clicking the Start button and you perform a Build Adhoc IPA, followed by Publish iOS Application, do you still get the same error?

Comment 2 Dominique Louis 2013-11-22 08:18:20 UTC
Hi Nishal,
  I'm trying to repro this with the latest from VS 1.10 and am unable to.
I get another error, related to code-signing, but that is normal as I don't have all my certs.

Comment 3 Mohit Kheterpal 2013-11-22 10:46:31 UTC
We have checked this issue with following builds :

VS 2013
MTVS 1.8.365

When we select 'Build adh-oc / enterprise package (IPA)' under project properties and run application in debug mode then we are able to deploy application on device and we are able to open IPA file on server using IPA file finder in VS.

But after selecting adhoc then we are unable to deploy application on device and getting provisioning profile error.

Macserver logs : https://gist.github.com/saurabh360/99b8f0855a05c6d455b7

And if instead of clicking Start button and we build adhoc IPA and then click on Publish iOS application then we are still getting the same issue.
Comment 4 PJ 2013-11-22 14:47:48 UTC
Mohit, the Mac server log here in comment 9 shows that the bundle identifier is 'com.xamarin.HelloWorld9',  which is not the bundle identifier for the Ad-Hoc distribution profile. That being said, I think you would have had to use the correct bundle ID for the Build Ad-Hoc tool, so this is an interesting result.

Can you confirm that you're using the bundle identifier for the distribution profile in both cases?
Comment 5 Mohit Kheterpal 2013-11-25 06:53:56 UTC
Today we have checked this issue with following builds :

VS 2013
MTVS 1.10.10
Mono 3.2.5

As per comment 4, After setting correct identifier with adhoc distribution now we are able to publish iOS application from VS on mac server. Hence closing this issue.
Comment 9 PJ 2014-03-31 14:13:30 UTC
This is still reported as failing during MTVS 1.12 testing, moving forward for now. It seems like there are a couple of bugs here potentially. 

There's the issue that seems resolved https://bugzilla.xamarin.com/show_bug.cgi?id=16316#c5 which is related to having information not set correctly.

Then there does seem to be another issue which is not able to be worked around (comments 6-8). Atin is going to update this bug with the current behavior and possibly file a new one if the tool is blocked from being usable at all.
Comment 10 Atin 2014-03-31 15:30:08 UTC
We are not able to Publish iOS application because of Bug 18677.
Comment 11 Daniel Cazzulino 2014-04-01 10:40:17 UTC
Check now again after fix to 18677
Comment 12 narayanp 2014-04-01 10:44:43 UTC
I have checked this issue with following build:

Xamarin for VS 1.12.249
X.iOS 7.2.1-63
VS 2013/2012

After build the application in Ad-hoc configuration on physical device, when user click Tool->Publish iOS Application, It opens 'Welcome Application Loader' window on build host. 

Hence, closing this Issue