pxctest icon indicating copy to clipboard operation
pxctest copied to clipboard

headless simulator boot timeout

Open JeanMertz opened this issue 7 years ago • 6 comments

These two work fine:

$ pxctest boot-simulators --destination "name=iPhone 7,os=iOS 10.3 --deviceset /tmp/test-simulators"
$ pxctest boot-simulators --destination "name=iPhone 6s,os=iOS 9.3 --deviceset /tmp/test-simulators"

These two don't:

$ pxctest boot-simulators --destination "name=iPhone 6,os=iOS 8.4 --deviceset /tmp/test-simulators"
$ pxctest boot-simulators --destination "name=iPhone 6,os=iOS 8.3 --deviceset /tmp/test-simulators"

They both end up with the following error:

Timed out waiting for all required services [com.apple.SpringBoard, com.apple.medialibraryd, com.apple.backboardd, com.apple.mobile.installd, com.apple.SimulatorBridge] to start

$ xcodebuild -version
Xcode 8.3.2
Build version 8E2002

$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.12
BuildVersion:	16A323

JeanMertz avatar Apr 19 '17 22:04 JeanMertz

I just pulled the latest master of FBSimulatorControl. Can you please try again (install pxctest via brew install pxctest --HEAD) and let me know if that fixed the issue? Thanks!

plu avatar Apr 20 '17 03:04 plu

When using --HEAD, we're seeing other issues arise:

Error Domain=com.facebook.FBSimulatorControl Code=0 "Failed to write defaults for /tmp/test-simulators/A4F0623F-77D9-454A-83F9-205205B6DAA3/data/Library/Preferences/com.apple.springboard.plist" UserInfo={NSLocalizedDescription=Failed to write defaults for /tmp/test-simulators/A4F0623F-77D9-454A-83F9-205205B6DAA3/data/Library/Preferences/com.apple.springboard.plist, NSUnderlyingError=0x7fd08612cb10 {Error Domain=com.facebook.FBSimulatorControl Code=0 "Running (null) [(null)] failed" UserInfo={NSLocalizedDescription=Running (null) [(null)] failed, NSUnderlyingError=0x7fd08612dae0 {Error Domain=NSPOSIXErrorDomain Code=22 "Invalid argument" UserInfo={NSLocalizedDescription=Invalid request: No executable path specified.}}}}}

JeanMertz avatar Apr 20 '17 12:04 JeanMertz

Does this happen only for the 8.x Simulators or for any of them?

plu avatar Apr 21 '17 05:04 plu

All of them

JeanMertz avatar Apr 21 '17 06:04 JeanMertz

I just tried but cannot reproduce the issue, unfortunately.

$ xcodebuild -version
Xcode 8.3.2
Build version 8E2002

$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.12.4
BuildVersion:	16E195

$ brew install pxctest --HEAD
==> Installing pxctest from plu/pxctest
==> Cloning https://github.com/plu/pxctest.git
Updating /Users/joplunien/Library/Caches/Homebrew/pxctest--git
==> Checking out branch master
==> ./scripts/build.sh /usr/local/Cellar/pxctest/HEAD-e05a921/libexec
🍺  /usr/local/Cellar/pxctest/HEAD-e05a921: 246 files, 19.2MB, built in 33 seconds

$ pxctest version
pxctest 0.3.3 (e05a921)

$ mkdir /tmp/test-simulators

$ pxctest boot-simulators --destination "name=iPhone 7,os=iOS 10.3" --deviceset /tmp/test-simulators

$ xcrun simctl --set /tmp/test-simulators list devices
== Devices ==
-- iOS 9.0 --
-- iOS 9.1 --
-- iOS 9.2 --
-- iOS 9.3 --
-- iOS 10.0 --
-- iOS 10.1 --
-- iOS 10.2 --
-- iOS 10.3 --
    iPhone 7 (EB6C59D0-F587-449C-9E70-B0FBBA71F0DD) (Booted)
-- tvOS 9.0 --
-- tvOS 9.1 --
-- tvOS 10.2 --
-- watchOS 2.0 --
-- watchOS 2.1 --
-- watchOS 3.2 --

It's possible that FBSimulatorControl cannot figure out correctly where your Runtimes are located. It tries to figure out where the launchctl binary is for the Simulator Runtime that is being used.

The current Runtime (iOS 10.3 for Xcode 8.3) standard location is: Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS

All the older Runtimes are usually here: /Library/Developer/CoreSimulator/Profiles/Runtimes

Do you maybe have them in a non-standard location (Xcode or the older Runtimes)?

plu avatar Apr 23 '17 03:04 plu

I also have the same issue, I did install the pxctest from Master ,however same issue with timeOut waiting for all required services.."

amesandy-zz avatar Apr 26 '17 21:04 amesandy-zz