Skip to content

Instantly share code, notes, and snippets.

@vicwomg
Created October 24, 2014 22:01
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 vicwomg/5000464e5eb49e3ef0e8 to your computer and use it in GitHub Desktop.
Save vicwomg/5000464e5eb49e3ef0e8 to your computer and use it in GitHub Desktop.
Appium session fails with null on second launch
info: --> POST /wd/hub/session {"desiredCapabilities":{"newCommandTimeout":900,"platformVersion":"7.1","app":"/Users/jblaze/Library/Developer/Xcode/DerivedData/Soda-dcldacmuyckglggreroxonotfoyr/Build/Products/Release-iphonesimulator/SodaDev.app","platformName":"iOS","deviceName":"iPhone Simulator","browserName":"","locale":"en_US","language":"en"}}
debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"desiredCapabilities":{"newCommandTimeout":900,"platformVersion":"7.1","app":"/Users/jblaze/Library/Developer/Xcode/DerivedData/Soda-dcldacmuyckglggreroxonotfoyr/Build/Products/Release-iphonesimulator/SodaDev.app","platformName":"iOS","deviceName":"iPhone Simulator","browserName":"","locale":"en_US","language":"en"}}
debug: Using local app from desired caps: /Users/jblaze/Library/Developer/Xcode/DerivedData/Soda-dcldacmuyckglggreroxonotfoyr/Build/Products/Release-iphonesimulator/SodaDev.app
debug: Creating new appium session 82f615d1-db10-4ff7-8dd9-b096a63bf6b9
debug: Removing any remaining instruments sockets
debug: Cleaned up instruments socket /tmp/instruments_sock
debug: Cleaning up any tracedirs
debug: Cleaned up /usr/local/share/npm/lib/node_modules/appium/instrumentscli0.trace
debug: Setting Xcode folder
debug: Setting Xcode version
debug: Setting iOS SDK Version
debug: iOS SDK Version set to 7.1
debug: Detecting automation tracetemplate
debug: Not auto-detecting udid, running on sim
debug: No Localizable.strings for language 'en', getting default strings
warn: Could not parse plist file at /Users/jblaze/Library/Developer/Xcode/DerivedData/Soda-dcldacmuyckglggreroxonotfoyr/Build/Products/Release-iphonesimulator/SodaDev.app/en.lproj/Localizable.strings
debug: Setting locale with command /usr/local/share/npm/lib/node_modules/appium/build/ios-sim-locale -sdk 6.1 -language en -locale en_US
debug: Setting locale with command /usr/local/share/npm/lib/node_modules/appium/build/ios-sim-locale -sdk 7.0 -language en -locale en_US
debug: Setting locale with command /usr/local/share/npm/lib/node_modules/appium/build/ios-sim-locale -sdk 7.1 -language en -locale en_US
debug: Setting locale with command /usr/local/share/npm/lib/node_modules/appium/build/ios-sim-locale -sdk 7.1-64 -language en -locale en_US
debug: Locale was set
debug: Creating instruments
debug: Preparing uiauto bootstrap
debug: Dynamic bootstrap dir: /Users/jblaze/Library/Application Support/appium/bootstrap
debug: Dynamic env: {"nodePath":"/usr/local/Cellar/node/0.10.18/bin/node","commandProxyClientPath":"/usr/local/share/npm/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js"}
debug: Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
import "/usr/local/share/npm/lib/node_modules/appium/node_modules/appium-uiauto/uiauto/bootstrap.js";
bootstrap({
nodePath: "/usr/local/Cellar/node/0.10.18/bin/node",
commandProxyClientPath: "/usr/local/share/npm/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js",
});
debug: Dynamic bootstrap path: /Users/jblaze/Library/Application Support/appium/bootstrap/bootstrap-84502a623cd1caa2.js
debug: Reusing dynamic bootstrap: /Users/jblaze/Library/Application Support/appium/bootstrap/bootstrap-84502a623cd1caa2.js
debug: No iOS / app preferences to set
debug: Starting iOS 7.* simulator log capture
debug: Killing the simulator process
debug: Killing any other simulator daemons
debug: [INST] 2014-09-19 18:30:38 +0000 Fail: The target application appears to have died
debug: Checking whether instruments supports our device string
debug: Getting list of devices instruments supports
debug: Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
debug: [INST] Instruments Trace Complete (Duration : 118.188560s; Output : /usr/local/share/npm/lib/node_modules/appium/instrumentscli0.trace)
debug: [INSTSERVER] Instruments exited with code 0
debug: Cleaning up after instruments exit
debug: Instruments exited unexpectedly
debug: Destroying instruments client socket.
debug: Closing socket server.
debug: Instruments socket server was closed
debug: Deleted tracedir we heard about from instruments (/usr/local/share/npm/lib/node_modules/appium/instrumentscli0.trace)
debug: Stopping iOS log capture
debug: Killing the simulator process
debug: Killing any other simulator daemons
debug: Cleaning app state.
debug: Deleted /Users/jblaze/Library/Application Support/iPhone Simulator/7.1-64/Applications
debug: Deleted /Users/jblaze/Library/Application Support/iPhone Simulator/7.1-64/Library/TCC
debug: Deleted /Users/jblaze/Library/Application Support/iPhone Simulator/7.1-64/Library/Caches/locationd
debug: Deleted /Users/jblaze/Library/Application Support/iPhone Simulator/7.1-64/Media
debug: Deleted /Users/jblaze/Library/Application Support/iPhone Simulator/7.1-64/Library/Keychains
debug: Cleaning up appium session
debug: Cleaning app state.
debug: No folders found to remove
debug: No device id or app, not installing to real device.
debug: Starting command proxy.
debug: Instruments socket server started at /tmp/instruments_sock
debug: Starting instruments
debug: Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
info: Launching instruments
debug: Instruments device was changed from:" iPhone - Simulator - iOS 7.1 " to:" iPhone Retina (4-inch 64-bit) - Simulator - iOS 7.1"
debug: Attempting to run app on iPhone Retina (4-inch 64-bit) - Simulator - iOS 7.1
debug: 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 iPhone Retina (4-inch 64-bit) - Simulator - iOS 7.1 /Users/jblaze/Library/Developer/Xcode/DerivedData/Soda-dcldacmuyckglggreroxonotfoyr/Build/Products/Release-iphonesimulator/SodaDev.app -e UIASCRIPT /Users/jblaze/Library/Application Support/appium/bootstrap/bootstrap-84502a623cd1caa2.js -e UIARESULTSPATH /tmp/appium-instruments
debug: And extra without-delay env: {"DYLD_INSERT_LIBRARIES":"/usr/local/share/npm/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd/InstrumentsShim.dylib","LIB_PATH":"/usr/local/share/npm/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd"}
debug: And launch timeouts (in ms): {"global":90000}
debug: [INST STDERR] 2014-09-19 11:30:45.645 ScriptAgent[46861:3107] CLTilesManagerClient: initialize, sSharedTilesManagerClient
debug: [INST STDERR] 2014-09-19 11:30:45.645 ScriptAgent[46861:3107] CLTilesManagerClient: init
2014-09-19 11:30:45.646 ScriptAgent[46861:3107] CLTilesManagerClient: reconnecting, 0x10d55b5b0
info: Instruments is ready to receive commands
debug: Instruments launched. Starting poll loop for new commands.
debug: Setting bootstrap config keys/values
debug: Pushing command to appium work queue: "target = $.target();\nau = $;\n$.isVerbose = true;\nautoAcceptAlerts = false;\n"
debug: Sending command to instruments: target = $.target();
au = $;
$.isVerbose = true;
autoAcceptAlerts = false;
debug: Socket data received (2 bytes)
debug: Socket data being routed.
debug: Sending command to instruments: target = $.target();
au = $;
$.isVerbose = true;
autoAcceptAlerts = false;
debug: [INST] 2014-09-19 18:30:46 +0000 Debug: evaluation finished
debug: [INST] 2014-09-19 18:30:46 +0000 Debug: Result is not protocol compliant, wrapping
debug: [INST] 2014-09-19 18:30:46 +0000 Debug: Running system command #1: /usr/local/Cellar/node/0.10.18/bin/node /usr/local/share/npm/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{"status":0,"value":false}...
debug: Socket data received (28 bytes)
debug: Socket data being routed.
debug: Got result from instruments: {"status":0,"value":false}
debug: Pushing command to appium work queue: "au.bundleId()"
debug: Sending command to instruments: au.bundleId()
debug: Sending command to instruments: au.bundleId()
debug: [INST] 2014-09-19 18:30:46 +0000 Debug: Got new command 1 from instruments: au.bundleId()
debug: [INST] 2014-09-19 18:30:46 +0000 Debug: evaluating au.bundleId()
debug: [INST] 2014-09-19 18:30:46 +0000 Debug: evaluation finished
debug: [INST] 2014-09-19 18:30:46 +0000 Debug: Result is not protocol compliant, wrapping
debug: [INST] 2014-09-19 18:30:46 +0000 Debug: Running system command #2: /usr/local/Cellar/node/0.10.18/bin/node /usr/local/share/npm/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{"status":0,"value":"com.kabam.SodaDev"}...
debug: Socket data received (42 bytes)
debug: Socket data being routed.
debug: Got result from instruments: {"status":0,"value":"com.kabam.SodaDev"}
debug: Bundle ID for open app is com.kabam.SodaDev
debug: Setting initial orientation to PORTRAIT
debug: Pushing command to appium work queue: "au.setScreenOrientation('PORTRAIT')"
debug: Sending command to instruments: au.setScreenOrientation('PORTRAIT')
debug: Sending command to instruments: au.setScreenOrientation('PORTRAIT')
debug: [INST] 2014-09-19 18:30:46 +0000 Debug: Got new command 2 from instruments: au.setScreenOrientation('PORTRAIT')
debug: [INST] 2014-09-19 18:30:46 +0000 Debug: evaluating au.setScreenOrientation('PORTRAIT')
debug: [INST] 2014-09-19 18:30:46 +0000 Debug: target.setDeviceOrientation("1")
debug: [INST] 2014-09-19 18:30:46 +0000 Debug: evaluation finished
debug: [INST] 2014-09-19 18:30:46 +0000 Debug: Running system command #3: /usr/local/Cellar/node/0.10.18/bin/node /usr/local/share/npm/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{"status":0,"value":"PORTRAIT"}...
debug: Socket data received (33 bytes)
debug: Socket data being routed.
debug: Got result from instruments: {"status":0,"value":"PORTRAIT"}
debug: Device launched! Ready for commands
debug: Setting command timeout to the default of 60 secs
debug: Appium session started with sessionId null
info: <-- POST /wd/hub/session 303 8433.176 ms - 9
info: --> GET /wd/hub/session/null {}
debug: Appium request initiated at /wd/hub/session/null
debug: Request received with params: {}
info: <-- GET /wd/hub/session/null 404 1.045 ms - 40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment