Skip to content

Instantly share code, notes, and snippets.

@jmoody
Created November 17, 2014 18:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmoody/dad5466e4b9a2d456432 to your computer and use it in GitHub Desktop.
Save jmoody/dad5466e4b9a2d456432 to your computer and use it in GitHub Desktop.
Errno::EINTR: Interrupted system call @ rb_sysopen #35

Extracted from: calabash/run_loop#35

If instruments fails to execute the script using the method below, the problem is on Apple's side of the fence and there is very little we can do besides file bug reports and keep trying to discover the magical ritual that makes it work.

If instruments can execute the script using the method below, then we need to dig deeper into this issue.

Reproduce

  1. Install your app on the problem device; it can be any app that you have the bundle identifier for.
  2. Make a note of your device identifier.
  3. Make a note of the bundle identifier of the app you are targeting.
  4. In your local directory, install the sample-script.js below.
  5. $ xcrun instruments -w < device udid > -t "Automation" < bundle id> -e UIASCRIPT sample-script.js

Expected

For instruments to launch the application and execute the sample script.

The output should be something like this:

2014-11-14 13:48:12 +0000 Default: Start
2014-11-14 13:48:17 +0000 Default: End
Instruments Trace Complete (Duration : 6.235099s; Output : < snip >/instrumentscli1.trace)

Found

The application launches, but instruments hangs indefinitely.

Notes

This can be reproduced with any app that is installed on the device and for which you have the device identifier.

System Configuration

Reproduced on the following iOS and MacOS combinations with Xcode 6.1.


  • Mavericks 10.9.5
  • Yosemite 10.10.0
  • Yosemite 10.10.1 (beta)

  • iOS 8.0.*
  • iOS 8.1
  • iOS 8.1.1 (beta)
sample-script.js
UIALogger.logMessage("Start");

target = UIATarget.localTarget();
app = target.frontMostApp();

target.delay(5);

UIALogger.logMessage("End");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment