Bug 42411 - CopyFileToWindows fails with Renci.SshNet.Common.SshException: Message type 80 is not valid.
Summary: CopyFileToWindows fails with Renci.SshNet.Common.SshException: Message type 8...
Status: VERIFIED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: 4.2.0 (C8)
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-07-07 21:51 UTC by Jerome Laban
Modified: 2016-08-02 19:40 UTC (History)
8 users (show)

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


Attachments
exception (12.17 KB, text/plain)
2016-07-07 21:51 UTC, Jerome Laban
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:
VERIFIED FIXED

Description Jerome Laban 2016-07-07 21:51:42 UTC
Created attachment 16606 [details]
exception

Using Xamarin.iOS 9.8.0.323 on Windows, automating the IPA generation sometimes fails with the following exception : 

error MSB4018: The "CopyFileToWindows" task failed unexpectedly. [E:\Agent2\29\s\XXXXXXXX.iOS\XXXXXXXX.iOS.csproj]
error MSB4018: System.AggregateException: One or more errors occurred. ---> Renci.SshNet.Common.SshException: Message type 80 is not valid. [E:\Agent2\29\s\XXXXXXXX.iOS\XXXXXXXX.iOS.csproj]
error MSB4018:    at Renci.SshNet.Session.WaitOnHandle(WaitHandle waitHandle, TimeSpan timeout) [E:\Agent2\29\s\XXXXXXXX.iOS\XXXXXXXX.iOS.csproj]
error MSB4018:    at Renci.SshNet.Session.Renci.SshNet.ISession.WaitOnHandle(WaitHandle waitHandle) [E:\Agent2\29\s\XXXXXXXX.iOS\XXXXXXXX.iOS.csproj]
error MSB4018:    at Renci.SshNet.Channels.ChannelSession.Open() [E:\Agent2\29\s\XXXXXXXX.iOS\XXXXXXXX.iOS.csproj]
error MSB4018:    at Renci.SshNet.ScpClient.Download(String filename, Stream destination) [E:\Agent2\29\s\XXXXXXXX.iOS\XXXXXXXX.iOS.csproj]
error MSB4018:    at Xamarin.Messaging.VisualStudio.MessagingService.<DownloadFileAsync>d__82.MoveNext() in C:\Users\builder\data\lanes\3345\2e397405\source\XamarinVS\src\Messaging\Xamarin.Messaging.VisualStudio\MessagingService.cs:line 522 [E:\Agent2\29\s\XXXXXXXX.iOS\XXXXXXXX.iOS.csproj]


Manually updating (and changing msbuild.exe binding redirects) to the binaries found in https://www.nuget.org/packages/SSH.NET/2016.0.0-beta2 directly in the "C:\Program Files (x86)\MSBuild\Xamarin\iOS" folder fixes the issue.
Comment 1 Brendan Zagaeski (Xamarin Team, assistant) 2016-07-14 20:52:17 UTC
## Note to the Xamarin team

For cross-referencing, there is a chance that updating XamarinVS to use the latest version of the SSH.NET library (as mentioned in Comment 0) might help with Bug 40959 too.
Comment 3 Sunil Kumar 2016-08-02 19:40:15 UTC
I have checked this issue with latest Master XVS 99.0.0.3286 + XI 9.11.0.57 XI and Cycle 8 XVS 4.2.0.413 + XI 9.10.0.38 and observed that now this issue is working fine. I tried to generate IPA approx. 10 times and every time Automating the IPA generation is working without any exception. 

As of now I am closing this issue. Please feel free to reopen if anyone still getting this issue.

Cycle 8 Environment info:
XI 9.10.0.38

Microsoft Visual Studio Professional 2013
Version 12.0.40629.00 Update 5
Microsoft .NET Framework
Version 4.6.01055

Xamarin   4.2.0.413 (b5d9567)
Xamarin.Android   6.2.0.23 (fdaf900)
Xamarin.iOS   9.10.0.36 (22921dd)

Master Environment info:
XI 9.11.0.57

Microsoft Visual Studio Professional 2013
Version 12.0.40629.00 Update 5
Microsoft .NET Framework
Version 4.6.01055

Xamarin   99.0.0.3286 (e471f3e)
Xamarin.Android   6.1.99.402 (7472cfe)
Xamarin.iOS   9.11.0.30 (9530bdf)