Bug 53013 - [Xamarin VS][][Windows10][R-100%][Designer]-Main.StoryBoard is unable to load after connecting to MacAgent and doesnt work when closed/Opened .storyboard file.
Summary: [Xamarin VS][][Windows10][R-100%][Designer]-Main.StoryBoard is unabl...
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS Designer ()
Version: 4.3.1 (15.1)
Hardware: PC Windows
: --- major
Target Milestone: 15.1
Assignee: Bugzilla
Depends on:
Reported: 2017-03-03 13:13 UTC by Gaurav Ganorkar
Modified: 2017-03-21 17:00 UTC (History)
7 users (show)

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

Attached Xamarin Logs. (2.47 KB, application/zip)
2017-03-06 06:12 UTC, Gaurav Ganorkar
Attached Logs & screenshot (54.69 KB, application/x-zip-compressed)
2017-03-17 12:55 UTC, Gaurav Ganorkar
Logs after verifying the bug on Master XVS (10.88 KB, application/x-rar)
2017-03-21 16:58 UTC, Gaurav Ganorkar

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 Gaurav Ganorkar 2017-03-03 13:13:17 UTC
Microsoft Visual Studio Enterprise 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.6.01055
Xamarin (3b21f70)
Xamarin.Android (8943b85)
Xamarin.iOS (c3b39f2)

Steps to Reproduce
1-Create an iOS single view app
2-Open Main.Storyboard before connecting to mac agent
3-As Error message opens in main.storyBoard to connect to mac server , Click on Connect to mac server
4-As mac agent gets connected , Verify if main.storyboard loads 

-Main.StoryBoard is unable to load after connecting to mac Agent

-Main.StoryBoard should get load after connecting to mac Agent

For steps 
Please refer below screencast link.
https://www.screencast.com/t/DMEIDaMepuan (Play without Sound :D )
Comment 1 Alan McGovern 2017-03-03 18:29:59 UTC
Can you click on Help -> Zip Xamarin Logs and attach them to this bug report? We need those to diagnose the issue.

Comment 2 Gaurav Ganorkar 2017-03-06 06:12:19 UTC
Created attachment 20143 [details]
Attached Xamarin Logs.

Alan , 
i have once again reproduced issue on my machine and Have generated fresh logs , Please go through them and let me know if more info needed.

Also when mac agent gets connected , i am seeing the error under intelliSense that 
[Failure] Could not find a part of the path 'C:\Users\User\documents\visual studio 2015\Projects\SampleDemo\SampleDemo\obj\iPhoneSimulator\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs'.
[Failure] Could not find a part of the path 'C:\Users\User\documents\visual studio 2015\Projects\SampleDemo\SampleDemo\obj\iPhoneSimulator\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs'.
[Failure] Could not find a part of the path 'C:\Users\User\documents\visual studio 2015\Projects\SampleDemo\SampleDemo\obj\iPhoneSimulator\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs'.
Comment 3 Alan McGovern 2017-03-06 12:46:59 UTC
These logs look like they're from a master build, not a C9 build.

Just to confirm - you are completely unable to get any storyboard to render? You cannot open an iOS, WatchOS or tvOS storyboard?

When you hit this error can you try killing the `CoreSimulatorService` process and see if that fixes it?
Comment 4 Gaurav Ganorkar 2017-03-06 14:47:42 UTC
Sorry alan i was not able to mention this at first !

After creating a new Single View iOS app

Condition 1 -If Mac agent is connected and Opened StoryBoard.
Result- Able to see the storyboard for iOS/WatchOS/TVoS , Not issue at this point

Condition 2 -If Mac Agent is not connected and opened Storyboard
-connect to mac server error message is displayed 
This point when we tried to connect mac agent by clicking on the "Connect to mac server" on storyboard , I am able to see this issue.

So this issue lies under condition 2. 

If i gone via condition 1 , i am able to see the storyboard.

Also i tried killing the `CoreSimulatorService` process but i am still getting the error ! Issue is whenever i tried to connect the mac Agent from the storyboard error message , we are not able to view storyboard.
Comment 5 xamarin-release-manager 2017-03-13 22:20:40 UTC
Fixed in version (master)

Author: Alan McGovern
Commit: 379ec3832f7880fef57842b6ade32201cc82b58d (xamarin/XamarinVS)
Comment 6 Gaurav Ganorkar 2017-03-17 12:55:11 UTC
Created attachment 20416 [details]
Attached Logs & screenshot

Hi Alan,

Issue is 100% reproducible with the 15.1 build.

Have verified it on VS-2017 & VS-2015.
We have found same issue while creating app for F# / iOS & also for xaml previewer.

Build taken:
Xamarin (b78a343)
-Xamarin.Android SDK (ff38526)
-Xamarin.iOS and Xamarin.Mac SDK (49a63dc)
Comment 7 Luis Aguilera 2017-03-17 15:57:46 UTC
@gaurav please test from a build from XVS/master. And I'll see about getting this fix into d15-1
Comment 8 Alan McGovern 2017-03-18 16:51:07 UTC
The issue is that the machine used for testing the fix has a misconfigured/broken/missing Xcode. The failure from the logs is:

[2017-03-17 18:07:46.4] INFO: CSProxyHost Port: 58891
[2017-03-17 18:07:46.4] INFO: I got the message [InitializeRequest] with attrs: 
[2017-03-17 18:07:46.4] INFO: Unexpected exception while inside the message loop, terminating.
[2017-03-17 18:07:46.4] INFO: System.ArgumentException: Directory does not exist
[2017-03-17 18:07:46.4] INFO: Parameter name: appRootPath
[2017-03-17 18:07:46.4] INFO:   at MonoTouch.Hosting.XcodeInfo..ctor (System.String appRootPath) [0x00037] in <6f1bf090c0cf4aebaf828603fddebf92>:0 
[2017-03-17 18:07:46.4] INFO:   at CSProxyHost.MainClass.InitializeDesigner (System.String xcodePath) [0x00000] in <1ac1381177d04ffb9bfab1be04bce372>:0 
[2017-03-17 18:07:46.4] INFO:   at CSProxyHost.MainClass.HandleMessage (MonoTouch.Design.CommandRequest message) [0x0006c] in <1ac1381177d04ffb9bfab1be04bce372>:0 
[2017-03-17 18:07:46.4] INFO:   at CSProxyHost.MainClass+<BeginListening>c__async0.MoveNext () [0x0011f] in <1ac1381177d04ffb9bfab1be04bce372>:0 
[2017-03-17 18:07:46.4] ERROR: Could not connect to the remote mac:

We can improve the error message in this scenario, but for now can you list which Xcode is specified in your Visual Studio and confirm if it exists on your Mac agent?

Either way, this should be filed separately as it is unrelated to this patch and this bug.

Comment 9 Alan McGovern 2017-03-18 17:29:03 UTC
If there is a mismatch we should file a bug against XVS itself as it should be complaining loudly when the Xcode the user choose does not exist.
Comment 10 Neha Kharbade 2017-03-20 12:19:39 UTC
Hi All,

I am able to get build for here: https://wrench.internalx.com/Wrench/ViewLane.aspx?lane_id=4590&host_id=406&revision_id=868699 & 

Build here: https://wrench.internalx.com/Wrench/ViewLane.aspx?lane_id=4571&host_id=406&revision_id=868612

But unable to find exact fixed build mean a while I have also verified on d15-1 build this bug is still reproducible.

It would be great if any one can provide me the link for fixed version.
Comment 11 Luis Aguilera 2017-03-20 14:49:12 UTC
@neha... you can take the latest build from the XVS master lane. Currently, it's build https://wrench.internalx.com/Wrench/ViewLane.aspx?lane_id=3012&host_id=406&revision_id=872378

In future, you can see all of the builds on XVS master by accessing this link: https://wrench.internalx.com/Wrench/index.aspx?lane=xvs-win-master
Comment 12 Gaurav Ganorkar 2017-03-21 16:58:50 UTC
Created attachment 20530 [details]
Logs after verifying the bug on Master XVS

Attached logs_Mainstoryboard.rar

Verified on-
Microsoft Visual Studio Professional 2015
Version 14.0.25420.01 Update 3
Microsoft .NET Framework
Version 4.6.01586
Xamarin (3ab2313)
Xamarin.Android (e5b2951)
Xamarin.iOS (ee5cc41)

Wrench link -https://wrench.internalx.com/Wrench/ViewLane.aspx?lane_id=3012&host_id=406&revision_id=872378

Issue is fixed on to the given build