Bug 25551 - Error: Failed to load output manifest for ibtool
Summary: Error: Failed to load output manifest for ibtool
Status: RESOLVED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: General ()
Version: 3.9
Hardware: PC Windows
: Normal normal
Target Milestone: 3.11
Assignee: mag@xamarin.com
URL:
: 25536 27140 ()
Depends on: 28714
Blocks:
  Show dependency tree
 
Reported: 2014-12-20 20:17 UTC by Ian
Modified: 2016-06-13 08:08 UTC (History)
24 users (show)

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


Attachments
Detailed logs for primary problem (23.60 KB, application/zip)
2015-01-26 00:46 UTC, Brendan Zagaeski (Xamarin Team, assistant)
Details
Detailed logs for primary problem, with tcpdump (591.39 KB, application/zip)
2015-02-11 00:48 UTC, Brendan Zagaeski (Xamarin Team, assistant)
Details


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:
RESOLVED FIXED

Description Ian 2014-12-20 20:17:51 UTC
I am trying to run from VS2013 into iPad, in debug, and get this error: 

Failed to load output manifest for ibtool: Unrecognized property list format.	 


Interestingly my log shows an error coming from Xamarin's build:

Mac Log:

[2014-12-21 01:15:02.8] Exception: System.Xml.XmlException: Document element did not appear.  Line 1, position 1.
[2014-12-21 01:15:02.8]   at Mono.Xml2.XmlTextReader.Read () [0x00000] in <filename unknown>:0 
[2014-12-21 01:15:02.8]   at System.Xml.XmlTextReader.Read () [0x00000] in <filename unknown>:0 
[2014-12-21 01:15:02.8]   at System.Xml.XmlReader.MoveToContent () [0x00000] in <filename unknown>:0 
[2014-12-21 01:15:02.8]   at System.Xml.XmlReader.ReadToDescendant (System.String name) [0x00000] in <filename unknown>:0 
[2014-12-21 01:15:02.8]   at Xamarin.MacDev.PropertyListFormat+XmlFormat.StartReading (System.IO.Stream input) [0x00000] in <filename unknown>:0 
 (189)
Comment 1 Ian 2014-12-20 20:29:20 UTC
Microsoft Visual Studio Professional 2013
Version 12.0.31101.00 Update 4
Microsoft .NET Framework
Version 4.5.51641

Installed Version: Professional

Team Explorer for Visual Studio 2013   06177-004-0446025-02133
Microsoft Team Explorer for Visual Studio 2013

Visual Basic 2013   06177-004-0446025-02133
Microsoft Visual Basic 2013

Visual C# 2013   06177-004-0446025-02133
Microsoft Visual C# 2013

Visual C++ 2013   06177-004-0446025-02133
Microsoft Visual C++ 2013

Visual F# 2013   06177-004-0446025-02133
Microsoft Visual F# 2013

Visual Studio 2013 Code Analysis Spell Checker   06177-004-0446025-02133
Microsoft® Visual Studio® 2013 Code Analysis Spell Checker

Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

Windows Phone SDK 8.0 - ENU   06177-004-0446025-02133
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   1.0
Application Insights Tools for Visual Studio

ASP.NET and Web Tools   12.4.51016.0
Microsoft Web Developer Tools contains the following components:
Support for creating and opening ASP.NET web projects
Browser Link: A communication channel between Visual Studio and browsers
Editor extensions for HTML, CSS, and JavaScript
Page Inspector: Inspection tool for ASP.NET web projects
Scaffolding: A framework for building and running code generators
Server Explorer extensions for Microsoft Azure Websites
Web publishing: Extensions for publishing ASP.NET web projects to hosting providers, on-premises servers, or Microsoft Azure

ASP.NET Web Frameworks and Tools 2012.2   4.1.21001.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.21010.0
For additional information, visit http://www.asp.net/

Common Azure Tools   1.3
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

JetBrains ReSharper Platform 6   Build 6.0.20141204.190160 on 2014-12-04 19:29:31Z
JetBrains ReSharper Platform package for Microsoft Visual Studio. For more information about ReSharper Platform, visit http://www.jetbrains.com/resharper. Copyright © 2014 JetBrains, Inc.

LLBLGen Pro Designer   4.0
The LLBLGen Pro designer integrated inside Visual Studio.

Microsoft Advertising SDK for Windows Phone   
Microsoft Advertising SDK for Windows Phone
Build 

Microsoft Azure Mobile Services Tools   1.3
Microsoft Azure Mobile Services Tools

NuGet Package Manager   2.8.50926.663
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PowerShell Tools   1.3
Provides file classification services using PowerShell

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   12.0.41025.0
Microsoft SQL Server Data Tools

Telerik ASP.NET MVC VSExtensions   2014.6.1126.0
Telerik UI for ASP.NET MVC VSExtensions

Web Essentials 2013   2.5.3
Adds many useful features to Visual Studio for web developers.

Windows Phone 8.1 SDK Integration   1.0
This package integrates the tools for the Windows Phone 8.1 SDK into the menus and controls of Visual Studio.

Xamarin   3.9.221.0 (a6d269d)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   4.20.0.34 (49a04b966feb40dfdba49d57ba16249b66d606a6)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   8.6.0.0 (43e3b715220b50914b45bec675e19008ff50682a)
Visual Studio extension to enable development for Xamarin.iOS.

Xamarin.iOS Unified Migration   1.0
Automated migration for Xamarin iOS Classic projects to Unified
Comment 2 Ian 2014-12-20 20:30:09 UTC
It started happening after I upgraded to the Beta: Xamarin   3.9.221.0
Comment 4 Ian 2014-12-31 12:20:53 UTC
See: https://bugzilla.xamarin.com/show_bug.cgi?id=25578 for repro
Comment 5 Ricardo Shimoda Nakasako 2015-01-06 11:52:03 UTC
Hi, I'm new to Xamarin and this bugs also happens to me. Does anyone knows if Xamarin Studio (on windows) will compile the application?

In my current programming enviroment all our macs are in a different building and, therefore, it is impossible for me to use Xamarin Studio directly on the mac.

Thanks!
Comment 6 Kent Green [MSFT] 2015-01-15 19:07:24 UTC
Adding "See Also" link for bug 25578 per Comment #4:

Bug 25578 - Failed to load output manifest for actool
Comment 7 Kent Green [MSFT] 2015-01-16 17:28:26 UTC
Created attachment 9389 [details]
Sample & logs to reproduce error

---Repo Notes---
While testing for an unrelated issue, I reproduced this error while trying to build the Phoneword.iOS Xamarin sample in Visual Studio from here: http://developer.xamarin.com/content/Phoneword/

I trimmed down the solution to just the iOS project that could repo the issue. 
To repo the issue, simply open the solution in Visual Studio and attempt to build. 

In my test, I hit the error while attempting to build / deploy the app to the iPhone 6 iOS 8.1 simulator. 

---Build Info---
Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.51641

Installed Version: Professional

LightSwitch for Visual Studio 2013   06177-004-0447006-02429
Microsoft LightSwitch for Visual Studio 2013

Team Explorer for Visual Studio 2013   06177-004-0447006-02429
Microsoft Team Explorer for Visual Studio 2013

Visual Basic 2013   06177-004-0447006-02429
Microsoft Visual Basic 2013

Visual C# 2013   06177-004-0447006-02429
Microsoft Visual C# 2013

Visual C++ 2013   06177-004-0447006-02429
Microsoft Visual C++ 2013

Visual F# 2013   06177-004-0447006-02429
Microsoft Visual F# 2013

Visual Studio 2013 Code Analysis Spell Checker   06177-004-0447006-02429
Microsoft® Visual Studio® 2013 Code Analysis Spell Checker

Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

Windows Phone SDK 8.0 - ENU   06177-004-0447006-02429
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   1.0
Application Insights Tools for Visual Studio

ASP.NET and Web Tools   12.3.50717.0
Microsoft Web Developer Tools contains the following components:
Support for creating and opening ASP.NET web projects
Browser Link: A communication channel between Visual Studio and browsers
Editor extensions for HTML, CSS, and JavaScript
Page Inspector: Inspection tool for ASP.NET web projects
Scaffolding: A framework for building and running code generators
Server Explorer extensions for Microsoft Azure Websites
Web publishing: Extensions for publishing ASP.NET web projects to hosting providers, on-premises servers, or Microsoft Azure

ASP.NET Web Frameworks and Tools 2012.2   4.1.21001.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.20703.0
For additional information, visit http://www.asp.net/

Common Azure Tools   1.2
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Microsoft Advertising SDK for Windows Phone   
Microsoft Advertising SDK for Windows Phone
Build 

Microsoft Azure Mobile Services Tools   1.2
Microsoft Azure Mobile Services Tools

NuGet Package Manager   2.8.50926.663
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

Office Developer Tools for Visual Studio 2013 ENU   12.0.30626
Microsoft Office Developer Tools for Visual Studio 2013 ENU

PowerShell Tools   1.2
Provides file classification services using PowerShell

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   12.0.30919.1
Microsoft SQL Server Data Tools

Windows Phone 8.1 SDK Integration   1.0
This package integrates the tools for the Windows Phone 8.1 SDK into the menus and controls of Visual Studio.

Workflow Manager Tools 1.0   1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.

Xamarin   3.9.236.0 (d6a2cae)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   4.20.0.34 (49a04b966feb40dfdba49d57ba16249b66d606a6)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   8.6.0.0 (eb24bdcf5cba2c12b673a07e0a8cce368b9563b3)
Visual Studio extension to enable development for Xamarin.iOS.

Xamarin.iOS Unified Migration   1.0
Automated migration for Xamarin iOS Classic projects to Unified
Comment 11 Kent Green [MSFT] 2015-01-16 18:10:31 UTC
---Possible Workaround---
In most of my tests so far, it seems like building the affected project in Xamarin Studio (Mac) completes without hitting the ibtool error, so this might be a way to workaround the issue; but it could depend on the specific app / project how well this approach might work.
Comment 14 Kent Green [MSFT] 2015-01-16 19:17:10 UTC
---Cleaning Workaround---
A simpler workaround that seems to work for our tests is simply to clean the affected project / solution when the bug occurs, as this will fix the problem.
Comment 15 Randall Schmidt 2015-01-19 17:04:52 UTC
We are seeing this issue on two machines but not on a third
Comment 17 Ian 2015-01-20 16:49:38 UTC
Comment 14 does not work on two of our machines affected by the problem.
Comment 18 Ian Ceicys 2015-01-21 14:33:01 UTC
I have successfully run and debugged the attached solution (NoImageSource) without being able to repoduce this build issue. 

I have seen issues being resolved with cleaning the solution before building. 

Please provide additional information via test steps as I have not been able to repoduce this issue.

Here is my environment config

Microsoft Visual Studio Ultimate 2013
Version 12.0.31101.00 Update 4
Microsoft .NET Framework
Version 4.5.53344

Xamarin   3.9.236.0 (d6a2cae)
Xamarin.Android   4.20.0.34
Xamarin.iOS   8.6.0.0 
Xamarin.iOS Unified Migration   1.0
Automated migration for Xamarin iOS Classic projects to Unified
Comment 20 Ian 2015-01-21 16:03:18 UTC
Here are a few experiments I have tried. I am still getting the bug on "all projects", it seems to be related to either the Xamarin VS2013 plug in or the Build Server and not the project.

Try in RELEASE MODE:
====================
--The build server mtbserver/pngcrush/savapi/launchd starts on the Mac but doesn't install the app when they complete
--Trying the build again causes the issue on this bug to appear
--RELEASE folder is empty
Video (3 minutes):  http://screencast.com/t/eD341yQE


Try in DEBUG MODE:
==================
--The build server mtbserver/pngcrush/savapi starts/launchd on the Mac but doesn't install the app when they complete
--Trying the build again causes the issue on this bug to appear
--DEBUG folder is empty
Video (2 minutes):  http://screencast.com/t/TQxD2VdcM


Try in SIMULATOR
================
--Works fine. Notice how the DEBUG folder gets filled with dlls and files.
Video (2 minutes): http://screencast.com/t/RVMpKrxMJxw


***Interestingly***, in the second video I show that the /Debug folder is empty. No wonder the actool fails.
Comment 21 Randall Schmidt 2015-01-21 16:27:56 UTC
We see this issue in Xamarin Studio or building with mdtool. We don't use VS at all.
Comment 23 Brendan Zagaeski (Xamarin Team, assistant) 2015-01-22 01:39:28 UTC
Thanks in part to the hints from comment 20, I have been able to reproduce the problem a couple times, though unfortunately not perfectly consistently yet.

According to what I've seen, it looks like there are 2 "sub-problems." The main problem is that the build host for some reason gets disconnected in the middle of the IBToolTask. This primary problem leaves a 0-byte `MainStoryboard.plist` file in the build cache directory, and that leftover file causes the secondary "Unrecognized property list format" error.


There's at least a small chance that adding some code to the build tasks to delete the 0-byte `MainStoryboard.plist` if it exists might work as a temporary fix.


## Steps to reproduce

1. "Somehow" get the build to fail in such a way that the build host disconnects during the IBToolTask. I'll update the bug report if I find more clues about how to do this consistently.

2. Attempt to build again.


So far I've only seen the primary failure using Xcode 6.1.1 + OS X 10.10. I have not yet seen it using Xcode 6.1 + OS 10.9.5. But my OS X 10.10 machine is also a VM, while the OS X 10.9.5 machine is not, so it's not an ideal comparison. I will continue to investigate.


## Results

Notes: in the example below, the clocks are not synchronized between the build host and the Windows machine. I'm not yet sure if that's relevant to this problem or not.

"Something" happens causing the build host to disconnect during the IBToolTask during the first build.


### Diagnostic build output, excerpt
> Task "IBToolTask" (TaskId:11)
>   Task Parameter:SessionId=6078ef372d26d7acdea57f4fb3c80cc2 (TaskId:11)
>   Task Parameter:AppManifest=Info.plist (TaskId:11)
>   Task Parameter:InterfaceDefinitions=MainStoryboard.storyboard (TaskId:11)
>   Task Parameter:IntermediateOutputPath=obj\iPhone\Ad-Hoc\ (TaskId:11)
>   Task Parameter:Platform=iPhone (TaskId:11)
>   Task Parameter:ResourcePrefix=Resources (TaskId:11)
>   Task Parameter:SdkDevPath=\Applications\Xcode.app\Contents\Developer (TaskId:11)
>   Task Parameter:SdkBinPath=\Applications\Xcode.app\Contents\Developer\Platforms\iPhoneOS.platform\Developer\SDKs\iPhoneOS8.1.sdk\Developer\usr\bin (TaskId:11)
>   Task Parameter:SdkUsrPath=\Applications\Xcode.app\Contents\Developer\Platforms\iPhoneOS.platform\Developer\SDKs\iPhoneOS8.1.sdk\Developer\usr (TaskId:11)
>   Task Parameter:SdkRoot=\Applications\Xcode.app\Contents\Developer\Platforms\iPhoneOS.platform\Developer\SDKs\iPhoneOS8.1.sdk (TaskId:11)
>   Task Parameter:SdkVersion=8.1 (TaskId:11)
>   IBToolTask: 2015-01-22T00:35:18.6343211-05:00 - Started (TaskId:11)
>   IBToolTask: 2015-01-22T00:35:18.6343211-05:00 - Initializing (TaskId:11)
>   IBToolTask: 2015-01-22T00:35:18.6343211-05:00 - Initialized (TaskId:11)
>   IBToolTask: 2015-01-22T00:35:18.6356473-05:00 - Determining the modified files that should be copied to the mac (2 files) (TaskId:11)
>   IBToolTask: 2015-01-22T00:35:18.6903237-05:00 - Copying files (2 files) (TaskId:11)
>   Copying Info.plist... (TaskId:11)
>   Copying MainStoryboard.storyboard... (TaskId:11)
>   IBToolTask: 2015-01-22T00:35:18.7222768-05:00 - Serializing intputs (TaskId:11)
>   IBToolTask: 2015-01-22T00:35:18.7383157-05:00 - Executing (TaskId:11)
>   Executing task: Xamarin.MacDev.Tasks.IBToolTask (TaskId:11)
>   Server returned an error. The underlying connection was closed: The connection was closed unexpectedly.
>    (TaskId:11)
>   Remote task execution failed. (TaskId:11)
>   IBToolTask: 2015-01-22T00:35:46.0302595-05:00 - Finished (TaskId:11)
> Done executing task "IBToolTask" -- FAILED. (TaskId:11)
> Done building target "_CoreCompileInterfaceDefinitions" in project "SingleViewApp1.csproj" -- FAILED.: (TargetId:11)

### XamarinVS logs, excerpt
> Information: [2015-01-22 00:35:17.4] [21-Jan-2015 21:35:17] Handling with command: [Info: CommmandUrl=Info] (12)
> Information: [2015-01-22 00:35:17.7] [21-Jan-2015 21:35:17] Attempting to acquire command execution lock, timeout set to 00:10:00
> Information: [2015-01-22 00:35:17.8] [21-Jan-2015 21:35:17] mtouch 8.6.0.51 (dfb682f)
> Information: [2015-01-22 00:35:18.0] [21-Jan-2015 21:35:17] Command [Info: CommmandUrl=Info] finished (12)
> Information: [2015-01-22 00:35:18.1] [21-Jan-2015 21:35:17] Request handled in 4.573ms
> Information: [2015-01-22 00:35:18.6] [21-Jan-2015 21:35:18] Handling with command: [ExecuteTask: CommmandUrl=ExecuteTask] (13)
> Information: [2015-01-22 00:35:18.8] [21-Jan-2015 21:35:18] Attempting to acquire command execution lock, timeout set to 00:10:00
> Information: [2015-01-22 00:35:19.1] set to 00:10:00
> Information: [2015-01-22 00:35:19.3] [21-Jan-2015 21:35:18] Command [CopyFile: CommmandUrl=CopyFile] finished (13)
> Information: [2015-01-22 00:35:19.5] [21-Jan-2015 21:35:18] Request handled in 3.625ms
> Information: [2015-01-22 00:35:19.6] [21-Jan-2015 21:35:18] Handling with command: [ExecuteTask: CommmandUrl=ExecuteTask] (13)
> Information: [2015-01-22 00:35:19.8] [21-Jan-2015 21:35:18] Attempting to acquire command execution lock, timeout set to 00:10:00
> Information: [2015-01-22 00:35:21.9] [21-Jan-2015 21:35:21] Request handled in 10.472ms
> Information: [2015-01-22 00:35:22.1] [21-Jan-2015 21:35:21] Request handled in 31.607ms
> Information: [2015-01-22 00:35:24.7] [21-Jan-2015 21:35:24] Request handled in 72.757ms
> Information: [2015-01-22 00:35:24.9] [21-Jan-2015 21:35:24] Request handled in 4.61ms
> Information: [2015-01-22 00:35:27.0] [21-Jan-2015 21:35:26] Request handled in 2.928ms
> Information: [2015-01-22 00:35:28.1] [21-Jan-2015 21:35:27] Request handled in 7.883ms
> Information: [2015-01-22 00:35:29.9] [21-Jan-2015 21:35:29] Request handled in 12.756ms
> Information: [2015-01-22 00:35:30.5] [21-Jan-2015 21:35:30] Request handled in 15.945ms
> Information: [2015-01-22 00:35:33.9] [21-Jan-2015 21:35:33] Request handled in 46.576ms
> Information: [2015-01-22 00:35:34.0] [21-Jan-2015 21:35:33] Request handled in 4.442ms
> Information: [2015-01-22 00:35:36.1] [21-Jan-2015 21:35:35] Request handled in 21.493ms
> Information: [2015-01-22 00:35:36.6] [21-Jan-2015 21:35:36] Request handled in 9.356ms
> Information: [2015-01-22 00:35:38.9] [21-Jan-2015 21:35:38] Request handled in 4.424ms
> Information: [2015-01-22 00:35:40.0] [21-Jan-2015 21:35:39] Request handled in 32.522ms
> Information: [2015-01-22 00:35:42.2] [21-Jan-2015 21:35:41] Request handled in 5.246ms
> Information: [2015-01-22 00:35:42.5] [21-Jan-2015 21:35:42] Request handled in 6.793ms
> Information: [2015-01-22 00:35:45.1] [21-Jan-2015 21:35:44] Request handled in 29.567ms
> Information: [2015-01-22 00:35:45.6] [21-Jan-2015 21:35:45] Request handled in 22.842ms
> Error: [2015-01-22 00:35:48.2] Build server control connection failed
> Error: [2015-01-22 00:35:48.3] Server 172.16.5.136 returned no data. Hanging up.)
> Information: [2015-01-22 00:35:48.6] The build host has been disconnected
> Information: [2015-01-22 00:35:48.7] Trying to connect to the build server 1/20
> Error: [2015-01-22 00:35:48.9] Error establishing connection to Xamarin.iOS build server
> Information: [2015-01-22 00:35:49.4] Trying to connect to the build server 2/20
> Information: [2015-01-22 00:35:49.8] Opening control connection
> Error: [2015-01-22 00:35:50.1] Exception caught.
> Error: [2015-01-22 00:35:50.3] Server returned an error. Unable to connect to the remote server
> 
> Error: [2015-01-22 00:35:50.5] Exception caught.
> Error: [2015-01-22 00:35:50.7] Server returned an error. Unable to connect to the remote server
> 
> Information: [2015-01-22 00:35:52.3] Control connection to 172.16.5.136 established

### First build attempt, excerpt (from ~/Library/Logs/Xamarin/MonoTouchVS/SingleViewApp1*.log)
> [21-Jan-2015 21:35:18] DetectSdkLocations Task
> [21-Jan-2015 21:35:18]   Platform: iPhone
> [21-Jan-2015 21:35:18]   SdkVersion: 8.1
> [21-Jan-2015 21:35:18]   XamarinSdkRoot: /Library/Frameworks/Xamarin.iOS.framework/Versions/Current
> [21-Jan-2015 21:35:18] Copying /Users/macuser/Library/Caches/Xamarin/mtbs/builds/SingleViewApp1/6078ef372d26d7acdea57f4fb3c80cc2/Info.plist...
> [21-Jan-2015 21:35:18] Copying /Users/macuser/Library/Caches/Xamarin/mtbs/builds/SingleViewApp1/6078ef372d26d7acdea57f4fb3c80cc2/MainStoryboard.storyboard...
> [21-Jan-2015 21:35:18] IBTool Task
> [21-Jan-2015 21:35:18]   AppManifest: Info.plist
> [21-Jan-2015 21:35:18]   InterfaceDefinitions:
> [21-Jan-2015 21:35:18]     MainStoryboard.storyboard
> [21-Jan-2015 21:35:18]   IntermediateOutputPath: obj/iPhone/Ad-Hoc/
> [21-Jan-2015 21:35:18]   Platform: iPhone
> [21-Jan-2015 21:35:18]   ResourcePrefix: Resources
> [21-Jan-2015 21:35:18]   SdkBinPath: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/Developer/usr/bin
> [21-Jan-2015 21:35:18]   SdkRoot: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk
> [21-Jan-2015 21:35:18]   SdkVersion: 8.1
> [21-Jan-2015 21:35:18] Tool /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool execution started with arguments: --errors --warnings --notices --output-format xml1 --minimum-deployment-target 8.0 --auto-activate-custom-fonts --sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk --compile /Users/macuser/Library/Caches/Xamarin/mtbs/builds/SingleViewApp1/6078ef372d26d7acdea57f4fb3c80cc2/obj/iPhone/Ad-Hoc/ibtool/MainStoryboard.storyboardc /Users/macuser/Library/Caches/Xamarin/mtbs/builds/SingleViewApp1/6078ef372d26d7acdea57f4fb3c80cc2/MainStoryboard.storyboard

### Second build attempt, excerpt
> [21-Jan-2015 21:36:36] DetectSdkLocations Task
> [21-Jan-2015 21:36:36]   Platform: iPhone
> [21-Jan-2015 21:36:36]   SdkVersion: 8.1
> [21-Jan-2015 21:36:36]   XamarinSdkRoot: /Library/Frameworks/Xamarin.iOS.framework/Versions/Current
> [21-Jan-2015 21:36:36] IBTool Task
> [21-Jan-2015 21:36:36]   AppManifest: Info.plist
> [21-Jan-2015 21:36:36]   InterfaceDefinitions:
> [21-Jan-2015 21:36:36]     MainStoryboard.storyboard
> [21-Jan-2015 21:36:36]   IntermediateOutputPath: obj/iPhone/Ad-Hoc/
> [21-Jan-2015 21:36:36]   Platform: iPhone
> [21-Jan-2015 21:36:36]   ResourcePrefix: Resources
> [21-Jan-2015 21:36:36]   SdkBinPath: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/Developer/usr/bin
> [21-Jan-2015 21:36:36]   SdkRoot: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk
> [21-Jan-2015 21:36:36]   SdkVersion: 8.1
> [21-Jan-2015 21:36:36] Error: Failed to load output manifest for ibtool: Unrecognized property list format.
> [21-Jan-2015 21:36:36] Error: Output manifest contents: 



--------


## Secondary problem: a stale 0-byte `MainStoryboard.plist` causes the "Unrecognized property list format"

Here are the contents of the `builds/` folder on the build host after I hit the primary problem:

> $ find builds -type f | while read FILE; do ls -l "$FILE"; done | column -t
> -rw-r--r--  1  macuser  staff  1007  Jan  21  builds/SingleViewApp1/6078ef372d26d7acdea57f4fb3c80cc2/Info.plist
> -rw-r--r--  1  macuser  staff  1492  Jan  21  builds/SingleViewApp1/6078ef372d26d7acdea57f4fb3c80cc2/MainStoryboard.storyboard
> -rw-r--r--  1  macuser  staff  0     Jan  21  builds/SingleViewApp1/6078ef372d26d7acdea57f4fb3c80cc2/obj/iPhone/Ad-Hoc/ibtool/MainStoryboard.plist
> -rw-r--r--  1  macuser  staff  258   Jan  21  builds/SingleViewApp1/6078ef372d26d7acdea57f4fb3c80cc2/obj/iPhone/Ad-Hoc/ibtool/MainStoryboard.storyboardc/Info.plist
> -rw-r--r--  1  macuser  staff  920   Jan  21  builds/SingleViewApp1/6078ef372d26d7acdea57f4fb3c80cc2/obj/iPhone/Ad-Hoc/ibtool/MainStoryboard.storyboardc/UIViewController-vXZ-lx-hvc.nib
> -rw-r--r--  1  macuser  staff  1754  Jan  21  builds/SingleViewApp1/6078ef372d26d7acdea57f4fb3c80cc2/obj/iPhone/Ad-Hoc/ibtool/MainStoryboard.storyboardc/vXZ-lx-hvc-view-kh9-bI-dsS.nib


From this directory listing we can see that the `MainStoryboard.plist` has a size of 0 bytes, and that the build does not proceed past the IBToolTask.



### "Artificial" steps to reproduce the secondary problem

1. Build an iOS project successfully (tested using a Single View, Unified template project).

2. Delete `obj/iPhone/Ad-Hoc/ibtool/MainStoryboard.plist` from the build cache directory on the build host.

3. Touch `obj/iPhone/Ad-Hoc/ibtool/MainStoryboard.plist` to create a new empty file in place of the original.

4. Manually delete the `bin\` and `obj\` folders from the Windows build directory. Do not Clean the project in Visual Studio at this step: that would delete the files in the build cache directory.

5. Build the project again.


I tested these steps on both Xcode 6.1 + OS X 10.9.5, and Xcode 6.1.1 + OS X 10.10.

Unsurprisingly, these same steps are also sufficient to produce the error when using the MSBuild build engine in Xamarin Studio on Mac.


### Result: the IBToolTask fails

> error : Failed to load output manifest for ibtool: Unrecognized property list format.
> error : Output manifest contents: 


### Result: the "Output -> Xamarin Log" contains a few more details

The `.plist` is empty, so there's no "Document element."

> Exception: System.Xml.XmlException: Document element did not appear.  Line 1, position 1.
>   at Mono.Xml2.XmlTextReader.Read () [0x00000] in <filename unknown>:0 
>   at System.Xml.XmlTextReader.Read () [0x00000] in <filename unknown>:0 
>   at System.Xml.XmlReader.MoveToContent () [0x00000] in <filename unknown>:0 
>   at System.Xml.XmlReader.ReadToDescendant (System.String name) [0x00000] in <filename unknown>:0 
>   at Xamarin.MacDev.PropertyListFormat+XmlFormat.StartReading (System.IO.Stream input) [0x00000] in <filename unknown>:0
Comment 25 Brendan Zagaeski (Xamarin Team, assistant) 2015-01-26 00:46:58 UTC
Created attachment 9493 [details]
Detailed logs for primary problem

I have a small additional update on this issue. I hit the primary problem today on a physical OS X 10.9.5 + Xcode 6.1 build host, where the clock was precisely synchronized to the Windows machine. The problem happened during the first build of the day on that build host. I collected a slightly better, more complete set of logs (attached). It appears the cause of the primary problem might be that `ibtool` sometimes fails during the first build of a project.

To make a wild guess, I think it might be possible to reproduce the primary problem by running `killall ibtoold` at precisely the right time during the remote build process.

To make another wild guess, it might be possible to hit this initial "silent" `ibtool` failure (where it leaves a 0-byte `.plist` file when it quits) by running the `ibtool` command repeatedly on the Mac build host. If that is the case, then the primary bug is in `ibtool` itself.


### Excerpt from diagnostic build output

> IBToolTask: 2015-01-25T18:35:58.3218120-05:00 - Executing (TaskId:11)
> Executing task: Xamarin.MacDev.Tasks.IBToolTask (TaskId:11)
> Server returned an error. The underlying connection was closed: The connection was closed unexpectedly.
>  (TaskId:11)
> Remote task execution failed. (TaskId:11)
> IBToolTask: 2015-01-25T18:36:01.6189521-05:00 - Finished (TaskId:11)


### Time-matched excerpt from mtbserver.log 

> [25-Jan-2015 18:35:58] Handling with command: [ExecuteTask: CommmandUrl=ExecuteTask] (11)
> [25-Jan-2015 18:35:58] Attempting to acquire command execution lock, timeout set to 00:10:00
> [25-Jan-2015 18:36:01] Request handled in 3.343ms
> [25-Jan-2015 18:36:01] Request handled in 3.087ms
> [25-Jan-2015 18:36:01] Finishing Output (log:writer) Thread...
> [25-Jan-2015 18:36:01] Error: An error occurred (no details available)
> [25-Jan-2015 18:36:05] Apple SDK developer root: /Applications/Xcode.app/Contents/Developer
> [25-Jan-2015 18:36:06] Server IP Address : 10.1.10.239

### Time-matched excerpt from /var/log/sytem.log

Note: unfortunately I sometimes see all of these same lines when the build succeeds.

> 1/25/15 6:35:50.280 PM Terminal[464]: CGSCopyDisplayUUID: Invalid display 0x41dc9d00
> 1/25/15 6:35:59.615 PM ibtoold[37496]: CGSConnectionByID: 0 is not a valid connection ID.
> 1/25/15 6:36:01.421 PM Interface Builder Cocoa Touch Tool[37497]: assertion failed: 13F34: libxpc.dylib + 29453 [464E62EA-4CF2-3FEF-9C17-692AD8D66AA8]: 0x8d
> 1/25/15 6:36:01.430 PM Interface Builder Cocoa Touch Tool[37497]: BUG in libdispatch client: kevent[EVFILT_VNODE] add: "Bad file descriptor" - 0x9
> 1/25/15 6:36:01.509 PM Interface Builder Cocoa Touch Tool[37497]: assertion failed: 13F34: libxpc.dylib + 29453 [464E62EA-4CF2-3FEF-9C17-692AD8D66AA8]: 0x8d
> 1/25/15 6:36:15.560 PM Terminal[464]: CGSCopyDisplayUUID: Invalid display 0x41dc9d00

### ~/Library/Logs/Xamarin/MonoTouchVS/SingleViewUnified_*.log

The last line of the file shows `ibtool` being invoked:

> [25-Jan-2015 18:35:58] Tool
> /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool execution started with arguments:
>   --errors --warnings --notices --output-format xml1
>   --minimum-deployment-target 7.0 --auto-activate-custom-fonts
>   --sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk
>   --compile
>     /Volumes/Cases/macuser/Library/Caches/Xamarin/mtbs/builds/SingleViewUnified/e19c9e3fe36bd56040fc44d462ac2152/obj/iPhone/Debug/ibtool/MainStoryboard_iPad.storyboardc
>     /Volumes/Cases/macuser/Library/Caches/Xamarin/mtbs/builds/SingleViewUnified/e19c9e3fe36bd56040fc44d462ac2152/MainStoryboard_iPad.storyboard
Comment 28 Brendan Zagaeski (Xamarin Team, assistant) 2015-02-06 22:53:08 UTC
I have a few more small updates that might save a little time during further investigation of the problem.


I have hit the primary problem a few more times on both Yosemite and Mavericks, but unfortunately I still haven't found a consistent way to reproduce it. It seems that _maybe_ the problem is more likely to happen during the first few builds on the build host after an idle period (of maybe a couple of hours) with no builds.


Neither of my "wild guesses" from comment 25 turned out to be an accurate way to reproduce:


## `killall ibtoold` produces slightly different symptoms.

- Run `killall ibtoold` repeatedly on the Mac build host just after starting the build in Visual Studio.

OR

- Rename `/Applications/Xcode.app/Contents/Developer/usr/bin/ibtool` to `ibtool-bak`. 


These options reproduce the primary symptoms, _but_ the precise behavior is different from the "real" problem in the 3 important ways:

1. The secondary "Unrecognized property list format" error appears _during the first build_. With the real problem, this error only happens during the second build.

2. The build host _stays connected_. With the real problem, the build host gets disconnected and then VS automatically reconnects.

3. The `.storyboardc` directories are _not_ generated in the `ibtool/` output folder. With the real problem, the `.storyboardc` directories _are_ generated and include non-empty files (as shown under "contents of the `builds/` folder" in comment 23).



## Running `ibtool` repeatedly on the build host does not produce 0-byte plist files.

So far I have *not* been able to produce empty `--errors --warnings --notices` output from the `ibtool` command by running it repeatedly on the Mac build host. I tried running more than 10 instances simultaneously, and they all produced correct output.



## Additional observations

The first `ibtool` run after `killall ibtoold` takes substantially longer than subsequent runs (1 second vs. 0.05 seconds). Presumably the extra delay on the first run is the startup time for `ibtoold`. As a follow-up experiment, I tried replacing `ibtool` with a tiny little wrapper C program that forced a delay of 12 seconds before running the real `ibtool`, but the build still completed successfully, so the startup delay caused by `ibtoold` is probably _not_ part of the problem.
Comment 29 Brendan Zagaeski (Xamarin Team, assistant) 2015-02-11 00:48:16 UTC
Created attachment 9760 [details]
Detailed logs for primary problem, with tcpdump

I hit this issue again while investigating a different issue today, so I gathered a few more details.

I've attached logs from 4 new trials, this time including TCP packet captures plus the output from `newproc.d`. I also collected the output from `lastwords mtbserver` for a couple of the trials. (The attachment includes a few additional `.txt` files that discuss the logs in more detail.)

Perhaps the most useful observation from these new logs is that the problematic `ibtool` process starts _after_ VS has disconnected from the Mac build host. So it seems that the `ibtool` failure does not cause the disconnect but instead is caused _by_ the disconnect. Indeed, clicking the "Disconnect" toolbar button during the IBToolTask is sufficient to reproduce the 0-byte `.plist` problem (on both XVS 3.9 and XVS 3.8).

Assuming this observation is strictly accurate, the remaining question is why is XVS 3.9 more susceptible to disconnecting "spontaneously" during IBToolTask than XVS 3.8?
Comment 30 Brendan Zagaeski (Xamarin Team, assistant) 2015-02-11 00:57:40 UTC
I should reword my last question in comment 29 slightly to be more precise: why is XVS 3.9 more likely to get disconnected "spontaneously" during IBToolTask than XVS 3.8?
Comment 31 Ruben Macias 2015-02-23 16:47:23 UTC
Is there an update on this?  I don't know how, but now I'm seeing this issue.  Not sure what happened, but I can re-produce this every single time on my project.  And my logs are consistent with Brendan's logs as well.  However, this only happens when I'm deploying to an iPhone, but works just fine when deploying to a simulator.  Seems when I try to debug on an iPhone, the connection to the build host is killed, and creating the issue.  Just like Brendan  described.
Comment 32 Brendan Zagaeski (Xamarin Team, assistant) 2015-02-24 18:40:13 UTC
*** Bug 27140 has been marked as a duplicate of this bug. ***
Comment 33 Kent Green [MSFT] 2015-03-04 17:38:44 UTC
*** Bug 25536 has been marked as a duplicate of this bug. ***
Comment 34 Brendan Zagaeski (Xamarin Team, assistant) 2015-03-09 20:40:53 UTC
I found a "lucky" project today while working with a customer. This project appears to reproduce the primary problem (where the build host disconnects during IBToolTask) 100% of the time.

I have filed a separate bug report to track the investigation of that new "lucky" test case here: bug 27805. Hopefully solving the problem for that test case will also stop the problem for all of the intermittent appearances of the problem observed in this bug.
Comment 35 Ruben Macias 2015-03-10 12:21:29 UTC
Interesting findings Brendan, and it's good you can reproduce consistently now.  I don't have any storyboards in my project, but I do have XIB files.  I can also re-produce is very consistently too.  It's rather annoying and it usually takes a number of cleans and rebuilds before it actually works, and then it will break again on the next Rebuild.  It's getting to the point to where it's starting to hurt productivity.  If I can be of any assistance in helping resolve this issue faster, let me know.  I would love for this fix asap.  Let me know if I can help.  Thanks!
Comment 38 asimk 2015-04-14 12:26:02 UTC
I have checked this issue with build (XVS 3.9.221 + XI 8.6.0.41) as mentioned in comment-1 but I am not able to reproduce this issue.

I have also checked this issue with latest Cycle 5 build (XVS 3.11.426 + XI 8.10.0.255) and not able to reproduce this.

I have checked this issue 40 times with both builds.
Comment 39 Jon Goldberger [MSFT] 2015-06-15 14:32:48 UTC
Possibly related bug #31120
Comment 40 Paul Johnson 2015-09-01 12:33:23 UTC
I'm seeing this on VS2015 (beta as of 1st Sept)
Comment 41 Brendan Zagaeski (Xamarin Team, assistant) 2015-09-02 14:44:03 UTC
@Paul, thanks for the report. Since this exact bug report has been in the "resolved" state since April, it can be treated as "closed" at this time.

If you have a Business license or higher, the best way to proceed would be to contact Xamarin Support via email [1]. The support team will request additional details (in particular your diagnostic MSBuild output [2] and your log files), and then help file a new bug report if appropriate.

[1] https://kb.xamarin.com/customer/portal/articles/1632104-how-do-i-contact-xamarin-for-support-

[2] http://developer.xamarin.com/guides/android/troubleshooting/troubleshooting/#Diagnostic_MSBuild_Output

(This article section applies to both Xamarin.Android and Xamarin.iOS.)



If you have a Starter or Trial license, you can file a new bug report directly. Be sure to include your diagnostic MSBuild output and log files on the bug report.



Thanks in advance.

Brendan
Xamarin Customer Support
Comment 42 jclark 2015-10-16 12:12:36 UTC
This also occurs when adding a "Tab Item" to a "Tab Bar" in the IOS Designer. Able to resolve this by removing the "key" declaration in the storyboard markup.
Comment 43 John Nolan 2016-06-09 08:41:03 UTC
Still able to reproduce this error in Xamarin 4.0.4.4 and Xamarin.iOS 9.6.2.2
Comment 44 Brendan Zagaeski (Xamarin Team, assistant) 2016-06-11 01:17:36 UTC
@John, please see Comment 41.  This bug report can be considered "closed" at this time.  If you can provide a way to reproduce this problem consistently, please file a new bug report that describes those steps (including a test case if appropriate).  See also https://kb.xamarin.com/customer/en/portal/articles/1910343-when-and-how-should-i-file-a-bug-report- for a few additional recommendations to get the best outcomes from bug reports.
Comment 45 John Nolan 2016-06-13 08:08:53 UTC
Thanks @Brednan Zagaeski, 

It seems to be an error in an async operation and a package on the Mac Build Host named SCPlugin. There appears to be some issues with SSH. Removing the plugin solved my issues. Also, be sure when editing an XML within the storyboard to avoid adding key declarations... 

Another issue with can cause fragilty in the Mc Host connection is deploying to a simulator with a native binding which is NOT i386. I had this issue when using an objective C .a file with a C# binding. 

That is all. 

:)