Bug 44292 - iOS Simulator on Windows is stuck in Updating (0%) for hours now.....
Summary: iOS Simulator on Windows is stuck in Updating (0%) for hours now.....
Status: CONFIRMED
Alias: None
Product: Windows iOS Simulator
Classification: Xamarin
Component: Simulator ()
Version: unspecified
Hardware: PC Windows
: --- major
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-09-14 13:10 UTC by bblonchek
Modified: 2017-10-19 22:13 UTC (History)
17 users (show)

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


Attachments
updating message (20.20 KB, image/jpeg)
2016-09-14 17:59 UTC, Kelps Leite de Sousa
Details
connected message (15.72 KB, image/jpeg)
2016-09-14 17:59 UTC, Kelps Leite de Sousa
Details
first log from my Dell Inspiron (78.95 KB, text/plain)
2016-09-14 18:02 UTC, Kelps Leite de Sousa
Details
second log from Dell Inspiron (802 bytes, text/plain)
2016-09-14 18:02 UTC, Kelps Leite de Sousa
Details
3rd log from Dell Inspiron (764 bytes, text/plain)
2016-09-14 18:03 UTC, Kelps Leite de Sousa
Details
4th log from Dell Inspiron (802 bytes, text/plain)
2016-09-14 18:03 UTC, Kelps Leite de Sousa
Details
first log from the Mac Mini (2.39 KB, text/plain)
2016-09-14 18:13 UTC, Kelps Leite de Sousa
Details
second log from the Mac Mini (2.33 KB, text/plain)
2016-09-14 18:13 UTC, Kelps Leite de Sousa
Details
Simulator Log File (791 bytes, text/plain)
2016-09-14 18:25 UTC, bblonchek
Details
Mac mini log file (3.12 KB, text/plain)
2016-09-14 18:31 UTC, bblonchek
Details
windows log first try after new simulator (78.84 KB, text/plain)
2016-09-16 12:30 UTC, Kelps Leite de Sousa
Details
windows log second try after new simulator (1.09 KB, text/plain)
2016-09-16 12:31 UTC, Kelps Leite de Sousa
Details
mac log generated today (3.03 MB, text/plain)
2016-09-16 12:32 UTC, Kelps Leite de Sousa
Details
remote simulator stuck on first try after new preview (15.04 KB, image/jpeg)
2016-09-16 12:33 UTC, Kelps Leite de Sousa
Details
remote simulator working on the second try \o/ (45.36 KB, image/jpeg)
2016-09-16 12:34 UTC, Kelps Leite de Sousa
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 for Bug 44292 on Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.
Related Links:
Status:
CONFIRMED

Description bblonchek 2016-09-14 13:10:09 UTC
# Steps to reproduce
Select Remote Simulator to Windows in VS 2015 Tools/Options/Xamarin/iOS Settings menu.
Build app with Debug/iPhoneSimulator configuration.
Start debugging app.

# Expected behavior
App should display in simuator

# Actual behavior
iOS Simulator window is displayed and says Updating (0%) with blue bar running along bottom forever ....

# Supplemental info (logs, images, videos)


# Test environment (full version information)
Comment 1 Ben Beckley 2016-09-14 17:25:51 UTC
Hello,

Thank you for taking the time to report this issue. Could you please attach the simulator logs from your Mac and Windows machines?

They can be found at the following locations
Windows: C:\Users\Username\AppData\Local\Xamarin\Logs\Xamarin.Simulator\  
Mac: ~\Library\Logs\Xamarin\Simulator.Server (server logs)
Comment 2 bblonchek 2016-09-14 17:43:09 UTC
I had cleaned out my log files and unfortunately after uninstalling the pre release simulator I downloaded and repairing the xamarin install,  I can't even get the simulator window to come up anymore.

There are no simulator logs on the PC at this point and the erorr in the xamarin log is;

Xamarin.VisualStudio.IOS.XamarinIOSPackage Error: 0 : [2016-09-14 13:38:33.8816] MonoTouchDebuggerSession System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
   at Xamarin.VisualStudio.IOS.RemoteSimulatorLauncher.LaunchApplication(Simulator simulator, AppInfo appInfo, Boolean debugging, IProgressReport progress) in C:\data\lanes\3513\c4382f51\source\xamarinvs\src\Core\VisualStudio.IOS\Devices\RemoteSimulatorLauncher.cs:line 50
   at Xamarin.VisualStudio.IOS.MonoTouchDevice.StartApplication(MonoTouchRunSessionInfo runSessionInfo, IProgressReport progress, Boolean debugging, Int32 debugPort) in C:\data\lanes\3513\c4382f51\source\xamarinvs\src\Core\VisualStudio.IOS\Devices\MonoTouchDevice.cs:line 303
   at Xamarin.VisualStudio.IOS.MonoTouchDebuggerSession.StartMonoTouchOnServer(MonoTouchStartInfo info) in C:\data\lanes\3513\c4382f51\source\xamarinvs\src\Core\VisualStudio.IOS\Debugging\MonoTouchDebuggerSession.cs:line 138
   at Xamarin.VisualStudio.IOS.MonoTouchDebuggerSession.OnRun(DebuggerStartInfo startInfo) in C:\data\lanes\3513\c4382f51\source\xamarinvs\src\Core\VisualStudio.IOS\Debugging\MonoTouchDebuggerSession.cs:line 88
   at Mono.Debugging.Client.DebuggerSession.<>c__DisplayClass82_0.<Run>b__0()
Comment 3 Kelps Leite de Sousa 2016-09-14 17:57:25 UTC
I see the same problem on all environments I tested. Sometimes it says "Updating 0%" and other times it just says "Connected". I was having the same issue in the Beta channel last week (before 4.2 was released to Stable). I tried waiting just to see if it would get anyware eventually but nothing changed even after a little over 1 hour.

We are running a Mac Mini with El Capitain fully updated, XCode 8 and the latest Xamarin Studio (updated today, Sep 14th). The mini is an older model with 4Gb memory, but everything runs there, only not very fast.

The PC side runs Windows 10 Enterprise (Windows Insider in Release Preview level) also fully updated on a Dell Inspiron i7 with 16Gb Memory and SSD. Visual Studio 2015 Enterprise update 3, Xamarin 4.2 Stable (updated today). 

I faced the exact same problem over the weekend at home with a gen 1 Dell Optiplex 960 i5 PC and a Surface Pro 2 against a friend's fast Macbook Pro (a LOT faster than the Mini at work). The Dell at home is also on Release Preview and the Surface was tested with RTM Windows 10 and Insider Preview on Fast level. Same version on VS2015 but Xamarin was on Beta because Stable wasn't connecting to the Mac on version 4.1.2.18
Comment 4 Kelps Leite de Sousa 2016-09-14 17:59:21 UTC
Created attachment 17474 [details]
updating message
Comment 5 Kelps Leite de Sousa 2016-09-14 17:59:56 UTC
Created attachment 17475 [details]
connected message
Comment 6 Kelps Leite de Sousa 2016-09-14 18:02:09 UTC
Created attachment 17476 [details]
first log from my Dell Inspiron
Comment 7 Dominic N [MSFT] 2016-09-14 18:02:20 UTC
Setting status to new based on additional information from Kelps.

Kelps - thank you for the details!

For clarity - Kelps has informed me that this issue was present previously with Xcode 7 and still remains with Xcode 8.
Comment 8 Kelps Leite de Sousa 2016-09-14 18:02:48 UTC
Created attachment 17477 [details]
second log from Dell Inspiron
Comment 9 Kelps Leite de Sousa 2016-09-14 18:03:24 UTC
Created attachment 17479 [details]
3rd log from Dell Inspiron
Comment 10 Kelps Leite de Sousa 2016-09-14 18:03:52 UTC
Created attachment 17480 [details]
4th log from Dell Inspiron
Comment 11 Kelps Leite de Sousa 2016-09-14 18:13:21 UTC
Created attachment 17481 [details]
first log from the Mac Mini
Comment 12 Kelps Leite de Sousa 2016-09-14 18:13:51 UTC
Created attachment 17482 [details]
second log from the Mac Mini
Comment 13 bblonchek 2016-09-14 18:25:23 UTC
Created attachment 17483 [details]
Simulator Log File
Comment 14 Kelps Leite de Sousa 2016-09-14 18:30:40 UTC
I just uploaded all the logs I found in my PC and the Mac Mini here at work. 

As Dominic said, I had this same problem with Xcode 7, both here and at home over the weekend. I am just starting now with Xamarin, so my history doesn't extend beyond the weekend.

At home I had a friend's Mac Pro with Xcode 7 and the latest Xamarin Studio and my PCs had VS2015 Update 3 with Xamarin 4.1.2.18. They didn't even connect to the Mac (ssh was fine). I updated to the Beta channel on Xamarin on both and it started connecting and compiled ok a new empty project from VS2015 but I was never able to make the Simulator work.

At work I installed Xamarin Studio on the Mac Mini yesterday morning and was able to connect from my PC at first (I had an outdated Xamarin installed). I updated to Xamarin 4.1.2.18 on my PC and it stopped conecting to the Mac. Xamarin 4.2 was made available after I left the office, so I installed it on the Mac Mini and my PC today as soon as I got here (I didn't update to Xcode 8 just yet to make sure the problem was with the Xamarin bits I had). The connection problem was resolved but the remote simulator is still behaving the same way as before and the same way it did at home.

Compilation seems to be working fine.

One thing I noticed just now is that if I open the Simulator on the Mac, it sits there with a black screen until I click on it. It never loads until I click it. I never used it before, so I don't know if this is how it is supposed to be.

Feel free to contact me if you need any more information.
Comment 15 bblonchek 2016-09-14 18:31:01 UTC
Created attachment 17484 [details]
Mac mini log file
Comment 16 Ben Beckley 2016-09-14 18:38:23 UTC
Hello everyone,

I was experiencing similar behavior that Kelp reported in comment 3 where the simulator just says "Connected". My Mac log has the same stack trace as the log in comment 11.

Also, there is a known problem where switching Xcodes can break simulator functionality, and the fix is to reboot the Mac.

Finally, there is a fourth simulator preview that will be released soon. I was not able to reproduce this behavior using that build.
Comment 17 Kelps Leite de Sousa 2016-09-14 19:08:41 UTC
Ben,

I don't think what I am seeing here is related to the Xcode update because I had the same problem before updating to Xcode 8, and Xcode 7 was already installed and working on that Mac for a while (a couple of months at least). Anyway, to be sure, I just rebooted both the Mac and my PC but I still see Updating (0%) and nothing changes. If I stop and try again, sometimes it'll display updating, sometimes connected.

I'm looking forward for a new preview of the Simulator. If I may ask: How soon is soon? Are we talking days or weeks here? (no dates needed, just a ball park guess would already be wonderful). I am really excited to start working on our new app and the remote simulator will make things a lot easier, for sure (I also can't wait to have the xaml live previewer on VS, but that is another topic).
Comment 18 Kyle White 2016-09-14 19:32:14 UTC
Kelps, 

We're talking days if all goes to plan.

Also the Xamarin.Forms live previewer for VS is available(as a preview feature) in C8 which was released yesterday to Stable. Upgrade and check it out! :)
Comment 19 Kelps Leite de Sousa 2016-09-14 22:51:23 UTC
Kyle,

Awesome to hear it will not take long for the new remote simulator :)

Now, about the previewer: I am already using the latest Xamarin stable tools on all my computers (Macs and PCs), but I was under the impression that for now the previewer was only available in Xamarin Studio, not in VS (Visual Studio). Are you sure it is available in VS? I couldn't find it either in Visual Studio or in any documentation online and the one thing I did found said that it was only in Xamarin Studio and would come to VS soon after. I would LOVE to be wrong about this. 

I am a former Silverlight/Windows Client DEV MVP and I feel at home in XAML, but specially with the cross platform nature of Xamarin Forms, the previewer will be a huge time saver.
Comment 20 GuardRex 2016-09-15 02:48:30 UTC
Very similar problem to Kelps today. Everything worked this morning under prior versions, then I did the full round of Xamarin and XCode updates. The connection to the Mac Mini is fine, and VS is able to spawn the iOS Simulator and run the app on the Mac Mini when the remote iOS simulator setting in options is disabled. I tried disabling and enabling after a Mac simulator startup, and I tried restarts of both systems. Everything is fully updated.

It gets stuck at "Updating (0 %)" on the PC iOS Simulator screen prior to the simulator loading the phone.

The Windows log shows:

Startup:
	arguments: --device=0FC2E6DF-4438-4317-A419-A3E3A392B4B6 --launchsim=//Users/mac000001/Library/Caches/Xamarin/mtbs/builds/MYAPP.iOS/964e635a464e426696fa4c232c5598eb/bin/iPhoneSimulator/Debug/MYAPPiOS.app -argument=-monodevelop-port -argument=55495 -setenv=__XAMARIN_DEBUG_PORT__=55495 -h=192.168.0.125 -ssh=mac000001 
	version: 0.9.2.25 (29469a46931ae0fa3e6955395c2f4e01fdc43b6a)
Connection state changed:
	State: Connecting
	Progress: 0
SSH Connect:
	target: 192.168.0.125:4231
Using SSH pass phrase
SSH connected
Connection state changed:
	State: Connected
	Progress: 0
Connection state changed:
	State: CheckingServer
	Progress: 0
Connection state changed:
	State: SettingUpServer
	Progress: 0
Starting server

The Mac log shows:

Startup:
version 0.9.2.25 (29469a46931ae0fa3e6955395c2f4e01fdc43b6a)
Comment 21 GuardRex 2016-09-15 19:06:58 UTC
This morning, the PC was restarted, but the Mac was left on overnight.

Now, the iOS Simulator gets stuck in "Connecting." There are different log entries ... 

On the Win10 side ...

Startup:
	arguments: --device=0FC2E6DF-4438-4317-A419-A3E3A392B4B6 --launchsim=//Users/mac000001/Library/Caches/Xamarin/mtbs/builds/MYAPP.iOS/964e635a464e426696fa4c232c5598eb/bin/iPhoneSimulator/Debug/MYAPPiOS.app -argument=-monodevelop-port -argument=50318 -setenv=__XAMARIN_DEBUG_PORT__=50318 -h=192.168.0.125 -ssh=mac000001 
	version: 0.9.2.25 (29469a46931ae0fa3e6955395c2f4e01fdc43b6a)
Connection state changed:
	State: Connecting
	Progress: 0
SSH Connect:
	target: 192.168.0.125:4231
Using SSH pass phrase
SSH connected
Connection state changed:
	State: Connected
	Progress: 0
Connection state changed:
	State: CheckingServer
	Progress: 0
Connection state changed:
	State: Connecting
	Progress: 0
Connection state changed:
	State: Connected
	Progress: 0

On the Mac side ...

Startup:
	version: 0.9.2.25 (29469a46931ae0fa3e6955395c2f4e01fdc43b6a)
Connection made:
	Connection ID: 1
	Disconnected previous: False
	Previous ID: -
Foundation.NSErrorException: Exception of type 'Foundation.NSErrorException' was thrown.
  at Bindings.SimServiceContext.get_DefaultDeviceSet () [0x0001c] in <2d94c1b3ef1643c68482bb157ec4b804>:0 
  at Bindings.CoreSimulator.get_DefaultDeviceSet () [0x0000a] in <2d94c1b3ef1643c68482bb157ec4b804>:0 
  at MonoTouch.Hosting.CoreSimulatorUserDevice+<EnumerateUserDevices>c__Iterator0.MoveNext () [0x00032] in <2d94c1b3ef1643c68482bb157ec4b804>:0 
  at MonoTouch.Hosting.DeviceConfig+<EnumerateUserDevices>c__Iterator1.MoveNext () [0x000d1] in <2d94c1b3ef1643c68482bb157ec4b804>:0 
  at Xamarin.Simulator.Server.SimulatorServer.BuildCapabilities (System.String newPath) [0x00314] in <dec726e5ec794e1d95059cd620e973cb>:0 
  at Xamarin.Simulator.Server.SimulatorServer+<OnRequestCapabilitiesMessage>c__async0.MoveNext () [0x00075] in <dec726e5ec794e1d95059cd620e973cb>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <94fd79a3b7144c54b4cb162b50fc7761>:0 
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>m__1 (System.Object state) [0x00000] in <94fd79a3b7144c54b4cb162b50fc7761>:0 
  at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (System.Object state) [0x0000e] in <94fd79a3b7144c54b4cb162b50fc7761>:0 
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x0008d] in <94fd79a3b7144c54b4cb162b50fc7761>:0 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <94fd79a3b7144c54b4cb162b50fc7761>:0 
  at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x0002a] in <94fd79a3b7144c54b4cb162b50fc7761>:0 
  at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00096] in <94fd79a3b7144c54b4cb162b50fc7761>:0 
  at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in <94fd79a3b7144c54b4cb162b50fc7761>:0
Comment 22 Kelps Leite de Sousa 2016-09-16 12:30:10 UTC
Created attachment 17536 [details]
windows log first try after new simulator

You are awesome! Great job! I just downloaded and installed the new Simulator Preview on my computer and now it seems to be working. Unfortunately it didn't work on the first try (it did on the second). I am uploading now the logs generated today on the PC and the Mac.

To recap: I am running the latest Xamarin stable on both the PC (4.2.0.680) and the Mac (6.1.0.5441)

This morning I installed yesterday's iOS remote Simulator Preview on my PC, then I opened the sample project in Visual Studio, compiled and hit F5 to start the remote simulator. It started, updated itself (this time didn't get stuck at 0%), but after it hit 100% the message changed to "Updating..." and got stuck again. I closed the Simulator and Visual Studio, opened it again and tried one more time and it worked (took about 3 minutes to start and display the app, but worked).

Anyway, it is working now. Great work! It is a little slow, but as I read it seems this is expected with Xcode 8, at least for now, and I'm ok with it (after all, it is a preview feature). I hope the new logs help you pinpoint the problem, and I put myself at you service if you need any more information.
Comment 23 Kelps Leite de Sousa 2016-09-16 12:31:49 UTC
Created attachment 17537 [details]
windows log second try after new simulator
Comment 24 Kelps Leite de Sousa 2016-09-16 12:32:42 UTC
Created attachment 17538 [details]
mac log generated today
Comment 25 Kelps Leite de Sousa 2016-09-16 12:33:30 UTC
Created attachment 17539 [details]
remote simulator stuck on first try after new preview
Comment 26 Kelps Leite de Sousa 2016-09-16 12:34:07 UTC
Created attachment 17540 [details]
remote simulator working on the second try \o/
Comment 27 GuardRex 2016-09-16 16:56:22 UTC
I reinstalled the iOS Simulator Preview from https://developer.xamarin.com/guides/cross-platform/windows/ios-simulator/, and it seems to be working now. Same thing as Kelps ... it hung on the first try. I changed the iOS device, and then it started working. I went back to the device that it hung on, and it then worked for that device. I think I'm ok now.
Comment 28 bblonchek 2016-09-20 16:20:49 UTC
I installed latest preview and seems to be working now, although not always smoothly and at times the simulator on the Mac is now frozen and requires restart often. Also, had to reboot the Mac once to get the Mac simulator to work.  1 step forward ....
Comment 29 Kyle White 2016-09-20 16:29:44 UTC
@bbloncheck, sounds like you might be running into this https://bugzilla.xamarin.com/show_bug.cgi?id=43566

If so, it will be fixed in an upcoming service release.
Comment 30 bblonchek 2016-09-20 16:33:56 UTC
Sure sounds like it. Ok will patiently wait for the next service release.
Comment 31 Francesco Colombo 2016-11-07 15:54:02 UTC
Hi I don't know if it's related BUT I was having the same issue (windows ios simulator hanged on "updating 0%"). More over I was having issues launching app on mac simulator. The app was launched and then suddenly it was shutted down, so i was unable to use also the mac simulator. 

In the mac simulator system log I found the "cause" of the error
com.apple.CoreSimulator.SimDevice.XXX-XXX-XXX.launchd_sim (UIKitApplication:com.company.MyApp): Program specified by service does not contain one of the requested architectures: Z

SOLUTION: I came back to VS and checked the properties of my project and noticed that for (Debug - iPhoneSimulator) the parameter (iOS Build -> Advanced -> Supported Architecture) was set to x86_64. Setting it FROM x86_64 TO i386 makes all working fine!
Comment 32 wislon 2016-11-28 11:01:58 UTC
I had exactly the same issue with "Updating..." just sitting forever.

I switched to a different model (from iPhone 6 iOS 10.1 to iPhone 5 9.3), did a clean and a rebuild and hit F5. It took a few seconds but went through "connecting... connected" and then sat and thought about it for about 2 minutes while it loaded the simulator image (the apple logo with the progress bar).

After another minute or so of that, it failed with an error about not being able to install the app. After I clicked on "OK" (or Cancel) it showed the Apple logo again (with no progress bar).

After giving it another couple of minutes, I hit the three dots menu, and clicked the power ('reboot') icon. It then went back to the apple logo, but after about 15 seconds it showed the normal iOS home screen.

Then it tried to launch my app, splash screen came up 5 or 6 times, but then the app was killed. Restarted the simulator. 

Tried a few other things (like fiddling with the supported architecture as mentioned above), and after selecting the i386 + x86_x64, that finally got it working.

i386 - it wouldn't even start.
x86_x64 - starts and dies, over and over until I stop the run.
i386 + x86_x64 got it working for me, but I don't know if that's going to be the case every time.

It's looking better guys, but I think there's still some work to do :)
Comment 33 J.C.Ködel 2016-12-30 17:13:23 UTC
The log file (on C:\Users\XXXX\appdata\local\xamarin\Logs\Xamarin.Simulator\*.log) is locked for read while the simulator is running.

Really? Do you really need to get a read/write lock on a log file? =\
Comment 34 andrew 2017-04-22 11:10:44 UTC
The above tip by Francesco Colombo "the parameter (iOS Build -> Advanced -> Supported Architecture) was set to x86_64. Setting it FROM x86_64 TO i386 makes all working fine!" worked for me :)
Comment 35 Andrei Lima 2017-07-11 14:18:38 UTC
The tip by Francesco Colombo was be useful for me, although, in my case, I setted the "Supported Architecture" option to i386 + x86_64 (Visual Studio 2017). Then all works fine
Comment 36 Prasanth Vanamlo 2017-10-19 22:13:11 UTC
Usually this happens when the simulator software you're using is corrupted. Try installing latest version of it from the official source and it must be fixed.

https://tutuappx.com/
https://show-box.ooo/