appium / node-simctl

Node wrapper around Apple's simctl binary
Apache License 2.0
65 stars 30 forks source link

/usr/bin/xcrun simctl terminateApp ... exited with code 4 #138

Closed stoefln closed 3 years ago

stoefln commented 3 years ago

I try to run following code in my electron application:

self.simctl = new Simctl()
self.simctl.udid = "8EC67616-5D0F-4694-AF27-A2D01DCD1A30"
await self.simctl.launchApp('com.mycomp.myapp')

But I get following error: /usr/bin/xcrun simctl launch 8EC67616-5D0F-4694-AF27-A2D01DCD1A30 com.mycomp.myapp' exited with code 4

this command works without problem in the terminal though: /usr/bin/xcrun simctl launch 8EC67616-5D0F-4694-AF27-A2D01DCD1A30 com.mycomp.myapp

mykola-mokhnach commented 3 years ago

have you checked the actual returned code in the terminal? It could be that visually everything is ok, although the returned exit code is still not equal to zero

stoefln commented 3 years ago

Nevermind. It is a string encoding issue. My application passes the string with the wrong encoding.