Appium showing error error: Failed to start an Appium session, err was: Error: Installing com.dishnetwork.DANY-Mobile failed

Environment:

  1. Xcode: 7.3
  2. Appium (Tried with 1.4.0, 1.4.13 and 1.5.0)
    3.Java client 3.2

Error:
info: Welcome to Appium v1.4.1 (REV ce6220829063679bcccf5724515c29569c4a16d9)

info: Appium REST http interface listener started on 127.0.0.1:4724

info: [debug] Non-default server args: {“app”:“com.dishnetwork.DANY-Mobile”,“udid”:“bbf20e0c5fc880d54d1e3a9491284d2150e059a0”,“address”:“127.0.0.1”,“port”:4724,“sessionOverride”:true,“deviceName”:“iPhone 6s Plus (9.0)”,“platformName”:“iOS”,“platformVersion”:“8.0.2”,“showIOSLog”:true,“defaultCommandTimeout”:7200,“debugLogSpacing”:true}
info: Console LogLevel: debug

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

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

info: <-- GET /wd/hub/status 200 10.691 ms - 104 {“status”:0,“value”:{“build”:{“version”:“1.4.1”,“revision”:“ce6220829063679bcccf5724515c29569c4a16d9”}}}

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

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

info: <-- GET /wd/hub/status 200 5.304 ms - 104 {“status”:0,“value”:{“build”:{“version”:“1.4.1”,“revision”:“ce6220829063679bcccf5724515c29569c4a16d9”}}}
info: --> GET /wd/hub/sessions {}
info: [debug] Responding to client with success: {“status”:0,“value”:[]}
info: <-- GET /wd/hub/sessions 200 1.084 ms - 23 {“status”:0,“value”:[]}
info: --> POST /wd/hub/session {“desiredCapabilities”:{“platformName”:“iOS”,“platformVersion”:“8.0.2”,“newCommandTimeout”:“999999”,“automationName”:“Appium”,“deviceName”:“iPhone 6s Plus (9.0)”}}
info: Client User-Agent string: Appium (unknown version) CFNetwork/760.4.2 Darwin/15.4.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 877fa950-a764-44ea-9a6e-85821dfd691d
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.dishnetwork.DANY-Mobile/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.dishnetwork.DANY-Mobile/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/slinger/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/slinger/Library/Application Support/appium/bootstrap/bootstrap-6745615c424bb0c0.js
info: [debug] Reusing dynamic bootstrap: /Users/slinger/Library/Application Support/appium/bootstrap/bootstrap-6745615c424b
b0c0.js
info: [debug] Attempting iOS device log capture via libimobiledevice idevicesyslog

info: [debug] Creating iDevice object with udid bbf20e0c5fc880d54d1e3a9491284d2150e059a0

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

info: [debug] Cleaning up appium session

error: Failed to start an Appium session, err was: Error: Installing com.dishnetwork.DANY-Mobile failed

info: [debug] Error: Installing com.dishnetwork.DANY-Mobile 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)

PLEASE HELP ME

HI,
Please change port value from 4724 to another port.

Launching Appium with command: ‘/Applications/Appium.app/Contents/Resources/node/bin/node’ lib/server/main.js --address “127.0.0.1” --port “4725” --command-timeout “7200” --session-override --debug-log-spacing --log “/tmp/appium.log” --log-timestamp --platform-version “8.1.2” --platform-name “iOS” --app “com.dishnetwork.DANY-Mobile” --udid “bbf20e0c5fc880d54d1e3a9491284d2150e059a0” --show-ios-log --device-name “iPhone 6”

2016-09-20 15:07:40:966 - info: Welcome to Appium v1.4.1 (REV ce6220829063679bcccf5724515c29569c4a16d9)

2016-09-20 15:07:40:973 - info: Appium REST http interface listener started on 127.0.0.1:4725

2016-09-20 15:07:40:978 - info: [debug] Non-default server args: {“app”:“com.dishnetwork.DANY-Mobile”,“udid”:“bbf20e0c5fc880d54d1e3a9491284d2150e059a0”,“address”:“127.0.0.1”,“port”:4725,“sessionOverride”:true,“log”:"/tmp/appium.log",“logTimestamp”:true,“deviceName”:“iPhone 6”,“platformName”:“iOS”,“platformVersion”:“8.1.2”,“showIOSLog”:true,“defaultCommandTimeout”:7200,“debugLogSpacing”:true}
2016-09-20 15:07:40:978 - info: Console LogLevel: debug
2016-09-20 15:07:40:979 - info: File LogLevel: debug

2016-09-20 15:07:41:587 - info: --> GET /wd/hub/status {}

2016-09-20 15:07:41:590 - info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.1”,“revision”:“ce6220829063679bcccf5724515c29569c4a16d9”}}}

2016-09-20 15:07:41:597 - info: <-- GET /wd/hub/status 200 9.938 ms - 104 {“status”:0,“value”:{“build”:{“version”:“1.4.1”,“revision”:“ce6220829063679bcccf5724515c29569c4a16d9”}}}

2016-09-20 15:07:44:524 - info: --> GET /wd/hub/status {}

2016-09-20 15:07:44:526 - info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.1”,“revision”:“ce6220829063679bcccf5724515c29569c4a16d9”}}}

2016-09-20 15:07:44:529 - info: <-- GET /wd/hub/status 200 5.203 ms - 104 {“status”:0,“value”:{“build”:{“version”:“1.4.1”,“revision”:“ce6220829063679bcccf5724515c29569c4a16d9”}}}
2016-09-20 15:07:44:531 - info: --> GET /wd/hub/sessions {}
2016-09-20 15:07:44:532 - info: [debug] Responding to client with success: {“status”:0,“value”:[]}
2016-09-20 15:07:44:532 - info: <-- GET /wd/hub/sessions 200 1.450 ms - 23 {“status”:0,“value”:[]}

2016-09-20 15:07:44:549 - info: --> POST /wd/hub/session {“desiredCapabilities”:{“platformName”:“iOS”,“platformVersion”:“8.1.2”,“newCommandTimeout”:“999999”,“automationName”:“Appium”,“deviceName”:“iPhone 6”}}
2016-09-20 15:07:44:550 - info: Client User-Agent string: Appium (unknown version) CFNetwork/760.4.2 Darwin/15.4.0 (x86_64)
2016-09-20 15:07:44:550 - info: *************************************
2016-09-20 15:07:44:550 - info: *************************************
2016-09-20 15:07:44:551 - info: *************************************
2016-09-20 15:07:44:551 - info: *************************************
2016-09-20 15:07:44:551 - info: *************************************
2016-09-20 15:07:44:552 - info: *************************************
2016-09-20 15:07:44:552 - info: *************************************
2016-09-20 15:07:44:552 - info: *************************************
2016-09-20 15:07:44:553 - info: **** NEW SESSION ***
2016-09-20 15:07:44:553 - info: **** NEW SESSION ***
2016-09-20 15:07:44:553 - info: **** NEW SESSION ***
2016-09-20 15:07:44:553 - info: **** NEW SESSION ***
2016-09-20 15:07:44:553 - info: **** NEW SESSION ***
2016-09-20 15:07:44:554 - info: **** NEW SESSION ***
2016-09-20 15:07:44:554 - info: **** NEW SESSION ***
2016-09-20 15:07:44:554 - info: **** NEW SESSION ***
2016-09-20 15:07:44:554 - info: *************************************
2016-09-20 15:07:44:555 - info: *************************************
2016-09-20 15:07:44:555 - info: *************************************
2016-09-20 15:07:44:555 - info: *************************************
2016-09-20 15:07:44:555 - info: *************************************
2016-09-20 15:07:44:555 - info: *************************************
2016-09-20 15:07:44:556 - info: *************************************
2016-09-20 15:07:44:556 - info: *************************************
2016-09-20 15:07:44:560 - info: [debug] App is an iOS bundle, will attempt to run as pre-existing
2016-09-20 15:07:44:562 - info: [debug] Creating new appium session af4ec63e-3b27-46ba-9c49-489d15d14ec0
2016-09-20 15:07:44:563 - info: [debug] Removing any remaining instruments sockets
2016-09-20 15:07:44:565 - info: [debug] Cleaned up instruments socket /tmp/instruments_sock
2016-09-20 15:07:44:565 - info: [debug] Auto-detecting iOS udid…
2016-09-20 15:07:44:565 - info: [debug] Not auto-detecting udid, running on sim
2016-09-20 15:07:44:566 - info: [debug] Could not parse plist file (as binary) at /Applications/Appium.app/Contents/Resources/node_modules/appium/com.dishnetwork.DANY-Mobile/en.lproj/Localizable.strings
2016-09-20 15:07:44:567 - info: Will try to parse the plist file as XML
2016-09-20 15:07:44:567 - info: [debug] Could not parse plist file (as XML) at /Applications/Appium.app/Contents/Resources/node_modules/appium/com.dishnetwork.DANY-Mobile/en.lproj/Localizable.strings
2016-09-20 15:07:44:568 - warn: Could not parse app Localizable.strings assuming it doesn’t exist
2016-09-20 15:07:44:568 - info: [debug] Creating instruments
2016-09-20 15:07:44:569 - info: [debug] Preparing uiauto bootstrap
2016-09-20 15:07:44:569 - info: [debug] Dynamic bootstrap dir: /Users/slinger/Library/Application Support/appium/bootstrap
2016-09-20 15:07:44:570 - 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”}
2016-09-20 15:07:44:576 - info: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!

2016-09-20 15:07:44:576 - info: [debug] Dynamic bootstrap path: /Users/slinger/Library/Application Support/appium/bootstrap/bootstrap-6745615c424bb0c0.js
2016-09-20 15:07:44:580 - info: [debug] Reusing dynamic bootstrap: /Users/slinger/Library/Application Support/appium/bootstrap/bootstrap-6745615c424bb0c0.js
2016-09-20 15:07:44:582 - info: [debug] Attempting iOS device log capture via libimobiledevice idevicesyslog

2016-09-20 15:07:45:095 - info: [debug] Creating iDevice object with udid bbf20e0c5fc880d54d1e3a9491284d2150e059a0

2016-09-20 15:07:45:423 - info: [debug] App is not installed. Will try to install the app.

2016-09-20 15:07:46:071 - info: [debug] Cleaning up appium session

2016-09-20 15:07:46:072 - error: Failed to start an Appium session, err was: Error: Installing com.dishnetwork.DANY-Mobile failed

2016-09-20 15:07:46:078 - info: [debug] Error: Installing com.dishnetwork.DANY-Mobile 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)

Same error while running Appium Inspector Also

It is not able to detect the app file is installed or not.

app is already install on the device. It is working fine with instrument.

How about the UDID which was used in appium setting?

Its correct . Now its working after running the below command
sudo chmod -R 777 /var/db/lockdown/

2 Likes

Its was because of security check on the MAC

Interesting! Thank for sharing!