Connecting to ios8 source gives instrument code 253 (Solved)

Hey everyone, I’m trying to get some help with source support for ios8.
I am currently running Appium off of the ios8 git source files. I can successfully start and connect to an Appium server, but when the ios 8 simulator launches, it does not install the .app, and repeatedly crashes.

I built the .app in xcode 6.0.1 for the 5s (8.0), and am using osx 10.9.5.

Here is the repeating log message when appium tries to run the simulator

info: [debug] [INSTSERVER] Instruments exited with code 253
info: [debug] Killall instruments
info: [debug] Instruments crashed on startup
info: [debug] Attempting to retry launching instruments, this is retry #3
info: [debug] Killall iOS Simulator
info: Launching instruments
info: [debug] Attempting to run app on iPhone 5s (8.0 Simulator)
info: [debug] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w iPhone 5s (8.0 Simulator) /Users/patshaysc/ScGit/AppiumTestSuite/Builds/Build_3.2.0.8/Sc•D.app -e UIASCRIPT /Users/patshaysc/Library/Application Support/appium/bootstrap/bootstrap-ce278e7c1684ff0f.js -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {“global”:90000}
info: [debug] [INST] Waiting for device to boot…
info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: Unable to install app with path: /Users/patshaysc/ScGit/AppiumTestSuite/Builds/Build_3.2.0.8/Sc•D.app: “(null)”

I know the 1.3 appium release is around the corner, but I would like to get ios8 support going as soon as possible (and now none of my tests will run!)

Any help is greatly appreciated

So it seems that there is a problem with the way that appium is launching instruments through the command line. (for me)

When appium tries to launch instruments it sends this message:
Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w iPhone 5 (8.0 Simulator) /Users/patshaysc/ScGit/AppiumTestSuite/Builds/Build_3.2.0.8/Sc•D.app -e UIASCRIPT /Users/patshaysc/Library/Application Support/appium/bootstrap/bootstrap-5eb8c6092ff68a3b.js -e UIARESULTSPATH /tmp/appium-instruments

I can successfully launch instruments with my .app with the following command:
instruments -w “iPhone 5 (8.0 Simulator)” -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate “/Users/patshaysc/ScGit/AppiumTestSuite/Builds/Build_3.2.0.8/Sc•D.app” -e UIASCRIPT ./testtrace.js -e UIARESULTSPATH /tmp

Do I need to modify my ios8 source files to fix my instruments command or is there something I can just do with changing capabilities?

I have the exact same problem, I updated Xcode to 6.0 and now I cannot run tests anymore.

info: [debug] Attempting to run app on real device with UDID c2b4f2a7812a9a36c2e08397b9b8c2c5154063d3
info: [debug] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w c2b4f2a7812a9a36c2e08397b9b8c2c5154063d3 /var/folders/1d/hwb4fhvd7j9189_vflsm_0vm0000gp/T/11494-1533-1a0lgbs/Payload/KnoTextbooks.app -e UIASCRIPT “/Users/vicus/Library/Application Support/appium/bootstrap/bootstrap-0dc96d2583a49b42.js” -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {“global”:90000}
info: [debug] [INSTSERVER] Instruments exited with code 253

I don’t have any problems with ‘node . --app FULL_PATH_TO_APP/your.app --device-name “iPhone 6” --platform-version 8.0 --platform-name iOS’

@defonus What are the capabilities that you set for the appium server?

All capabilities that present in the “node . command”:
app
deviceName
platformVersion
platformName

Thanks, but it seems like its a problem with the instruments command appium is trying to execute to start the simulator, not the server command or capabilities. Hopefully this will be fixed when 1.3.0 is out.

Can anyone tell me what Instruments line their Appium Server launches for ios tests? I have been unable to run my suite in almost a month and I am getting pretty anxious over here.

I am having the same exact issue. My tests are able to run against simulators but I am unable to inspector or run against a real device.

Guys, try with appium 1.2.4 version. It is not working only with iOS 8. For lower iOS versions it’s perfect with simulators and with real devices.

Regarding the instruments - they are launched from the Xcode.

Thanks emilanova but working with an older version isn’t helping. I am trying to use the current versions so I can test against iOS 8. I am aware of how instruments is launched, its just that when the appium server makes a call to instruments it uses tags that do not work with instruments 6 command line.

Experiencing same Error, but only on iPads regardless of iOS Version.
For iPods/iPhones everything goes smoothe and well

Already tried some manual Instrument commands, but without any success

1 Like

I just fixed my problem, and the master branch of source is running my tests!!
This was not a problem with the instruments command, but with the webdriver, and my app’s name. We used to name different builds with a unicode symbol.
Sc•D or Sc•QA

When the symbol was in the app name, I would get an error along the lines of:
/Users/patshaysc/ScGit/AppiumTestSuite/Builds/Build_3.2.0.8/Sc•D.app: “(null)”

Once that dot was taken out, my tests started running like normal.

tl;dr don’t use unicode symbols in your app names

3 Likes

I am still receiving the 253 error and I do not have unicode symbols in the appname. Should I open a new thread?

I think you should. I only found out about my error with help from Sauce Labs support.

1 Like

Did you enable ui automation for iOS on the device? Settings -> Developer?
I remember seeing the 253 error when this option was disabled

2 Likes

Yes. I have that setting enabled. I have searched and tried all the troubleshooting tips I have found associated with this error…including the following: I updated appium using node.js to appium 1.3.3 (still received same error)…I verified that I have uptodate developer and provisioning profiles…i cleared the device console in xtools. I verified the application name has only alphanumeric characters…and no spaces…rebooted the system…

Also…I put a “comment” line before it sets the driver…driver = new RemoteDriver… and the comment displays in the console…then I set the appium setting to do a full reset…to make sure that there is communication with the device…the mobile app is deleted…and then readded (full reset)…successfully…but when it attempts to launch the app…it always crashes (instruments).

Can you launch via Instruments independently? Not through appium.

1 Like

I will try that…I see in another forum…someone had the same issue as mine.;and when they launched from instruments…some additional xcode steps ran…apparently even though the UI Automation setting is turned ON the device…it was not completely enabled until running from Instruments…this resolved their issue and they only had to do that once. So I have to wait until Sunday to try this as well, but will post my results