Bug 57822 - XMA does not work with different shell on mac (zsh)
Summary: XMA does not work with different shell on mac (zsh)
Status: VERIFIED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: XMA ()
Version: 4.6.0 (15.3)
Hardware: PC Windows
: Normal normal
Target Milestone: 15.4
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-06-28 08:17 UTC by Mikael Kolkinn
Modified: 2017-09-29 12:54 UTC (History)
3 users (show)

Tags:
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:
Status:
VERIFIED FIXED

Description Mikael Kolkinn 2017-06-28 08:17:03 UTC
The Xamarin Mac Agent does not seem to work properly when the default shell in OS X is set to zsh.
Viewing the traces, it fails when trying to locate the md5 and md5sum tools:

Warnings:
Failed to execute 'type -P md5': ExitStatus = 1
zsh:1: bad option: -P

Failed to execute 'type -P md5sum': ExitStatus = 1
zsh:1: bad option: -P


Errors:
Could not find an md5 tool on the connected Server. Searched tools: md5, md5sum

An error occurred while uploading files
Xamarin.Messaging.Ssh.Exceptions.SshCommandException: Could not find an md5 tool on the connected Server. Searched tools: md5, md5sum
   at Xamarin.Messaging.Ssh.SshCommands.<GetMd5ToolAsync>d__42.MoveNext() in C:\Git\XVS\src\Messaging\Xamarin.Messaging.Ssh\SshCommands.cs:line 584
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Xamarin.Messaging.Ssh.SshCommands.<GetFileChecksumCommandTextAsync>d__39.MoveNext() in C:\Git\XVS\src\Messaging\Xamarin.Messaging.Ssh\SshCommands.cs:line 521
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Xamarin.Messaging.Ssh.SshCommands.<GetFileChecksumAsync>d__10.MoveNext() in C:\Git\XVS\src\Messaging\Xamarin.Messaging.Ssh\SshCommands.cs:line 79
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Xamarin.Messaging.Ssh.MessagingFileManager.<UploadFileAsync>d__10.MoveNext() in C:\Git\XVS\src\Messaging\Xamarin.Messaging.Ssh\MessagingFileManager.cs:line 117

Unable to install the Broker


When using bash as the default shell, XMA works fine.
Switching to bash before executing commands, when connecting through ssh might be a solution.
Otherwise `type -p md5` and `type -p md5sum` with a lower case 'p' works in both bash and zsh.
Comment 1 mag@xamarin.com 2017-06-28 16:29:22 UTC
Thanks for the detailed information. We identified the issue and we are working on supporting other shells than bash.
We will be pushing the fix soon.
Comment 2 xamarin-release-manager 2017-06-28 16:39:25 UTC
Fixed in version 4.7.0.694 (xma-refactoring)

Author: Mauro Agnoletti
Commit: b97133812c058e9d3e883d7fe83d959d5952606e (xamarin/XamarinVS)