Had to kill the running app everytime for appium tests to run on real device [IOS 7]

1,187 views
Skip to first unread message

Vikas Ravindran

unread,
Jan 9, 2014, 11:03:55 AM1/9/14
to appium-...@googlegroups.com
Hey,

Is anyone noticing this ? Once a testcase is complete and session is closed,  executed via the webdriver  , Cannot run the next test W/O killing the APP on the IOS device.

Logs says this :

info: Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments

info: [INSTSERVER] Instruments socket server started at /tmp/instruments_sock

info: Attempting to run app on real device with UDID d65a2664de7dae7ec221d60448279d9d4fcc71a6

info: Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -w d65a2664de7dae7ec221d60448279d9d4fcc71a6 /Users/vikasn/Library/Developer/Xcode/DerivedData/WorxMail-1.3.3-cmoesmluyfltetbuedrpopkuqhuo/Build/Products/Debug-iphoneos/WorxMail.app -e UIASCRIPT /usr/local/lib/node_modules/appium/lib/devices/ios/uiauto/bootstrap.js -e UIARESULTSPATH /tmp/appium-instruments/

info: And extra without-delay env: {}

info: And launch timeout: 90000ms

info: [INST STDERR] 2014-01-09 21:31:41.956 instruments[3003:507] Executable 'WorxMail' is already running as process 2994 which was launched from the 'launchd' process.


info: [INST STDERR] 2014-01-09 21:31:41.959 instruments[3003:507] Recording cancelled : At least one target failed to launch; aborting run


info: [INST STDERR] Instruments Trace Error : Error Domain=com.apple.instruments Code=1 "Error Starting Recording" UserInfo=0x7fd10beb0600 {NSLocalizedDescription=Error Starting Recording, NSLocalizedRecoverySuggestion=At least one target failed to launch; aborting run}

Instruments Trace Error : Failed to start trace.


info: [INSTSERVER] Instruments exited with code 253

error: Instruments did not launch successfully, failing session

info: Cleaning up appium session

error: Failed to start an Appium session, err was: Error: Instruments did not launch successfully--please check your app paths or bundle IDs and try again

info: Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Instruments did not launch successfully--please check your app paths or bundle IDs and try again)","origValue":"Instruments did not launch successfully--please check your app paths or bundle IDs and try again"},"sessionId":null}

POST /wd/hub/session 500 6838ms - 342b

Jonathan Lipps

unread,
Jan 9, 2014, 12:40:48 PM1/9/14
to Vikas Ravindran, appium-...@googlegroups.com
are you calling driver.quit()?

--
http://appium.io
---
You received this message because you are subscribed to the Google Groups "Appium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appium-discus...@googlegroups.com.
Visit this group at http://groups.google.com/group/appium-discuss.
For more options, visit https://groups.google.com/groups/opt_out.

Vikas Ravindran

unread,
Jan 9, 2014, 12:46:40 PM1/9/14
to Jonathan Lipps, appium-...@googlegroups.com

Nope . I'm not calling quit(). Is that required for exiting the test cleanly ?

Jonathan Lipps

unread,
Jan 9, 2014, 12:55:55 PM1/9/14
to Vikas Ravindran, appium-...@googlegroups.com
yes

if you don't call quit, how can the session possibly know to stop?

Vikas Ravindran

unread,
Jan 9, 2014, 2:50:12 PM1/9/14
to appium-...@googlegroups.com, Vikas Ravindran
Hi Jonathan ,

I tried adding quit it didnt help . The Session go deleted though , but still if I try to run the test again [or another test] it fails unless you kill the App manually from the device and start again. 

More Logs :

nfo: [INSTSERVER] Socket closed forcibly due to exit

info: [INSTSERVER] Instruments socket server closed

info: Deleted tracedir we heard about from instruments (/Users/vikasn/selenium-2.39.0/instrumentscli0.trace)

info: Killing the simulator process

info: Deleting plists for bundle: com.citrix.mail

info: No plist files found to remove

info: Cleaning up appium session

info: Responding to client with success: {"status":0,"value":null,"sessionId":"172ca325-01c5-4552-9f69-3fdd4c64b252"}

DELETE /wd/hub/session/172ca325-01c5-4552-9f69-3fdd4c64b252 200 1477ms - 89b

debug: Appium request initiated at /wd/hub/session

debug: Request received with params: {"sessionId":null,"desiredCapabilities":{"platform":"MAC","browserName":"iPad","version":"7.0.3","app":"/Users/vikasn/Library/Developer/Xcode/DerivedData/WorxMail-1.3.3-cmoesmluyfltetbuedrpopkuqhuo/Build/Products/Debug-iphoneos/WorxMail.app","javascriptEnabled":true}}

info: Using local app from desiredCaps: /Users/vikasn/Library/Developer/Xcode/DerivedData/WorxMail-1.3.3-cmoesmluyfltetbuedrpopkuqhuo/Build/Products/Debug-iphoneos/WorxMail.app

info: Creating new appium session c43fa9c6-f844-4f97-8e3d-c470d7ee09db

info: Removing any remaining instruments sockets

info: Cleaned up instruments socket /tmp/instruments_sock

info: Cleaning up any tracedirs

info: No tracedirs to clean up

info: Parsed app Localizable.strings

info: Not setting device type since we're connected to a device

info: Starting iOS device log capture via idevicesyslog

debug: Real device specified but no ipa, assuming bundle ID is on device

debug: Creating instruments

info: Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments

info: [INSTSERVER] Instruments socket server started at /tmp/instruments_sock

info: Attempting to run app on real device with UDID d65a2664de7dae7ec221d60448279d9d4fcc71a6

info: Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -w d65a2664de7dae7ec221d60448279d9d4fcc71a6 /Users/vikasn/Library/Developer/Xcode/DerivedData/WorxMail-1.3.3-cmoesmluyfltetbuedrpopkuqhuo/Build/Products/Debug-iphoneos/WorxMail.app -e UIASCRIPT /usr/local/lib/node_modules/appium/lib/devices/ios/uiauto/bootstrap.js -e UIARESULTSPATH /tmp/appium-instruments/

info: And extra without-delay env: {}

info: And launch timeout: 90000ms

info: [INST STDERR] 2014-01-10 01:15:36.055 instruments[3637:507] Executable 'WorxMail' is already running as process 3167 which was launched from the 'launchd' process.


info: [INST STDERR] 2014-01-10 01:15:36.059 instruments[3637:507] Recording cancelled : At least one target failed to launch; aborting run


info: [INST STDERR] Instruments Trace Error : Error Domain=com.apple.instruments Code=1 "Error Starting Recording" UserInfo=0x7ffcb0543df0 {NSLocalizedDescription=Error Starting Recording, NSLocalizedRecoverySuggestion=At least one target failed to launch; aborting run}

Instruments Trace Error : Failed to start trace.


info: [INSTSERVER] Instruments exited with code 253

error: Instruments did not launch successfully, failing session

info: Cleaning up appium session

error: Failed to start an Appium session, err was: Error: Instruments did not launch successfully--please check your app paths or bundle IDs and try again

info: Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Instruments did not launch successfully--please check your app paths or bundle IDs and try again)","origValue":"Instruments did not launch successfully--please check your app paths or bundle IDs and try again"},"sessionId":null}

POST /wd/hub/session 500 7232ms - 342b

Jonathan Lipps

unread,
Jan 9, 2014, 2:59:17 PM1/9/14
to Vikas Ravindran, appium-...@googlegroups.com
I haven't seen this with other apps. Anyone else have other ideas?
Reply all
Reply to author
Forward
0 new messages