Bug 45154 - Build Error on CopyDSYMFromMac
Summary: Build Error on CopyDSYMFromMac
Status: VERIFIED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 4.2.0 (C8)
Hardware: PC Windows
: Normal normal
Target Milestone: 4.3.0 (C9)
Assignee: Emanuel
URL:
Depends on:
Blocks:
 
Reported: 2016-10-07 09:22 UTC by erik.baum
Modified: 2017-02-07 12:23 UTC (History)
6 users (show)

Tags:
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:
Status:
VERIFIED FIXED

Description erik.baum 2016-10-07 09:22:41 UTC
IHi,

I have a Cross platform Solution with Android, UWP and iOS app.
sometimes we would build the solution without the connectivity to a Mac build agent.

then i get the following error:

C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.After.targets(208,5): Error : There was an error unzipping the file bin\iPhone\AppStore\smapOneAppTouch.app.dSYM.zip: Could not find file 'd:\A1\1\s\Source\App\UI\Touch\bin\iPhone\AppStore\smapOneAppTouch.app.dSYM.zip'.

This error occurs after an update from 4.1.2 to 4.2.

I have looked at the mentioned code lines from the targets file. May this is the mistake:

<Target Name="CopyDSYMFromMac" Condition="'$(OutputType)' == 'Exe' And '$(ComputedPlatform)' == 'iPhone' And '$(BuildIpa)' == 'true' And '$(CopyDSYM)' == 'true'" >
    <Zip
			SessionId="$(BuildSessionId)"
			Condition="'$(MtouchTargetsEnabled)'"
			ToolExe="$(ZipExe)"
			ToolPath="$(ZipPath)"
			Recursive="true"
			Symlinks="true"
			Sources="$(AppBundleDir).dSYM"
			OutputFile="$(AppBundleDir).dSYM.zip"
			WorkingDirectory="$(DeviceSpecificIntermediateOutputPath)ipa"
			/>

    <CopyFileFromMac
			SessionId="$(BuildSessionId)"
			File="$(AppBundleDir).dSYM.zip"
			/>

    <LocalUnzip ZipFilePath="$(AppBundleDir).dSYM.zip" ExtractionPath="$(AppBundleDir).dSYM" />

    <Delete SessionId="$(BuildSessionId)" Condition="'$(MtouchTargetsEnabled)'" Files="$(AppBundleDir).dSYM.zip" />
  </Target>

the zip action and CopyFileFromMac will not executed if Mac is not Connected (MtouchTargetsEnabled). but the LocalUnzip Action is called always. Maybe you could make the entire target based on the MtouchTargetsEnabled property.

Another Question why do you extract it? the most online Tools need a zip to upload or am I wrong?

Regards

Erik
Comment 1 jea 2016-10-13 11:37:16 UTC
We have a connection to the Mac every time, and due see the IPA is being created.

However here the CopyDSYMFromMac tasks fails with "The given path's format is not supported".

C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.After.targets (208, 5)
There was an error unzipping the file C:\tfsVnBw\3\b\Release\iOS\HelloWorldClientiOS.app.dSYM.zip: The given path's format is not supported.

Is there a workaround for this?

I was wondering if it is possible to disable the CopyDSYMFromMac target completely?
Comment 2 jea 2016-10-15 07:55:38 UTC
-- WORKAROUND --

In our case, the dSYM file was needed in order to get proper stacktraces using HockeyApp. Luckily HockeyApp also supports the dSYM file in zip-format, hence we just outcommented the lines responsible for unzipping and deleting the zip in Xamarin.iOS.Common.After.


Full path to file:

C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.After.targets

Find the lines below in the CopyDSYMFromMac target and outcomment them:

<LocalUnzip ZipFilePath="$(AppBundleDir).dSYM.zip" ExtractionPath="$(AppBundleDir).dSYM" />
<Delete SessionId="$(BuildSessionId)" Condition="'$(MtouchTargetsEnabled)'" Files="$(AppBundleDir).dSYM.zip" />


We did this on our build server and now it successfully builds and uploads both .ipa and .dSYM.zip to HockeyApp again.
Comment 3 xamarin-release-manager 2016-11-01 17:18:37 UTC
Fixed in version 4.3.0.0 (master)

Author: Emanuel
Commit: a04f34d052d7ef18ecdd52069cfefe4a927703d3 (xamarin/XamarinVS)
Comment 4 Danish Akhtar 2017-02-02 08:03:25 UTC
@erik,

I have tried to reproduce this issue with stable XVS 4.2.1.74 but not able to reproduce it. 

Following steps I have taken to reproduce this issue:

1. Create Cross Platform-> Blank Xaml App(X.forms Shared) it including  Android, UWP and iOS app in VS.
2. Build the solution without the connectivity to a Mac build agent.

Observed that I am successfully able to build application. 

Please let me know if I missing any step to reproduce this issue or It would be grateful, if you can provide any specific project. So that I can reproduce and Verify this issue at our end.

Thanks!
Comment 5 Danish Akhtar 2017-02-07 12:23:18 UTC
I have checked this issue with latest C9 XVS 4.3.0.643 and observed that I am successfully able to build Cross Platform App including  Android, UWP and iOS app in VS, without connectivity to a Mac build agent.

As of now, I am closing this issue. Please feel free to Reopen this issue if you encountered it again with latest builds. 

While Reopening the issue, please provide us the specific test project and Xamarin Zip logs via VS->Help->Xamarin->Zip logs.

Thanks!