Bug 39665 - Can't install Microsoft Band SDK v1.3.8
Summary: Can't install Microsoft Band SDK v1.3.8
Status: RESOLVED FIXED
Alias: None
Product: Components
Classification: Xamarin
Component: Xamarin Components ()
Version: Production (addons.xamarin.com)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Matthew Leibowitz
URL:
Depends on:
Blocks:
 
Reported: 2016-03-15 20:04 UTC by Brandon
Modified: 2016-04-12 12:31 UTC (History)
1 user (show)

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


Attachments
err msg in x.studio (18.42 KB, image/png)
2016-03-15 20:04 UTC, Brandon
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 or GitHub 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 Brandon 2016-03-15 20:04:39 UTC
Created attachment 15419 [details]
err msg in x.studio

Description of Problem:
I can install v1.3.7 of Band SDK w/o issue. However when I go to update to v1.3.8, I'm met with an error which reports itself as shown in the attachment

Steps to reproduce the problem:
1. Add Microsoft Band SDK v1.3.8 to a Xamarin.Android project 


Actual Results:
Errors out

Expected Results:
Success as in the v1.3.7 version of the package

How often does this happen? 
Every time

Additional Information:
Comment 1 Matt Ward 2016-03-15 21:03:50 UTC
The error looks like the Windows PathTooLongException so I suspect the only workaround would be to move to a shorter path for your project.

v1.3.8 of the Microsoft Band SDK does not seem to be available from the component store. Where are you getting it from?
Comment 2 Matt Ward 2016-04-10 12:24:51 UTC
Microsoft Band SDK v1.3.8 is now on the store. The sample solution has very long paths. Adding some logging I see the following directory which is over 260 characters:

C:\Projects\weg23wef\Components\microsoft-band-sdk-1.3.8\samples\Microsoft.Band.Portable.Sample\Microsoft.Band.Portable.Sample.Phone\AppPackages\Microsoft.Band.Portable.Sample.Phone_1.0.0.0_AnyCPU_Test\Microsoft.Band.Portable.Sample.Phone_1.0.0.0_AnyCPU.appxsym

This results in the error in the Components.log:

INFO: Failed to create directory: 'C:\Projects\weg23wef\Components\microsoft-band-sdk-1.3.8\samples\Microsoft.Band.Portable.Sample\Microsoft.Band.Portable.Sample.Phone\AppPackages\Microsoft.Band.Portable.Sample.Phone_1.0.0.0_AnyCPU_Test\Microsoft.Band.Portable.Sample.Phone_1.0.0.0_AnyCPU.appxsym'
[2016-04-10 13:03:33.8] ERROR: Component 'microsoft-band-sdk' entered state 'DownloadError' (was: Unpacked) [[ System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
   at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
   at System.IO.Path.GetDirectoryName(String path)
   at Xamarin.Components.Ide.ComponentSolutionCacheEntry.UnpackZipWithProgress(String zipFile, String ignoreRoot, String extractTo, Action`1 progress) in md-addins\Xamarin.Ide\Xamarin.Components.Ide\Components\ComponentSolutionCacheEntry.cs:line 142
   at Xamarin.Components.Ide.ComponentSolutionCacheEntry.UnpackComponentThread(Object state) in md-addins\Xamarin.Ide\Xamarin.Components.Ide\Components\ComponentSolutionCacheEntry.cs:line 87 ]]

C:\Users\matt\AppData\Local\Xamarin\Cache\Components\microsoft-band-sdk-1.3.8\microsoft-band-sdk-1.3.8\samples\Microsoft.Band.Portable.Sample\Microsoft.Band.Portable.Sample.Phone\AppPackages\Microsoft.Band.Portable.Sample.Phone_1.0.0.0_AnyCPU_Test\Microsoft.Band.Portable.Sample.Phone_1.0.0.0_AnyCPU.appxsym


This also affects Visual Studio.

So possible solutions:

1) Reduce paths used in the Microsoft Band SDK.
2) Use Windows specific API to handle the long paths. (Note that 7zip seems to be able extract the component to a directory longer than the one that is failing).
3) Allow the extraction to continue even though parts of it fail. Still report an error to the user but have it non-fatal.
Comment 3 Matthew Leibowitz 2016-04-12 12:31:45 UTC
I have released an update to this component v1.3.8.3 which should fix this issue. Please re-open if it persists. 

Please note, v1.3.8.3 is awaiting review by the component store team.