Bug 57715 - Connecting to Mac Agent fails most of the times, "Invalid access to memory location"
Summary: Connecting to Mac Agent fails most of the times, "Invalid access to memory lo...
Status: RESOLVED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 4.5.0 (15.2)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-06-23 14:19 UTC by Thomas
Modified: 2017-06-26 13:32 UTC (History)
4 users (show)

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


Attachments
Log file of Visual Studio (3.97 KB, application/octet-stream)
2017-06-23 14:19 UTC, Thomas
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 Thomas 2017-06-23 14:19:01 UTC
Created attachment 23085 [details]
Log file of Visual Studio

When trying to connect to the Mac Agent within Visual Studio, it fails most of the times.
To get a connection I sometimes have to try more than ten times, a restart of Visual Studio helps also sometimes.

I have tried everything described on this page:
https://developer.xamarin.com/guides/ios/getting_started/installation/windows/connecting-to-mac/troubleshooting/

The Mac has no connection to the internet, therefore I configured SSH with "UseDNS=no".
There is no .bashrc which could contain an error.
I tried adding the agent via its IP address, ensured the login shell is bash, deleted all caches.

Still no difference. This is really frustrating. Developing in this way is not feasible.
Connecting via SSH works always, only Visual Studio (tried 2015 and 2017) has this problem.
The output tab shows only this information:

Starting connection to Mac 10.130.17.71...
Couldn't connect to 10.130.17.71. Please try again.
Disconnected from the Mac 10.130.17.71 (10.130.17.71)
Starting connection to Mac 10.130.17.71...
Couldn't connect to 10.130.17.71. Please try again.
Disconnected from the Mac 10.130.17.71 (10.130.17.71)

The log file which is attached contains a stacktrace of a NetworkInformationException.
It occurs with every unsuccessful attempt.
"Unzulässiger Zugriff auf einen Speicherbereich" translates to "Invalid access to memory location".

If some information is still missing, just tell me.

Environment:
Microsoft Visual Studio Professional 2017
Version 15.2 (26430.14) Release

Microsoft Visual Studio Professional 2015
Version 14.0.25431.01 Update 3

Operating Sytem:
Windows 7 Enterprise SP1 64-bit
Mac OS X Sierra, Version 10.12

Versions:
Xamarin 4.5.0.486 (fec6f88)
Xamarin.Android 7.3.1.2 (9dbc4c5)
Xamarin.iOS 10.10.0.37 (ad35de4)
Xamarin.iOS 10.10.0.36 (Xamarin Studio Community)
Comment 1 Joaquin Jares 2017-06-23 14:53:35 UTC
Hi Thomas. There is a known issue with Windows 7 and .Net's networking stack. Try applying this: http://support.microsoft.com/kb/2588507. It should solve your problem. I'm marking this as NEEDINFO. Please report back if it works (and if it doesn't, too).
Comment 2 Thomas 2017-06-26 09:15:22 UTC
Thanks a lot. It works fine with the hotfix.
Comment 3 Thomas 2017-06-26 09:18:35 UTC
Please add this information to the troubleshooting page (see original post).
Comment 4 Joaquin Jares 2017-06-26 13:32:00 UTC
Sure, I'll let docs know. Glad it worked :)