Running the tests on real device!

Hello everybody :
The problem start at this point that i wanna run my tests on real device for the first time:
on first step:

  1. i created build (ipa) signed as development ( but i’m not sure if i have signed it correctly ? )
  2. copy that build on desktop
  3. in Appium gave the device name, ipa path, bundle ID and UDID of device
  4. installed the ideviceinstaller with this command: brew install --HEAD ideviceinstaller
  5. i just try to start the Appium inspector to see if i’m able to run the app on real device
    then it fails to install and run the App in device :

info: [debug] Responding to client with success: {“status”:0,“value”:[]}
info: <-- GET /wd/hub/sessions 200 1.077 ms - 23 {“status”:0,“value”:[]}

info: --> POST /wd/hub/session {“desiredCapabilities”:{“platformName”:“iOS”,“platformVersion”:“9.2”,“newCommandTimeout”:“999999”,“automationName”:“Appium”,“deviceName”:“iPhone 6S”}}
info: Client User-Agent string: Appium (unknown version) CFNetwork/760.2.6 Darwin/15.3.0 (x86_64)
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************

info: [debug] App is an iOS bundle, will attempt to run as pre-existing
info: [debug] Creating new appium session cb77af52-1e09-4192-a2cf-d764bca23083
info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Auto-detecting iOS udid…
info: [debug] Not auto-detecting udid, running on sim
info: [debug] Could not parse plist file (as binary) at /Applications/Appium.app/Contents/Resources/node_modules/appium/com.test.game/en.lproj/Localizable.strings
info: Will try to parse the plist file as XML
info: [debug] Could not parse plist file (as XML) at /Applications/Appium.app/Contents/Resources/node_modules/appium/com.test.game/en.lproj/Localizable.strings
warn: Could not parse app Localizable.strings assuming it doesn’t exist
info: [debug] Creating instruments
info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/Shared/Jenkins/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env: {“nodePath”:"/Applications/Appium.app/Contents/Resources/node/bin/node",“commandProxyClientPath”:"/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-uiauto/bin/command-proxy-client.js",“instrumentsSock”:"/tmp/instruments_sock",“interKeyDelay”:null,“justLoopInfinitely”:false,“autoAcceptAlerts”:false,“autoDismissAlerts”:false,“sendKeyStrategy”:“grouped”}
info: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!

info: [debug] Dynamic bootstrap path: /Users/Shared/Jenkins/Library/Application Support/appium/bootstrap/bootstrap-5923cadea0343e3f.js
info: [debug] Reusing dynamic bootstrap: /Users/Shared/Jenkins/Library/Application Support/appium/bootstrap/bootstrap-5923cadea0343e3f.js
info: [debug] Attempting iOS device log capture via libimobiledevice idevicesyslog

info: [debug] Creating iDevice object with udid r47c8a24f3c6d3eea5637fe80d1e2655e3
info: [debug] App is not installed. Will try to install the app.

error: Failed to start an Appium session, err was: Error: Command failed: /bin/sh -c ideviceinstaller -u r47c8a24f3c6d3eea5637fe80d1e2655e3 -i com.test.game

info: [debug] Cleaning up appium session
info: [debug] Error: Command failed: /bin/sh -c ideviceinstaller -u r47c8a24f3c6d3eea5637fe80d1e2655e3 -i com.test.game

at ChildProcess.exithandler (child_process.js:751:12)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)

info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: Command failed: /bin/sh -c ideviceinstaller -u r47c8a24f3c6d3eea5637fe80d1e2655e3 -i com.test.game\n)”,“killed”:false,“code”:2,“signal”:null,“cmd”:"/bin/sh -c ideviceinstaller -u r47c8a24f3c6d3eea5637fe80d1e2655e3 -i com.test.game",“origValue”:“Command failed: /bin/sh -c ideviceinstaller -u r47c8a24f3c6d3eea5637fe80d1e2655e3 -i com.test.game\n”},“sessionId”:null}
info: <-- POST /wd/hub/session 500 84.349 ms - 463

Even when i disconnect the device i get the same error from appium :open_mouth:

Looks like you’ve set the ‘app’ capability to the bundleId. Can you set it to the path to the app?

1 Like

i change the setting now i get this error :

info: Client User-Agent string: Appium (unknown version) CFNetwork/760.2.6 Darwin/15.3.0 (x86_64)
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: *************************************

info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: [debug] App is an iOS bundle, will attempt to run as pre-existing
info: [debug] Creating new appium session f7fae38a-610a-4cfe-b91a-74d96471e0e8
info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock

info: [debug] Auto-detecting iOS udid…
info: [debug] Not auto-detecting udid, running on sim
info: [debug] Could not parse plist file (as binary) at /Applications/Appium.app/Contents/Resources/node_modules/appium/com.aio.talkDe/en.lproj/Localizable.strings
info: Will try to parse the plist file as XML
info: [debug] Could not parse plist file (as XML) at /Applications/Appium.app/Contents/Resources/node_modules/appium/com.aio.talkDe/en.lproj/Localizable.strings
warn: Could not parse app Localizable.strings assuming it doesn’t exist
info: [debug] Creating instruments
info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/Shared/Jenkins/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env: {“nodePath”:"/Applications/Appium.app/Contents/Resources/node/bin/node",“commandProxyClientPath”:"/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-uiauto/bin/command-proxy-client.js",“instrumentsSock”:"/tmp/instruments_sock",“interKeyDelay”:null,“justLoopInfinitely”:false,“autoAcceptAlerts”:false,“autoDismissAlerts”:false,“sendKeyStrategy”:“grouped”}

info: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!

info: [debug] Dynamic bootstrap path: /Users/Shared/Jenkins/Library/Application Support/appium/bootstrap/bootstrap-5923cadea0343e3f.js
info: [debug] Reusing dynamic bootstrap: /Users/Shared/Jenkins/Library/Application Support/appium/bootstrap/bootstrap-5923cadea0343e3f.js
info: [debug] Attempting iOS device log capture via libimobiledevice idevicesyslog

info: [debug] Creating iDevice object with udid ce68c0141c2de51dee3624a6a7a052c22c41

info: [debug] App is not installed. Will try to install the app.

info: [IOS_SYSLOG_ROW ] May 13 13:21:47 DTAG-ST052-iPhone-5 syslog_relay[532] : syslog_relay read 51 total bytes:

info: [IOS_SYSLOG_ROW ] ========================
info: [IOS_SYSLOG_ROW ] ASL is here to serve you

info: [IOS_SYSLOG_ROW ] May 13 13:21:47 DTAG-ST052-iPhone-5 syslog_relay[532] : syslog_relay found the ASL prompt. Starting…

info: [debug] Cleaning up appium session

error: Failed to start an Appium session, err was: Error: Installing com.aio.talkDe failed

info: [debug] Error: Installing com.aio.talkDe failed
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/node-idevice/main.js:159:6
at ChildProcess.exithandler (child_process.js:742:7)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Socket. (child_process.js:1183:11)
at Socket.emit (events.js:107:17)
at Pipe.close (net.js:485:12)
info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: Installing com.aio.talkDe failed)”,“origValue”:“Installing com.aio.talkDe failed”},“sessionId”:null}
info: <-- POST /wd/hub/session 500 3621.131 ms - 200
info: [IOS_SYSLOG_ROW ] May 13 13:21:49 DTAG-ST052-iPhone-5 mobile_installation_proxy[173] : 0x40081000 handle_connection: Could not receive request from host.

Could you try to just test with one device at a time until you get it working? Too many variables otherwise.

So it’s still trying to install by bundleId, which I don’t think will work. Could you post the capabilities that you are using?