Ideviceinstaller: "Could not initialize ideviceinstaller"

I’m seeing the following error starting an iOS test:

iPhone 6, iOS 8.1.3, Appium 1.3.5.

I have authorized the device, restarted the device, cleared the device logs, re-booted my machine.
I can install using fruitstrap.

info: [debug] Starting iOS device log capture via deviceconsole
info: [debug] Not pre-launching simulator
info: [debug] Creating iDevice object with udid 3c41470205c4f15fd74a64ae8354aad716b91c0d
info: [debug] Couldn’t find ideviceinstaller, trying built-in at /Users/eclose/Projects/appium/build/libimobiledevice-macosx/ideviceinstaller
error: Could not initialize ideviceinstaller; make sure it is installed and works on your system
info: [debug] Cleaning up appium session
error: Failed to start an Appium session, err was: Error: Could not initialize ideviceinstaller; make sure it is installed and works on your system
info: [debug] Error: Could not initialize ideviceinstaller; make sure it is installed and works on your system
at IOS.getIDeviceObj (/Users/eclose/Projects/appium/lib/devices/ios/ios.js:903:13)
at IOS.installToRealDevice (/Users/eclose/Projects/appium/lib/devices/ios/ios.js:850:32)
at /Users/eclose/Projects/appium/node_modules/async/lib/async.js:610:21
at /Users/eclose/Projects/appium/node_modules/async/lib/async.js:249:17
at iterate (/Users/eclose/Projects/appium/node_modules/async/lib/async.js:149:13)
at /Users/eclose/Projects/appium/node_modules/async/lib/async.js:160:25
at /Users/eclose/Projects/appium/node_modules/async/lib/async.js:251:21
at /Users/eclose/Projects/appium/node_modules/async/lib/async.js:615:34
at IOS.prelaunchSimulator (/Users/eclose/Projects/appium/lib/devices/ios/ios.js:1184:12)
at /Users/eclose/Projects/appium/node_modules/async/lib/async.js:610:21
info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: Could not initialize ideviceinstaller; make sure it is installed and works on your system)”,“origValue”:“Could not initialize ideviceinstaller; make sure it is installed and works on your system”},“sessionId”:null}

1 Like

This issue went away after:

git checkout v1.3.3
./reset.sh
brew install --HEAD ideviceinstaller // suggested in another post.
git checkout v1.3.4
./reset.sh
node . -U --full-reset

Does that make any sense that those steps would fix anything?

Yes, you didn’t have ideviceinstaller installed. See your error log:

Error: Could not initialize ideviceinstaller; make sure it is installed and works on your system

We’ve added a better error message to tell people to use homebrew to do this.

FYI, I just updated to the latest OS X GUI app and received this error. IIRC, the GUI app is supposed to have everything necessary to run tests in the .app bundle.

I guess I should be using the CLI version…

1 Like

Hi @0x1mason,

Using latest version of appium and facing issue with ideviceinstaller, though it has been installed through brew. The issue occurs when trying to run tests through Jenkins. Could you help in this regard?

Thanks,
Sujata

Even I am facing the same issue @sujata_kalluri. Were you able to solve this?

The issue might be because of the PATH that the editor you use is picking up.I feel the Editor is not picking all the paths.Please check that.
If u use java then check using System.getenv(“PATH”);

I had a similar issue and found out that the editor din have the correct PATH

Hi @narulacool,

The issue was that system path was not taken by Jenkins and also permissions had to be provided to /tmp/appium-instruments folder to user running Jenkins on Mac this solved the issue.

Thanks,
Sujata

2 Likes

I see that the issue is with latest version of Appium 1.4.0, which is not able to initialize the ideviceinstaller under /Applications/Appium.app/Contents/Resources/node_modules/appium/build/libimobiledevice-macosx/ideviceinstaller.

I am able to launch Appium server through Java program and create the IOSdriver with Appium version 1.3.4.

Looking forward for Appium resolution on this.

[36minfoe[39m: [debug] Not setting iOS and app preferences since we’re on a real device
e[36minfoe[39m: [debug] Reset not set, not ending sim or cleaning up app state
e[36minfoe[39m: [debug] Not setting locale because we’re using a real device
e[36minfoe[39m: [debug] No iOS / app preferences to set
e[36minfoe[39m: [debug] Starting iOS device log capture via deviceconsole
e[36minfoe[39m: [debug] Not pre-launching simulator
e[36minfoe[39m: [debug] Creating iDevice object with udid 33399d5ab4d538526e42dc77db0b964904d4728a
e[36minfoe[39m: [debug] Couldn’t find ideviceinstaller, trying built-in at /Applications/Appium.app/Contents/Resources/node_modules/appium/build/libimobiledevice-macosx/ideviceinstaller
e[36minfoe[39m: [debug] Checking app install status using: /Applications/Appium.app/Contents/Resources/node_modules/appium/build/fruitstrap/fruitstrap isInstalled --id 33399d5ab4d538526e42dc77db0b964904d4728a --bundle com.example.apple-samplecode.Recipes
e[36minfoe[39m: [debug] App is installed.
e[36minfoe[39m: [debug] fullReset not requested. No need to install.
e[36minfoe[39m: [debug] Starting command proxy.
e[36minfoe[39m: [debug] Instruments socket server started at /tmp/instruments_sock
e[36minfoe[39m: [debug] Starting instruments
e[36minfoe[39m: [debug] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
e[36minfoe[39m: Launching instruments
e[36minfoe[39m: [debug] Attempting to run app on real device with UDID 33399d5ab4d538526e42dc77db0b964904d4728a
e[36minfoe[39m: [debug] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w 33399d5ab4d538526e42dc77db0b964904d4728a com.example.apple-samplecode.Recipes -e UIASCRIPT “/Users/etouch/Library/Application Support/appium/bootstrap/bootstrap-0943baae6b1d6f5b.js” -e UIARESULTSPATH /tmp/appium-instruments
e[36minfoe[39m: [debug] And extra without-delay env: {}
e[36minfoe[39m: [debug] And launch timeouts (in ms): {“global”:90000}
e[36minfoe[39m: [debug] e[33m[INST STDERR] 2015-06-19 12:16:00.132 instruments[34104:74886] WebKit Threading Violation - initial use of WebKit from a secondary thread.e[39m
e[36minfoe[39m: Instruments is ready to receive commands
e[36minfoe[39m: [debug] Instruments launched. Starting poll loop for new commands.
e[36minfoe[39m: [debug] Setting bootstrap config keys/values
e[36minfoe[39m: [debug] Pushing command to appium work queue: “target = $.target();\nau = $;\n$.isVerbose = true;\n”
e[36minfoe[39m: [debug] Socket data received (2 bytes)
e[36minfoe[39m: [debug] Socket data being routed.
e[36minfoe[39m: [debug] Sending command to instruments: target = $.target();

Hey guys, I am trying to install the ideviceinstaller through Brew and getting this message:
Error: Failed to download resource “ideviceinstaller”
Failure while executing: git clone --branch master http://git.sukimashita.com/ideviceinstaller.git /Library/Caches/Homebrew/ideviceinstaller–git
I used to be able to run Appium on a real device but for some reason it stopped to work and I’m not sure what to do anymore…
Thanks

Just in case someone lands on this thread from google , please refer to https://github.com/appium/appium/issues/4584 comment dated Feb 2 2016.

I had spent entire day to get this fixed :relaxed:

I am using mac OSX El Capitan. I have installed eclipse Neon in it. I have a full setup of running selenium scripts using appium on real ios device. For this i have “ideviceinstaller” also installed. I created a project in a workspace to launch an app on the device and it is working fine. But when i copied the same code to different project, it starts giving me the error

org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: Could not initialize ideviceinstaller; make sure it is installed and works on your system) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 33.97 seconds
Build info: version: ‘2.52.0’, revision: ‘4c2593c’, time: ‘2016-02-11 19:06:42’
System info: host: ‘MacBookBL9138C.local’, ip: ‘10.104.150.28’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.11.6’, java.version: ‘1.8.0_73’.

I tried by uninstalling the current eclipse and installing eclipse lunar, but its still failing. I tried running same code in new workspace, but still same error. Any help will be appreciated.I am using appium 1.4.16 and launching it through node.js

Please refer this one:

Hopefully it helps you.

Im getting the same error in the following

Device: Iphone 5
OS version: 9.3
Xcode: 8.0

Appium Log:
Launching Appium with command: ‘/Applications/Appium.app/Contents/Resources/node/bin/node’ lib/server/main.js --address “127.0.0.1” --pre-launch --log-no-colors --debug-log-spacing --platform-version “9.3” --platform-name “iOS” --app “io.appium.TestApp” --udid “FB1724FC-F0FB-48B3-9D0D-19BACBF47825” --no-reset --show-ios-log --backend-retries “3” --device-name “iPhone 5” --native-instruments-lib

info: [debug] Starting Appium in pre-launch mode

info: Pre-launching app

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 4de6337c-763e-4153-8955-409d28302096
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/io.appium.TestApp/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/io.appium.TestApp/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/mydesktop/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/anandjayaram/Library/Application Support/appium/bootstrap/bootstrap-6745615c424bb0c0.js

info: [debug] Creating or overwritting dynamic bootstrap: /Users/anandjayaram/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 FB1724FC-F0FB-48B3-9D0D-19BACBF47825

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

info: [debug] Cleaning up appium session

error: Could not pre-launch appium: Error: Command failed: /bin/sh -c ideviceinstaller -u FB1724FC-F0FB-48B3-9D0D-19BACBF47825 -i io.appium.TestApp

Please help me to resolve this issue Thanks in advance.

Hi Sujata ,

I am trying to pre launch the app on the iOS device , but getting the below error pls help me out

Launching Appium with command: ‘/Applications/Appium 2.app/Contents/Resources/node/bin/node’ lib/server/main.js --address “127.0.0.1” --command-timeout “7200” --pre-launch --debug-log-spacing --platform-version “8.1” --platform-name “iOS” --app “/Users/QA/Desktop/kPlexus/Touchpoint.ipa” --udid “821cc8f0d8fc346a956e0056e2e9c5200c37d395” --full-reset --show-ios-log --device-name “iPhone 5s” --native-instruments-lib --trace-dir “”

info: [debug] Starting Appium in pre-launch mode

info: Pre-launching app
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] Using local .ipa from command line: /Users/QA/Desktop/kPlexus/Touchpoint.ipa
info: [debug] Copying local zip to tmp dir

info: [debug] /Users/QA/Desktop/kPlexus/Touchpoint.ipa copied to /var/folders/bc/r8zs52w907jfmsq6c20tl47h0000gq/T/11719-3677-k4z5mb/appium-app.zip

info: [debug] Unzipping /var/folders/bc/r8zs52w907jfmsq6c20tl47h0000gq/T/11719-3677-k4z5mb/appium-app.zip

info: [debug] Testing zip archive: /var/folders/bc/r8zs52w907jfmsq6c20tl47h0000gq/T/11719-3677-k4z5mb/appium-app.zip

info: [debug] Zip archive tested clean

info: [debug] Unzip successful

info: [debug] Using locally extracted app: /var/folders/bc/r8zs52w907jfmsq6c20tl47h0000gq/T/11719-3677-k4z5mb/Payload/KPlexusLite.app

info: [debug] Creating new appium session 9446175a-acc2-46cd-a77d-868a22bfe113

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 /var/folders/bc/r8zs52w907jfmsq6c20tl47h0000gq/T/11719-3677-k4z5mb/Payload/KPlexusLite.app/en.lproj/Localizable.strings
info: Will try to parse the plist file as XML
info: [debug] Could not parse plist file (as XML) at /var/folders/bc/r8zs52w907jfmsq6c20tl47h0000gq/T/11719-3677-k4z5mb/Payload/KPlexusLite.app/en.lproj/Localizable.strings
warn: Could not parse app Localizable.strings assuming it doesn’t exist
info: [debug] Getting bundle ID from app
info: [debug] Could not parse plist file (as binary) at /var/folders/bc/r8zs52w907jfmsq6c20tl47h0000gq/T/11719-3677-k4z5mb/Payload/KPlexusLite.app/Info.plist
info: Will try to parse the plist file as XML
info: [debug] Parsed app Info.plist (as XML)
info: [debug] Creating instruments
info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/QA/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env: {“nodePath”:"/Applications/Appium 2.app/Contents/Resources/node/bin/node",“commandProxyClientPath”:"/Applications/Appium 2.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/QA/Library/Application Support/appium/bootstrap/bootstrap-dfaec2ddea713a36.js
info: [debug] Reusing dynamic bootstrap: /Users/QA/Library/Application Support/appium/bootstrap/bootstrap-dfaec2ddea713a36.js
info: [debug] Attempting iOS device log capture via libimobiledevice idevicesyslog

warn: Could not capture device log using libimobiledevice idevicesyslog. Libimobiledevice probably isn’t installed
info: [debug] Attempting iOS device log capture via deviceconsole

info: [debug] Creating iDevice object with udid 821cc8f0d8fc346a956e0056e2e9c5200c37d395

info: [debug] Couldn’t find ideviceinstaller, trying built-in at /Applications/Appium 2.app/Contents/Resources/node_modules/appium/build/libimobiledevice-macosx/ideviceinstaller

error: Could not initialize ideviceinstaller; make sure it is installed and works on your system