Bug 57239 - iOS Build timeout issue (Visual Studio 2017 15.2)
Summary: iOS Build timeout issue (Visual Studio 2017 15.2)
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: 15.4
Assignee: Bugzilla
Depends on:
Reported: 2017-06-07 13:45 UTC by awhitworth
Modified: 2017-07-27 10:21 UTC (History)
8 users (show)

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

Diagnostic build log showing issue (6.43 MB, text/plain)
2017-06-07 13:45 UTC, awhitworth
Mac Build Logs (40.63 KB, application/x-zip-compressed)
2017-06-26 08:20 UTC, awhitworth

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 awhitworth 2017-06-07 13:45:57 UTC
Created attachment 22745 [details]
Diagnostic build log showing issue


I wasn't sure exactly where to log this but there seems to have been an issue introduced somewhere in the Xamarin Visual Studio integration between Visual Studio 2017 15.0 and Visual Studio 2017 15.2.

Steps to reproduce:

1. Create a new Cross Platform App (Xamarin), use the Blank App template, Xamarin.Forms UI Technology and Portable Class Library (PCL) Code Sharing Strategy.

2. Change the startup project to the .iOS project and set the solution platform to iPhoneSimulator.

3. Rebuild the solution. The build will succeed and you can fire up the app in the iOS simulator.

4. Add the HockeySDK.Xamarin .NuGet package (version 4.10) to the .Android and .iOS projects.

5. Rebuild the solution. The build will fail.

6. If you remove the HockeySDK.Xamarin .NuGet package and rebuild the solution again it will succeed.

This was working fine in Visual Studio 2017 15.0.

I've attached the Diagnostic build log of when the build fails. There seems to be a timeout on line 38502 when executing the MTouch task. I believe as part of the build process it is attempting to copy the HockeySDK.iOSBindings.dll file to the Mac build host - note this file is nearly 36 MB in size.

Here is the info regarding versions installed etc. shown in the Visual Studio About Box:

Microsoft Visual Studio Enterprise 2017
Version 15.2 (26430.12) Release
Microsoft .NET Framework
Version 4.6.01586

Installed Version: Enterprise

Visual Basic 2017   00369-60000-00001-AA667
Microsoft Visual Basic 2017

Visual C# 2017   00369-60000-00001-AA667
Microsoft Visual C# 2017

Visual F# 4.1   00369-60000-00001-AA667
Microsoft Visual F# 4.1

Application Insights Tools for Visual Studio Package   8.6.00404.2
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2017   15.0.30503.0
ASP.NET and Web Tools 2017

ASP.NET Web Frameworks and Tools 2017   5.2.50303.0
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0   15.0.30209.0
Azure App Service Tools v3.0.0

Azure Data Lake Node   1.0
This package contains the Data Lake integration nodes for Server Explorer.

Azure Data Lake Tools for Visual Studio   2.2.5000.0
Microsoft Azure Data Lake Tools for Visual Studio

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

Fabric.DiagnosticEvents   1.0
Fabric Diagnostic Events

JavaScript Language Service   2.0
JavaScript Language Service

KofePackagePackage Extension   1.0
KofePackagePackage Visual Studio Extension Detailed Info

Merq   1.1.17-rc (cba4571)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.

Microsoft Azure Hive Query Language Service   2.2.5000.0
Language service for Hive query

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.50131.1

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Mono Debugging for Visual Studio   Mono.Debugging.VisualStudio
Support for debugging Mono processes with Visual Studio.

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

Redgate ReadyRoll
Extend DevOps processes to your SQL Server databases and safely automate database deployments.
Visit https://www.red-gate.com/readyroll for more information.

Copyright (C) 2011 Red Gate Software Ltd. All rights reserved.
This software contains components from Component Owl.
SQL Server is a registered trademark of Microsoft Corporation. 
Visual Studio is a registered trademark of Microsoft Corporation. 

ReadyRoll contains code from the following open source software:

NuGet https://www.nuget.org/
SQL LocalDB Wrapper https://github.com/martincostello/sqllocaldb
Autofac https://autofac.org/
Json.NET https://json.net/
MahApps.Metro http://mahapps.com/
SemVer https://github.com/maxhauser/semver
Log4Net http://logging.apache.org/log4net/
Extended WPF Toolkit https://wpftoolkit.codeplex.com/
Code InfoBox VSX http://www.codeproject.com/Articles/55196/Code-InfoBox-Visual-Studio-Extension-VSX
OctoPack https://github.com/OctopusDeploy/OctoPack
SQLite https://sqlite.org/

This product contains icons from http://www.visualpharm.com distributed under a free backlink license.

For license details or other notices relating to the above software, please see NOTICE.TXT and EULA.rtf in the ReadyRoll application folder.

Redgate SQL Prompt
Write, format, and refactor SQL effortlessly

SQL Server Data Tools   15.1.61702.140
Microsoft SQL Server Data Tools

ToolWindowHostedEditor   1.0
Hosting json editor into a tool window

TypeScript tools for Visual Studio

Xamarin (1be4f0c)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android SDK (9dbc4c5)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK (4cffddf)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
Comment 1 Timothy Risi 2017-06-07 21:39:08 UTC
Moving to the Visual Studio Extensions product
Comment 2 awhitworth 2017-06-19 09:11:27 UTC
Any update on this please as not seen any activity on this in 12 days!
Comment 3 mag@xamarin.com 2017-06-19 14:40:15 UTC

We will take a look today and try to reproduce the problem by following the steps that you wrote and will let you know soon when we have an update or solution.

Comment 4 awhitworth 2017-06-23 09:08:08 UTC
Any update on this please?
Comment 5 mag@xamarin.com 2017-06-23 19:44:17 UTC

I've been trying to reproduce the issue following the exact steps that you wrote, but I'm able to build the app with or without the NuGet installed.

The MTouch error in the logs means that MSBuild had a timeout while waiting the remote execution of the MTouch task in the Mac. This could have happened because of a failure in the Build Agent in the Mac while executing the Task or because the Task in the Mac took longer than the expected.

In either case, it would be very useful to have the Mac logs, specially the Build Agent logs in verbose mode.

- To have verbose logs in both Win and Mac, please start VS in log mode: "devenv.exe /log"

- To get Build Agent log, please get this file from the Mac (please attach the log corresponding to the current VS session, you can do that by timestamp):

~/Library/Logs/Xamarin-x.x/xx.Build.log and xx.Build.stderr.log

As an alternative you can let VS to get them automatically while you are still connected to the Mac, by doing: Help > Xamarin > Zip Logs...

Meanwhile you attache the Build Agent logs, I will continue trying to connect to different Macs also in a different network to see if by any combination I can get this behaviour.

Comment 6 mag@xamarin.com 2017-06-23 20:01:18 UTC
As an additional information, this is the message that is causing the timeout:

"warning : An error occured on client build26724awhit while executing a post for topic xvs/Build/ The operation has timed out."

The compare-items message responsibility is just to compare the hashes of the input files against the ones that are in the Mac (if they are) to determine the missing or changed files to copy. The payload of the request and response messages for that post should not be large.

For that reason, the size of the HockeySDK.iOSBindings.dll doesn't matter in this error, because that message is not related to copying the file over the wire. This is happening before that part, so the timeout is strange in this case.

I was also able to build the solution successfully against a Mac in another network and far from the Windows machine.
Comment 7 awhitworth 2017-06-26 08:20:58 UTC
Created attachment 23105 [details]
Mac Build Logs

Mac Build Logs as attached
Comment 8 mag@xamarin.com 2017-06-26 15:58:13 UTC
I found the root cause of the timeout issue. I will be pushing the fix today and it will be available on the next Xamarin 15.4 release.
Comment 9 mag@xamarin.com 2017-06-26 17:56:27 UTC
This issue has been fixed and will be available in 15.4 release.
Fix commit on master branch: e9f1a449c30775d25036cb50dc16cb440901573b
Comment 10 awhitworth 2017-07-03 12:32:45 UTC

What sort of timeframe are we looking at for the 15.4 release?