iPhone automation using selenium webdriver,java,appium and webkit proxy: Not able to execute more than 1 testcase

I am working on iPhone automation using selenium webdriver,appium & ios webkit debug proxy.
OS X Version 10.11.2
Appium 1.3.5
Xcode: 7.2
Device: iPhone 6[9.2]
I have installed safariLauncher app in iPhone using Xcode.

I launched appium through terminal.
Cmd: Appium &
Then launched ios-webkit-debug-proxy.
Cmd: ./bin/ios-webkit-debug-proxy-launcher.js -c [device udid]:27753 -d

I launch appium & webkit server every time before starting any testcase execution. When I do this my 1st testcase execution works fine completely with zero error. But my 2nd 3rd and so on testcases do not execute. I get the below error in terminal in appium server log.

code error: Failed to start an Appium session, err was: Error: Instruments crashed on startup
info: [debug] Error: Instruments crashed on startup
at Instruments.onInstrumentsExit (/usr/local/lib/node_modules/appium/node_modules/appium-instruments/lib/instruments.js:389:31)
at null. (/usr/local/lib/node_modules/appium/node_modules/appium-instruments/lib/instruments.js:308:12)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: Instruments crashed on startup)”,“origValue”:“Instruments crashed on startup”},“sessionId”:null}
info: <-- POST /wd/hub/session 500 153251.340 ms - 182

Please suggest any solution.

Thanks in advance :slight_smile:

Does it work in iOS simulator? I’m also getting issues with instruments for iOS device testing.
Btw any reason for using such an old version of Appium - what about trying 1.4.16 ?

Did you do “session overide” If not try it. BTW little advice try to use latest version of appium. for OSX new one is 1.4.13

Hi @deadlyfingers, yes its working in simulator. Problem is only with real iOS device.

@dasuner @deadlyfingers
I have installed appium through terminal using npm commands. Using npm & terminal I am not able to install any version of appium 1.4 . I am getting many errors during installation. Hence using 1.3.5.

Please check this post: Not able to install appium 1.4.12