Bug 34585 - Checksum verification assumes bash as shell; connection to Mac fails with different shell
Summary: Checksum verification assumes bash as shell; connection to Mac fails with dif...
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: XMA ()
Version: 4.0.0 (C6)
Hardware: PC Mac OS
: High critical
Target Milestone: 4.0.1 (C6SR1)
Assignee: Bugzilla
Depends on:
Reported: 2015-10-06 05:51 UTC by xamarinbugs
Modified: 2017-02-03 04:43 UTC (History)
14 users (show)

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

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 xamarinbugs 2015-10-06 05:51:01 UTC
Mac host: 10.11.1 Beta (15B22c), Xamarin Studio, Xcode 7.1 beta (7B75)
Windows VM using VMware Fusion 8.0.0
Windows: 10.0.10547, Visual Studio 14.0.23107.0, Xamarin, Xamarin.iOS

My Mac is immediately found in "Select a Mac to use it as a Xamarin Mac Agent". The public host key is displayed as well. After trying to log in, however, I get "Couldn't connect to <Mac's host name>. Please try again." If I try incorrect credentials, I get a different error, so that's presumably not the issue.

While that is happening, the VS Output window shows:

Installing Broker
Uploading Broker (352/3494 KB) 10%...
Uploading Broker (704/3494 KB) 20%...
Uploading Broker (1056/3494 KB) 30%...
Uploading Broker (1408/3494 KB) 40%...
Disconnected from Mac insilico.local (
Uploading Broker (1760/3494 KB) 50%...
Uploading Broker (2112/3494 KB) 60%...
Uploading Broker (2448/3494 KB) 70%...
Uploading Broker (2800/3494 KB) 80%...
Uploading Broker (3152/3494 KB) 90%...
Uploaded Broker 100%
Checksum failed for '/Users/chucker/Library/Caches/Xamarin/XMA/Broker/'
Unable to install the Broker
Couldn't connect to insilico.local. Please try again.

Oddly enough, the upload continues even after the dialog box already shows the "Couldn't connect" error.

In addition, on the host Mac, sshd apparently forcibly disconnects the session:

06/10/15 11:47:02,554 sshd[42779]: error: connect_to port 55460: failed.

I'm also getting these odd errors, so maybe the cause is something related to OS X (or, specifically, this OS X pre-release build):

06/10/15 11:48:15,621 com.apple.xpc.launchd[1]: (com.openssh.sshd.F60C08A6-3CC5-4056-B212-41016D1825A5[42746]) Service exited with abnormal code: 1

Here's what /var/log/system.log says:

Oct  6 11:50:06 SNK-L-4 sshd[42976]: Accepted keyboard-interactive/pam for chucker from port 1926 ssh2
Oct  6 11:50:07 SNK-L-4 sshd[42979]: Accepted keyboard-interactive/pam for chucker from port 1927 ssh2
Oct  6 11:50:09 SNK-L-4 sshd[42980]: error: connect_to port 59965: failed.
Comment 1 xamarinbugs 2015-10-06 05:51:51 UTC
See also my earlier post at http://forums.xamarin.com/discussion/comment/155541/#Comment_155541, where I experienced the same issue with build 1505.
Comment 2 xamarinbugs 2015-10-09 17:50:38 UTC
I think I see the problem now. In %localappdata%\Xamarin\Logs\14.0:

Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2015-10-09 23:45:44.7451] MacServer State transition from DisconnectedState to SshConnectingState on SNK-L-4.local (
Xamarin.Messaging.Client.Ssh.SshCommandRunner Warning: 0 : [2015-10-09 23:45:48.0910] Failed to execute 'find /Users/chucker/Library/Caches/Xamarin/XMA/Broker/ | while read line ; do md5 -q $line ; done': ExitStatus=127
Xamarin.Messaging.Client.Ssh.SshCommandRunner Warning: 0 : [2015-10-09 23:45:48.2540] Missing end to balance this while loopfish: find /Users/chucker/Library/Caches/Xamarin/XMA/Broker/ | while read line ; do md5 -q $line ; done
Specifically, the bug here appears to be that you're running a shell script with bash-like syntax, whereas my account uses fish as its shell.
Comment 3 xamarinbugs 2015-10-09 17:56:29 UTC
Temporarily setting /bin/bash as my default shell seems to do the trick. Thus, changing the summary to be more specific.
Comment 6 xamarin-release-manager 2015-10-21 13:46:47 UTC
Fixed in version (cycle6)

Author: Adrian Alonso
Commit: 1a6165e593ea20c5ab676a137a5bd1af2418d755 (xamarin/XamarinVS)
Comment 7 Mohit Kheterpal 2015-11-03 07:51:42 UTC
I have checked this issue with XVS and observed that this issue does not exist now, I have installed Fishshell on mac and set it as default. After that I am able to connect my windows VS with mac build host and also able to build deploy application on mac without any error. 

Using XVS + monotouch-

Comment 8 xamarin-release-manager 2015-11-26 10:39:37 UTC
Fixed in version (cycle6)

Author: Adrian Alonso
Commit: 81e952a00dfbd7cf1c9a1e4c1970f9eb64544a38 (xamarin/XamarinVS)
Comment 9 Michael 2016-11-01 23:27:02 UTC
So looks like this issue is back. I'm using Fish shell and this same issue continues to happen. Xamarin Mac Agent cannot connect unless I change the default shell back to BASH for debugging.

=== Xamarin Studio Community ===

Version 6.1.1 (build 17)
Installation UUID: 8cf23d23-2b12-412e-8a05-78915207b21d
	Mono 4.6.1 (mono-4.6.0-branch-c8sr0/ef43c15) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 406010005

=== NuGet ===


=== Xamarin.Profiler ===

Version: 0.33.2
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 7.3.1 (10188.1)
Build 7D1014

=== Xamarin.iOS ===

Version: (Xamarin Studio Community)
Hash: b638977
Branch: xcode8.1
Build date: 2016-10-25 14:38:48-0400

=== Xamarin.Android ===

Version: (Xamarin Studio Community)
Android SDK: /Users/<username>/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.0.3 (API level 15)
		4.4   (API level 19)
		5.0   (API level 21)
		6.0   (API level 23)

SDK Tools Version: 25.2.2
SDK Platform Tools Version: 24.0.3
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

Android Designer EPL code available here:

=== Xamarin Android Player ===

Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: (Xamarin Studio Community)

=== Build Information ===

Release ID: 601010017
Git revision: 44d481a9be9cf2bf7c01bfb99c59b77dfa08e712
Build date: 2016-10-25 14:27:24-04
Xamarin addins: 19cdb28081bf28d9688698030abb96e04e391f69
Build lane: monodevelop-lion-cycle8-sr0

=== Operating System ===

Mac OS X 10.12.0
Darwin cphs-mac-003.local 16.0.0 Darwin Kernel Version 16.0.0
    Mon Aug 29 17:56:20 PDT 2016
    root:xnu-3789.1.32~3/RELEASE_X86_64 x86_64

=== Enabled user installed addins ===

WakaTime 2.0.2
Show in Github 1.0.3
Comment 10 Conrad Yoder 2017-01-17 22:03:14 UTC
Confirmed this is still a problem - same results as @Michael

Windows 10 Pro x64
Visual Studio 2015 Enterprise (v 14.0.25431.01 Update 3)

OS X 10.11.6
Xamarin Studio
Mono 4.6.2
Xcode 8.2.1

Can this bug be reopened?
Comment 11 Conrad Yoder 2017-01-24 14:18:58 UTC
What's the protocol here - will this bug be reopened, or should I submit a new bug for this reappearing issue?
Comment 13 Jose Gallardo 2017-01-25 02:54:23 UTC
Hi Michael and Conrad,

This issue is already fixed in Xamarin for VS 4.3. You can give it a try already, as it's currently available in the Beta and Alpha channels.

If for some reason you are still facing it with that version, please feel free to reopen this bug report and it would be very helpful if you can provide the Xamarin logs and environment information.

Comment 14 Bret Johnson [MSFT] 2017-02-02 21:17:17 UTC
I saw this on the latest VS 2017:
Xamarin (95cf4d3)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Comment 15 Brendan Zagaeski (Xamarin Team, assistant) 2017-02-03 04:43:24 UTC
I have now filed a follow-up bug to track issues with using alternate shells on the Mac with XamarinVS versions higher than

Bug 52264

I will set this bug back to "verified" based on the original verification for Cycle 6 in Comment 7.  Investigation of similar symptoms in versions higher than can be tracked on the new bug.