Bug 16170 - Xamarin.iOS SDK synchronization hangs with non-Administator user account
Summary: Xamarin.iOS SDK synchronization hangs with non-Administator user account
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Updater ()
Version: 1.8.x
Hardware: PC Windows
: High normal
Target Milestone: ---
Assignee: Jose Miguel Torres
Depends on:
Reported: 2013-11-12 21:27 UTC by Brian
Modified: 2014-06-03 04:06 UTC (History)
6 users (show)

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

Xamarin.iOS SDK synchronization hung (2.04 KB, image/png)
2013-11-12 21:27 UTC, Brian
SDKUpdate Log (2.52 KB, application/octet-stream)
2013-11-25 10:25 UTC, Allie Miller

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 Brian 2013-11-12 21:27:44 UTC
Created attachment 5411 [details]
Xamarin.iOS SDK synchronization hung

After installing the 1.8 alpha for Xamarin.iOS, I loaded an iOS project using Visual Studio. I got a prompt saying that my local Xamarin.iOS SDK was out of date with that of the Mac. I answered yes to begin the update process. Xamarin shut down Visual Studio, and then started the update process. Unfortunately, that process hung indefinitely (see the attached screenshot). I finally restarted both computers and tried again. It did the same thing.

After about the third or fourth time of trying to figure out a way to work around the problem, I came up with workaround which also provides a clue as to what is causing the issue. I logged out of my normal (non-administrative) account, and logged in as Administrator. I went through the same process with Visual Studio, which indicated that I needed to update the Xamarin.iOS SDK. However, this time Visual Studio shut down, the progress bar appeared, and then after several seconds, the progress bar started moving, and the operation completed successfully.

I suspect that the synchronization process is trying to do something that requires administrative privileges without correctly using the API that asks for permission, which would have put up a UAC prompt and then allowed the installation to proceed.

Here is my version information, should that prove useful:

    Microsoft Visual Studio Ultimate 2012
    Version 11.0.60610.01 Update 3
    Microsoft .NET Framework
    Version 4.5.50709

    Visual C# 2012   04940-004-0038003-02511
    Microsoft Visual C# 2012

    Windows Phone SDK 8.0 - ENU   04940-004-0038003-02511
    Windows Phone SDK 8.0 - ENU

    NuGet Package Manager   2.7.40911.225
    NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

    Xamarin.Android   4.10.01045 (100ec683)
    Visual Studio plugin to enable development for Xamarin.Android.

    Xamarin.iOS   1.8.269 (46afb4d7)
    Visual Studio extension to enable development for Xamarin.iOS

While the workaround seems to have worked, it is certainly not obvious. The installation should work correctly for non-Administrator accounts. It has worked from my normal developer account in the past.
Comment 1 Jose Miguel Torres 2013-11-13 12:51:07 UTC
Thanks Brian for taking the time to fill the bug and your detailed explanation. We are going to take note about this issue and I will fix as soon as possible.
Comment 2 Jose Miguel Torres 2013-11-13 12:54:30 UTC
BTW Brian, Could you attach the %LOCALAPPDATA%\Xamarin\Log\MonoTouchVS\SDKUpdater.log file please?
Comment 3 Brian 2013-11-13 23:12:48 UTC

In the "C:\Users\Crafter\AppData\Local\Xamarin\Log\MonoTouchVS" folder (where %LOCALAPPDATA% points), there are no files, only a "11.0" folder.

Are you sure about that filename? That file doesn't exist anywhere on my Windows PC:

  C:\>dir /s /b SDKUpdater.log
  File Not Found

  D:\>dir /s /b SDKUpdater.log
  File Not Found

I see a "XamarinStudio-4.0" folder that is a peer of the "Xamarin" folder above, but it doesn't have a file with that name either.

I don't know if it matters, but the Windows PC runs Windows 8.

 - Brian
Comment 4 Jose Miguel Torres 2013-11-14 03:45:09 UTC
Thanks Brian,

The file should exist. Anyway, I just wanted to get more information about this issue. Never mind and thanks ,,,
Comment 5 Allie Miller 2013-11-25 10:25:23 UTC
Created attachment 5529 [details]
SDKUpdate Log

Requested SDKUpdate log
Comment 6 Jeremy Kolb 2014-04-04 09:34:56 UTC
I see this all the time.  In order to get around the issue I had to:

1. Grant my user admin privileges.
2. Disable UAC.

My normal user (jkolb) runs Visual Studio so when I was prompted for UAC in order to sync the SDK I had to use the admin user on my machine (jkolb-admin).  This setup is mandated by my employer.  After entering in the UAC prompt the sync hangs.  If I make myself an admin (violated my employer's security policy) and use my own account (jkolb) for the UAC then it will work and I can sync the SDK.
Comment 7 Daniel Cazzulino 2014-04-10 11:27:00 UTC
We need to explore the alternative of placing the SDK assemblies somewhere else that doesn't require admin permissions. 

If we can get the assemblies to a per-user location, then we would be solving this problem for good. It's worth a shot.
Comment 8 Jeremy Kolb 2014-05-19 13:45:46 UTC
I think the issue is more of an API misuse.  Getting prompted for UAC usually doesn't affect operations of programs if they use the APIs correctly.  Maybe you need to run the synchronizer through the application compatibility tool or something.
Comment 9 Jose Miguel Torres 2014-06-03 04:06:02 UTC
Despite the alternative SDK sync process is under development, during the last release the current SDK has been improved. So this bug is now fixed and SDK is working on XVS 3.0.54. Hence closing it.