Bug 58052 - XMA shows state as "disconnected" even though I am able to open storyboard designer, edit files, and pull logs from my Mac
Summary: XMA shows state as "disconnected" even though I am able to open storyboard de...
Status: CONFIRMED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS Designer ()
Version: 4.6.0 (15.3)
Hardware: PC Windows
: --- major
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-07-10 17:20 UTC by Pierce Boggan [MSFT]
Modified: 2017-07-17 15:47 UTC (History)
12 users (show)

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


Attachments
Logs from Mac + Windows (48.63 KB, application/x-zip-compressed)
2017-07-10 17:20 UTC, Pierce Boggan [MSFT]
Details
iOS designer working, even though XMA is disconnected (93.55 KB, image/png)
2017-07-10 17:21 UTC, Pierce Boggan [MSFT]
Details
XMA window (34.69 KB, image/png)
2017-07-10 17:21 UTC, Pierce Boggan [MSFT]
Details
Logs from a successful build, even though XMA shows as disconnected (18.61 KB, application/x-zip-compressed)
2017-07-10 17:29 UTC, Pierce Boggan [MSFT]
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 for Bug 58052 on Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.
Related Links:
Status:
CONFIRMED

Description Pierce Boggan [MSFT] 2017-07-10 17:20:24 UTC
# Steps to reproduce
1. Create an iOS app in Visual Studio.
2. Connect to a Mac via XMA.
3. File -> New another iOS app. At this point, I "lost connectivity". I am showing as no connectivity in XMA or in the toolbar icon.
4. Open Main.storyboard. The file opens, renders correctly, and I can interact with it, even though XMA is saying I am _not_ connected.

# Expected behavior
XMA accurately reflects connection state.

# Actual behavior
XMA doesn't reflect connection state in this weird race condition.

# Supplemental info (logs, images, videos)
Logs attached.

# Test environment (full version information)
Environment Info: https://gist.github.com/pierceboggan/363ef465c39316b16a4299e351387165
Comment 1 Pierce Boggan [MSFT] 2017-07-10 17:20:45 UTC
Created attachment 23456 [details]
Logs from Mac + Windows
Comment 2 Pierce Boggan [MSFT] 2017-07-10 17:21:30 UTC
Created attachment 23457 [details]
iOS designer working, even though XMA is disconnected
Comment 3 Pierce Boggan [MSFT] 2017-07-10 17:21:43 UTC
Created attachment 23458 [details]
XMA window
Comment 4 Pierce Boggan [MSFT] 2017-07-10 17:29:16 UTC
Created attachment 23459 [details]
Logs from a successful build, even though XMA shows as disconnected
Comment 5 mag@xamarin.com 2017-07-10 17:53:11 UTC
The issue of losing connectivity when changing solutions or projects has been fixed with the following PR and commit hash on master (and pending for approval on 15-4):

- master PR: https://github.com/xamarin/XamarinVS/pull/7794
- master commit: 80073d196d5734bb7c955a0194c5c285c13cc3b9

Related to the different behavior with the designer, this happens because the Designer is not part of XMA anymore. They only uses the SSH layer of XMA, but they have a different and dedicated SSH connection.

What really happens is that the Designer logic is not listening the XMA disconnection (by an unhandled error or because the user decided to disconnect), so if the user opened a storyboard and then disconnects from XMA, they will be able to continue using the storyboard without XMA connected.

Assigning this bug to the Designer team so they can add a mechanism to be aware of the XMA disconnection and also disconnect the designer from the Mac. This will also allow them to not have issues if the user changes the connection to another Mac, etc.
Comment 6 Kent Green [MSFT] 2017-07-13 16:54:14 UTC
I have reviewed this bug as part of comparing issues in Visual Studio (Windows) with those in Visual Studio for Mac. It appears that there is no equivalent behavior in Visual Studio for Mac because it does not rely on the XMA / build host connection. 

The closest potential similarity I saw is if the Xcode path is altered or removed, but Visual Studio for Mac explicitly states that changing this path requires a restart, and it reacts correctly to a valid path vs. an invalid path after restarting; so even then there is no equivalency.