Bug 40754 - DocSync fails or waits indefinitely during "extracting" if username contains spaces
Summary: DocSync fails or waits indefinitely during "extracting" if username contains ...
Status: VERIFIED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 4.1.0 (C7)
Hardware: PC Windows
: --- normal
Target Milestone: 4.1.0 (C7)
Assignee: mag@xamarin.com
URL:
Depends on:
Blocks:
 
Reported: 2016-04-28 10:01 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2016-05-20 16:44 UTC (History)
6 users (show)

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


Attachments
Example docsync log file (2.19 KB, text/plain)
2016-04-28 10:01 UTC, Brendan Zagaeski (Xamarin Team, assistant)
Details
One way to serve the `.dmg` file locally for faster testing (2.90 KB, text/plain)
2016-04-28 10:27 UTC, Brendan Zagaeski (Xamarin Team, assistant)
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 Brendan Zagaeski (Xamarin Team, assistant) 2016-04-28 10:01:56 UTC
Created attachment 15864 [details]
Example docsync log file

DocSync fails or waits indefinitely during "extracting" if username contains spaces




## Regression status: Not an immediate regression, but maybe the change in behavior compared to Cycle 6 would be considered a "new feature bug" for Cycle 7

BAD (fails):              XamarinVS 4.2.0.21  (a532c82) (Cycle 8)
BAD (fails):              XamarinVS 4.1.0.462 (fb9e9f3) (Cycle 7)
BAD (waits indefinitely): XamarinVS 4.0.3.214 (0dd817c) (Cycle 6)




## Steps to replicate

1. Create a new administrator user account on Windows that includes a space " " in the username, such as "Windows User".

2. Log in to the new user account.

3. Create a new "Visual C# > iOS > iPhone > Single View App (iPhone)" in Visual Studio.

4. Once the "Documentation Update" notification appears, click on it to open the modal window that shows the DocSync progress.

> Xamarin iOS Documentation Update
> Click here to open the Documentation
> Manager

5. Wait for the "Downloading Apple Doc Set..." step to complete.


Note: If you wish to retry the steps to replicate with the same user account, you will sometimes need to delete one of the following files to get the DocSync program to run automatically when loading the iOS project:

For Cycle 7 + Cycle 8:
%LOCALAPPDATA%\Temp\Xamarin\DocSync\DocSyncHistory

For Cycle 6:
%LOCALAPPDATA%\Temp\Xamarin\history




## Results on 4.2.0 and 4.1.0


### Bad results with "Windows User"

When the DocSync app gets to the "Extracting downloaded documentation..." step, it exits immediately without performing the extraction or merge steps.

#### Excerpt from `%LOCALAPPDATA%\Xamarin\Logs\DocSync\docsync*.log`

> Xamarin.VisualStudio.iOS.DocSync.Model.DocumentationExtractor Information: 0 : [2016-04-28 05:26:49.2875] Extracting documentation from C:\Users\Windows User\AppData\Local\Temp\Xamarin\DocSync\031-07735-A.dmg to C:\Users\Windows User\AppData\Local\Temp\Xamarin\DocSync\DocSet
> Xamarin.VisualStudio.iOS.DocSync.ViewModels.DocumentationProgressViewModel Error: 0 : [2016-04-28 05:26:49.4505] An unexpected error occurred...
> System.NullReferenceException: Object reference not set to an instance of an object.
>    at Xamarin.VisualStudio.iOS.DocSync.Model.DocumentationExtractor.<DecompressDocSetFolderAsync>d__3.MoveNext()
> --- 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 Xamarin.VisualStudio.iOS.DocSync.Model.DocumentationExtractor.<ExtractAsync>d__1.MoveNext()
> --- 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 Xamarin.VisualStudio.iOS.DocSync.ViewModels.DocumentationProgressViewModel.<ExtractDocumentationAsync>d__53.MoveNext()


### Good results with "WindowsUser"

On my test environment running on an SSD:

- The first extraction step completed in 3 seconds
- The remaining extraction steps took about another 4 minutes.
- The "merge" step completed successfully within about 40 seconds.




## Results on 4.0.3


### Bad results with "Windows User"

The 4.0.3 build does not _exit_ when it gets to the "extracting" step, and it _never_ continues past the "extracting" step. I waited over 10 minutes. The first extraction step (that usually only takes 3 seconds) never completed.


### "Good" results with "WindowsUser"

(Essentially identical to the "Good" results with 4.1.0 and 4.2.0.)




## Additional environment info (brief)

Windows 10, US English language and locale, running in a Hyper-V VM on a Window 10 host.
Visual Studio 2013 Update 5, English UI language
Comment 1 Brendan Zagaeski (Xamarin Team, assistant) 2016-04-28 10:27:50 UTC
Created attachment 15865 [details]
One way to serve the `.dmg` file locally for faster testing

On the small chance anyone who's interested in testing DocSync isn't already working behind a caching proxy to make the `.dmg` download go faster, I am attaching the steps I used as a "quick-and-dirty" way to serve the `.dmg` file locally on my network.

This approach noticeably speeds up testing, but it takes a little patience to get HTTPS set up with self-signed certificates.
Comment 3 Parmendra Kumar 2016-05-20 16:44:47 UTC
I have checked this issue with latest C7 latest build: 4.1.0.503 and its working fine.
To verify this issue I have followed following issue.
1. Create a new user account with username contains spaces.
2. Open VS and create iOS app.
Observed that DOcSync sync successfully. I have checked it on Temp file also.

Hence marked this issue as Verified Fixed.

If you facing same issue, Please feel free to reopen this issue.

Thanks.