A new session could not be created. (Original error: Command failed: /bin/sh -c ideviceinstaller -u UDID -i com.ittiam.myapp No iOS device found, is it plugged in?

All,

I’m trying run appium on real devices but i’m getting below error, Kindly help me.

Logs

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.ittiam.VividPlay/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.ittiam.VividPlay/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/administrator/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/node_modules/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/administrator/Library/Application Support/appium/bootstrap/bootstrap-6745615c424bb0c0.js

info: [debug] Reusing dynamic bootstrap: /Users/administrator/Library/Application Support/appium/bootstrap/bootstrap-6745615c424bb0c0.js
info: [debug] Attempting iOS device log capture via libimobiledevice idevicesyslog

info: [debug] Creating iDevice object with udid A623C7F9E4C12ACC8A2730FF85DD02548B3D460C

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

info: [debug] Cleaning up appium session

info: [debug] Error: Command failed: /bin/sh -c ideviceinstaller -u A623C7F9E4C12ACC8A2730FF85DD02548B3D460C -i com.ittiam.VividPlay
No iOS device found, is it plugged in?

at ChildProcess.exithandler (child_process.js:751:12)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Socket.<anonymous> (child_process.js:1183:11)
at Socket.emit (events.js:107:17)
at Pipe.close (net.js:485:12)

error: Failed to start an Appium session, err was: Error: Command failed: /bin/sh -c ideviceinstaller -u A623C7F9E4C12ACC8A2730FF85DD02548B3D460C -i com.ittiam.VividPlay
No iOS device found, is it plugged in?

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 A623C7F9E4C12ACC8A2730FF85DD02548B3D460C -i com.ittiam.VividPlay\nNo iOS device found, is it plugged in?\n)”,“killed”:false,“code”:255,“signal”:null,“cmd”:"/bin/sh -c ideviceinstaller -u A623C7F9E4C12ACC8A2730FF85DD02548B3D460C -i com.ittiam.VividPlay",“origValue”:“Command failed: /bin/sh -c ideviceinstaller -u A623C7F9E4C12ACC8A2730FF85DD02548B3D460C -i com.ittiam.VividPlay\nNo iOS device found, is it plugged in?\n”},“sessionId”:null}
info: <-- POST /wd/hub/session 500 285.434 ms - 572

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.8”,“revision”:“c8179bd8352d3c62d98fa58b324491230df9342a”}}}

info: <-- GET /wd/hub/status 200 3.675 ms - 104 {“status”:0,“value”:{“build”:{“version”:“1.4.8”,“revision”:“c8179bd8352d3c62d98fa58b324491230df9342a”}}}

info: --> GET /wd/hub/status {}

Anybody help me for this issue.

Do you run Appium from the command line or from the Appium.app?

Hi lldi

I run by appium app.

@Karthik_Gowda

Is Develper option enabled in your IOS device?

Is your device registered at Apple Developer? Can you run your app from XCode?

Hello there,

I am beginner of iOS automation using Appium and facing the same issue. Kindly anyone help me.

I had the same problem, and i resolved it temporarily by adding the PATH variable into the RUN -> RUN CONFIGURATION -> Click on your test class (Junit/TesnNG/etc in my case it was TestNG-> SmokeTest) -> Click Environment Tab -> Click NEW -> Example of my variable : NAME : PATH Value : /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

This resolved my issue until i can figure out why eclipse does not get the PATH variable from the Bash_profile.