Launching watch os app in simulator

Hi,

When trying to a launch a watch os app in the simulator I get this

Running /usr/bin/xcrun simctl install 22964F9E-98A8-408D-A697-89710A3B17AB “/Users/JohnMoshakis/Documents/develop/Nougat/iSailedWatchOS/iSailedWatchOS/bin/Debug/watchOS Simulator/iSailedWatchOS.app”
simctl install: +An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=165):
simctl install: +Unable to lookup in current state: Shutdown
Running /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator -CurrentDeviceUDID 22964F9E-98A8-408D-A697-89710A3B17AB
Waiting for device to boot.
Waiting for device to boot, current state: Shutdown
Simulator.app: +2020-05-03 17:13:47.719224-0400 Simulator[32855:699516] _framebufferSurface.set (nil)
Simulator.app: +2020-05-03 17:13:47.719266-0400 Simulator[32855:699516] _maskedFramebufferSurface.set (nil)
Simulator.app: +2020-05-03 17:13:48.710454-0400 Simulator[32855:699542] [RuntimeIssues] ROCKit Soft Assertion Failure. Break on _ROCKAssumesFailure to debug. Failed Condition: !error – Remote proxy checkin failure: Error Domain=NSPOSIXErrorDomain Code=22 “Invalid argument” (Invalid impersonatable proxy UUID specified.) UserInfo={NSDebugDescription=Invalid impersonatable proxy UUID specified., impersonatableProxyUUID=07D6B81F-9F9E-4FD1-BF18-0396EEA80265}, self = {
Simulator.app: + class = “ROCKRemoteProxy-493D48B7-70B6-4BD3-B9A1-ACC650EF463A-SimScreen-SimDeviceIOPortDescriptorInterface-ROCKImpersonateable-SimDisplayIOSurfaceRenderable-SimDisplayResizeableRenderable-SimDisplayRenderable”;
Simulator.app: +}{
Simulator.app: + “proxy information” = {
Simulator.app: + UUID = “07D6B81F-9F9E-4FD1-BF18-0396EEA80265”;
Simulator.app: + “session manager” = “<ROCKSessionManager: 0x7ff24e7afad0>”;
Simulator.app: + };
Simulator.app: +}{
Simulator.app: + connectionUUID = “<OS_xpc_uuid: <uuid: 0x7ff24e490ed0> 7956C548-65D5-4A51-858B-3EA2086F805D>”;
Simulator.app: + protocols = (
Simulator.app: + );
Simulator.app: +}
Simulator.app: +2020-05-03 17:13:48.767366-0400 Simulator[32855:699516] _framebufferSurface.set (nil)
Simulator.app: +2020-05-03 17:13:48.767473-0400 Simulator[32855:699516] _maskedFramebufferSurface.set (nil)
Device booted ok.
Running /usr/bin/xcrun simctl install 22964F9E-98A8-408D-A697-89710A3B17AB “/Users/JohnMoshakis/Documents/develop/Nougat/iSailedWatchOS/iSailedWatchOS/bin/Debug/watchOS Simulator/iSailedWatchOS.app”
Simulator.app: +2020-05-03 17:13:56.566640-0400 Simulator[32855:705524] _framebufferSurface.set <IOSurface: 0x7ff24e490de0>
Simulator.app: +2020-05-03 17:13:56.566701-0400 Simulator[32855:705524] _maskedFramebufferSurface.set <IOSurface: 0x7ff24e490de0>
Simulator.app: +2020-05-03 17:14:20.157882-0400 Simulator[32855:699900] Failed to lookup service com.apple.iphonesimulator.bridge.32855: Error Domain=com.apple.CoreSimulator.SimError Code=165 “Unable to lookup service com.apple.iphonesimulator.bridge.32855: 0x3” UserInfo={NSLocalizedDescription=Unable to lookup service com.apple.iphonesimulator.bridge.32855: 0x3, NSUnderlyingError=0x7ff250c20ef0 {Error Domain=NSPOSIXErrorDomain Code=3 “No such process”}}
Simulator.app: +2020-05-03 17:14:20.159378-0400 Simulator[32855:699736] Error communicating with SimulatorBridge: NSObjectNotAvailableException - Unable to connect to SimulatorBridge
Running /usr/bin/xcrun simctl launch -w --stdout=/var/folders/51/b5sv97c13sd9zw0q55gqcp5c0000gn/T/B79610A9-315E-49DC-9A43-C748474EB362/stdout --stderr=/var/folders/51/b5sv97c13sd9zw0q55gqcp5c0000gn/T/DFB78FCF-AF4C-44B1-A40B-40A70BC2BEBD/stderr 22964F9E-98A8-408D-A697-89710A3B17AB com.moshine.isailed.watchkitapp
reading StdOut from /Users/JohnMoshakis/Library/Developer/CoreSimulator/Devices/22964F9E-98A8-408D-A697-89710A3B17AB/data/var/folders/51/b5sv97c13sd9zw0q55gqcp5c0000gn/T/B79610A9-315E-49DC-9A43-C748474EB362/stdout
reading StdErr from /Users/JohnMoshakis/Library/Developer/CoreSimulator/Devices/22964F9E-98A8-408D-A697-89710A3B17AB/data/var/folders/51/b5sv97c13sd9zw0q55gqcp5c0000gn/T/DFB78FCF-AF4C-44B1-A40B-40A70BC2BEBD/stderr
simctl launch: An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=3):
simctl launch: Application launch for ‘com.moshine.isailed.watchkitapp’ did not return a valid pid nor a launch error.
simctl launch: No such process
simctl launch: com.moshine.isailed.watchkitapp: 0
simctl launch: exit code 3

It looks like it Fire quits too soon because it does finish loading. The simulator was still showing the apple logo at the point it quit.

Cheers,
John

I can really openly go by what simctl gives me, as thats the official API for this :(. And yes, it’s unreliable, like all tunings Apple in the past 5 years :(.

Does it work ok when you try a second time after the sim has booted up fully? if not, same error or a different one?

As an aside the iOS simulator behaves similar, to shows booting long after simctl tells me its booted, I’ve asked to launch the app, the am getting the status feedback that the app is installng/launching – so I’m not sure that’s the actual problem.

Its a different error.

Simulator is already booted.
Running /usr/bin/xcrun simctl install 22964F9E-98A8-408D-A697-89710A3B17AB “/Users/JohnMoshakis/Documents/develop/Nougat/iSailedWatchOS/iSailedWatchOS/bin/Debug/watchOS Simulator/iSailedWatchOS.app”
Running /usr/bin/xcrun simctl launch -w --stdout=/var/folders/51/b5sv97c13sd9zw0q55gqcp5c0000gn/T/9092195C-D2E6-4594-84A8-C1B1D3434FBA/stdout --stderr=/var/folders/51/b5sv97c13sd9zw0q55gqcp5c0000gn/T/614D2896-6B9D-44E9-8485-FFD2179EED20/stderr 22964F9E-98A8-408D-A697-89710A3B17AB com.moshine.isailed.watchkitapp
reading StdOut from /Users/JohnMoshakis/Library/Developer/CoreSimulator/Devices/22964F9E-98A8-408D-A697-89710A3B17AB/data/var/folders/51/b5sv97c13sd9zw0q55gqcp5c0000gn/T/9092195C-D2E6-4594-84A8-C1B1D3434FBA/stdout
reading StdErr from /Users/JohnMoshakis/Library/Developer/CoreSimulator/Devices/22964F9E-98A8-408D-A697-89710A3B17AB/data/var/folders/51/b5sv97c13sd9zw0q55gqcp5c0000gn/T/614D2896-6B9D-44E9-8485-FFD2179EED20/stderr
simctl launch: An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=3):
simctl launch: Application launch for ‘com.moshine.isailed.watchkitapp’ did not return a valid pid nor a launch error.
simctl launch: No such process
simctl launch: com.moshine.isailed.watchkitapp: 0

Same error really.

Does your entitlements file have get-task-allow, or whatever it’s called, which is needed for debugging a process and getting its pid?

you mean info.plist ?

in the .entitlements

I dont appear to have one.

Try adding one and adding the entitlement. its needed for debugging.

That didnt seem to make a difference

:frowning: