Failed to start an Appium session, err was: Error: Installing

Hi,

I have an app which has been signed with a developer profile. The app is already installed on the device. Then I tried to launch Appium inspector and I get error as “Failed to start an Appium session, err was: Error: Installing”

Appium Version:1.4.13
OS : OS X 10.11.1
iOS : 9.1

In my device Settings->General->Enable UI Automation is set to YES.

My Questions:

  1. Why I am seeing “App is not installed” in log when the app is already installed in device?
  2. Xcode instruments automation tool is able to lauch the app which means the app has right development profile.Or Am I missing something?

Full Appium Log:
Launching Appium with command: ‘/Applications/Appium.app/Contents/Resources/node/bin/node’ lib/server/main.js --address “127.0.0.1” --port “4725” --callback-address “127.0.0.1” --callback-port “4723” --command-timeout “7200” --debug-log-spacing --platform-version “9.1” --platform-name “iOS” --app “tv.accedo.tve.demo.ios.appium” --udid “93b14e455cd2de136ed17f0ec59ba88e85a923be” --full-reset --show-ios-log --show-ios-log --device-name “iPhone 6 Plus” --native-instruments-lib --orientation “Portrait”

info: Welcome to Appium v1.4.13 (REV c75d8adcb66a75818a542fe1891a34260c21f76a)

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

info: [debug] Non-default server args: {“app”:“tv.accedo.tve.demo.ios.appium”,“udid”:“93b14e455cd2de136ed17f0ec59ba88e85a923be”,“address”:“127.0.0.1”,“port”:4725,“callbackAddress”:“127.0.0.1”,“callbackPort”:4723,“fullReset”:true,“nativeInstrumentsLib”:true,“deviceName”:“iPhone 6 Plus”,“platformName”:“iOS”,“platformVersion”:“9.1”,“orientation”:“Portrait”,“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.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}

info: <-- GET /wd/hub/status 200 11.902 ms - 105 {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}

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

info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}
info: <-- GET /wd/hub/status 200 3.474 ms - 105 {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}

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

info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}
info: <-- GET /wd/hub/status 200 1.852 ms - 105 {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}
info: --> GET /wd/hub/sessions {}
info: [debug] Responding to client with success: {“status”:0,“value”:[]}
info: <-- GET /wd/hub/sessions 200 1.800 ms - 23 {“status”:0,“value”:[]}

info: --> POST /wd/hub/session {“desiredCapabilities”:{“platformName”:“iOS”,“platformVersion”:“9.1”,“newCommandTimeout”:“999999”,“automationName”:“Appium”,“deviceName”:“iPhone 6 Plus”}}

info: Client User-Agent string: Appium (unknown version) CFNetwork/760.1.2 Darwin/15.0.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 3b239cca-2ad5-45e3-a6bf-faea03ad45e5
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/tv.accedo.tve.demo.ios.appium/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/tv.accedo.tve.demo.ios.appium/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/BharathMBA/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/BharathMBA/Library/Application Support/appium/bootstrap/bootstrap-5923cadea0343e3f.js
info: [debug] Reusing dynamic bootstrap: /Users/BharathMBA/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 93b14e455cd2de136ed17f0ec59ba88e85a923be

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

info: [IOS_SYSLOG_ROW ] Nov 26 16:32:29 Bharath syslog_relay[151] : syslog_relay found the ASL prompt. Starting…

info: [debug] Cleaning up appium session

error: Failed to start an Appium session, err was: Error: Installing tv.accedo.tve.demo.ios.appium failed

info: [debug] Error: Installing tv.accedo.tve.demo.ios.appium 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 tv.accedo.tve.demo.ios.appium failed)”,“origValue”:“Installing tv.accedo.tve.demo.ios.appium failed”},“sessionId”:null}
info: <-- POST /wd/hub/session 500 3448.254 ms - 216
info: [IOS_SYSLOG_ROW ] Nov 26 16:32:31 Bharath mobile_installation_proxy[164] : 0x16e247000 handle_connection: Could not receive request from host.
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}
info: <-- GET /wd/hub/status 200 0.910 ms - 105 {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}

Device Log:
Nov 26 16:32:29 Bharath syslog_relay[151] : syslog_relay found the ASL prompt. Starting…
Nov 26 16:32:31 Bharath mobile_installation_proxy[164] : 0x16e247000 handle_connection: Could not
receive request from host.

Thanks

I would suspect that the bundle id was changed at some point. Here are some good instructions for getting the bundle id:

https://kb.acronis.com/content/39368