Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ideviceinstaller: "Could not initialize ideviceinstaller" #4584

Closed
ethanclose opened this issue Feb 23, 2015 · 61 comments

Comments

@ethanclose
Copy link

commented Feb 23, 2015

iPhone 6 and 5s, iOS 8.1.3, Appium 1.3.4 and 1.3.5, OSX 10.9.5

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

Here is the log:

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}

@ethanclose

This comment has been minimized.

Copy link
Author

commented Feb 23, 2015

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?

@ethanclose

This comment has been minimized.

Copy link
Author

commented Feb 23, 2015

Well, I confirmed that brew installing ideviceinstaller fixed this issue on two other macmini's running Yosemite. This seems odd. Any thoughts on why this worked?

Feel free to close this.

@jlipps

This comment has been minimized.

Copy link
Member

commented Feb 23, 2015

ideviceinstaller is a system requirement for working on ios real devices. we bundle one but it isn't always built for the same platform you're using.

@nrvivek23

This comment has been minimized.

Copy link

commented Mar 11, 2015

@ethanclose Which directory do we need to execute those commands from

@ethanclose

This comment has been minimized.

Copy link
Author

commented Mar 12, 2015

@nrvivek23 I'm running appium from source. Those git commands were run from inside the "appium" directory (root of the appium source tree)

@nrvivek23

This comment has been minimized.

Copy link

commented Mar 12, 2015

@ethanclose Thank you so much for the quick reply. will, try it out.

@luonglne

This comment has been minimized.

Copy link

commented Mar 13, 2015

Hi ethanclose,

I used npm to install Appium, so my Appium directory is at /usr/local/lib/node_modules/appium. On command line window:

cd "/usr/local/lib/node_modules/appium"
git checkout v1.3.3
./reset.sh
brew install --HEAD ideviceinstaller
git checkout v1.3.4
./reset.sh

but here were the response from the screen:
➜ appium git:(master) git checkout v1.3.3
error: pathspec 'v1.3.3' did not match any file(s) known to git.
gi
➜ appium git:(master) ./reset.sh
zsh: no such file or directory: ./reset.sh

➜ appium git:(master) brew install --HEAD ideviceinstaller
==> Cloning http://git.sukimashita.com/ideviceinstaller.git
Updating /Library/Caches/Homebrew/ideviceinstaller--git
==> ./autogen.sh
installed software in a non-standard prefix.

Alternatively, you may set the environment variables libimobiledevice_CFLAGS
and libimobiledevice_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
Error: Homebrew doesn't know what compiler versions ship with your version
of Xcode (6.1.1). Please brew update and if that doesn't help, file
an issue with the output of brew --config:
https://github.com/Homebrew/homebrew/issues

Note that we only track stable, released versions of Xcode.

Thanks!

READ THIS: http://git.io/brew-troubleshooting

➜ appium git:(master) git checkout v1.3.4
error: pathspec 'v1.3.4' did not match any file(s) known to git.

➜ appium git:(master) ./reset.sh
zsh: no such file or directory: ./reset.sh

  • I am not sure I am at the right directory. Or am I missing something here? Thanks!
@luonglne

This comment has been minimized.

Copy link

commented Mar 14, 2015

After I did a git clone of appium, I was able to run the listed commands. However, for this command:
brew install --HEAD ideviceinstaller, I still see the issue above. Does anyone have any idea why this is? It suggest to set the environment variables libimobiledevice_CFLAGS
and libimobiledevice_LIBS but I am not sure what to set. Or do I need to revert my XCode version?

➜ appium git:(master) brew install --HEAD ideviceinstaller
==> Cloning http://git.sukimashita.com/ideviceinstaller.git
Updating /Library/Caches/Homebrew/ideviceinstaller--git
==> ./autogen.sh
installed software in a non-standard prefix.

Alternatively, you may set the environment variables libimobiledevice_CFLAGS
and libimobiledevice_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
Error: Homebrew doesn't know what compiler versions ship with your version
of Xcode (6.1.1). Please brew update and if that doesn't help, file
an issue with the output of brew --config:
https://github.com/Homebrew/homebrew/issues

Note that we only track stable, released versions of Xcode.

@tarunsujit

This comment has been minimized.

Copy link
Contributor

commented Mar 14, 2015

Try unlink and link
brew unlink ideviceinstaller
brew link ideviceinstaller

@luonglne

This comment has been minimized.

Copy link

commented Mar 14, 2015

Thanks for the reply. Should I do : "brew install ideviceinstaller" first before "brew unlink ideviceinstaller" and "brew link ideviceinstaller"?

@luonglne

This comment has been minimized.

Copy link

commented Mar 14, 2015

Resolved related issue - I had installed appium-1.3.4.dmg locally on my machine, and it worked fine since I installed the test app manually on the physical iphone. However, just installed appium-1.3.6.dmg and run it locally on my machine, I got the "Original error: Could not initialize ideviceinstaller". So I just
ran the command "brew install ideviceinstaller", but without having to do as suggested above, it worked perfectly.

tarunsujit - I will try to use your approach on my server since I am using npm to install appium. If not successful, I will use the dmg file to install instead. I'll post my update next week. Thanks!

@golamnagar

This comment has been minimized.

Copy link

commented Mar 20, 2015

Hi All,

I had the same issue.

brew install --HEAD ideviceinstaller

node . -U --full-reset

after running these 2 lines command, it worked.

Thanks

Golam Hassan

@truebit

This comment has been minimized.

Copy link
Contributor

commented May 21, 2015

Appium 1.3.7 still got this bug. brew install ideviceinstaller fixed it.

@menyp

This comment has been minimized.

Copy link

commented Jun 10, 2015

Hi Guys,
we are facing the ideviceinstaller issue mention above.
Can someone that overcome this issue be kind & post an easy short guide end to end explaining how to install it?
This will really help us in our automation which is stuck!
Thanks

@sebv

This comment has been minimized.

Copy link
Member

commented Jun 10, 2015

You should go to appium-discuss for support there are lots more people.

@Jitu1888

This comment has been minimized.

Copy link

commented Sep 1, 2015

Hi All,

Please help me out from this issue.
Config:
HOMEBREW_VERSION: 0.9.5
OS X: 10.10.3-x86_64
Xcode: 6.3 => /Applications/Xcode_6.3.app/Contents/Developer
CLT: 6.3.2.0.1.1431401888
iPad:8.1.3
Appium:1.4.0

Facing issue:
�[31merror�[39m: Could not initialize ideviceinstaller; make sure it is installed and works on your system
�[31merror�[39m: Failed to start an Appium session, err was: Error: Could not initialize ideviceinstaller; make sure it is installed and works on your system

Note:

  1. Ideviceinstaller is already install in my mac.
  2. Its only working with 1.3.4 appium version.
  3. In xcode where i can check the UDID
    4.ideviceinstaller -u 156aa7c8bd6b8334921d2bab442ce0762a7c95 -i io.appium.TestApp
    io.appium.TestApp= Its the application name or what

I will really apppricate if you would help me urgently.....

Thanks
Jitu

@luonglne

This comment has been minimized.

Copy link

commented Sep 1, 2015

Hi Jitu,

I had the same issue on one of my machines. And this is how I fix it.

Make sure uninstall ideviceinstaller first, then uninstall Homebrew completely.

After you are done with uninstallation, then re-install them again. It should work fine after. I couldn't remember whether I did use "brew install --HEAD ideviceinstaller" on the re-installation, but I doubt that it would hurt to do that instead of "brew install ideviceinstaller".

@bhumireddy100

This comment has been minimized.

Copy link

commented Sep 2, 2015

Hi Jitu,

Could you please confirm to me that you faced this issue when starting appium server through programmatically using java code?

Actually I am facing this issue when starting appium server through programmatically using java code. It is working fine when I am starting appium server manually.

I have followed steps which you posted above, but still I am getting this error.

Please help me, thanks in advance.

@luonglne

This comment has been minimized.

Copy link

commented Sep 2, 2015

Hi bhumireddy100,

Can you post a snippet of your error message if they are any different posted by Jitu?

I am not sure what your environment looks like, but I would recommend to uninstall everything, including Appium, make sure you clean them up well because sometimes, there might be a few files here and there lingering around. Sorry I cannot help you any more than this.

@bhumireddy100

This comment has been minimized.

Copy link

commented Sep 3, 2015

Hi luonglne,

Thank you so much for the quick reply.

Please find the below Environment, Code and Error Details.

Environment:
Xcode version : 6.4
iPhone 5c : 8.4.1
Appium Version : 1.4.8

Code :

Runtime.getRuntime().exec("/bin/bash export ANDROID_HOME=/Users/caaminf/Library/Android/sdk/");
CommandLine command = new CommandLine("/Applications/Appium.app/Contents/Resources/node/bin/node"); command.addArgument("/Applications/Appium.app/Contents/Resources/node_modules/appium/bin/appium.js", false);
command.addArgument("--address", false);
command.addArgument("0.0.0.0");
command.addArgument("--port", false);
command.addArgument(port);
command.addArgument("--no-reset", false);
DefaultExecuteResultHandler resultHandler = new DefaultExecuteResultHandler();
DefaultExecutor executor = new DefaultExecutor();
executor.setExitValue(1);
try
{
executor.execute(command, resultHandler);
}
catch (ExecuteException e)
{
e.printStackTrace();
}
catch (IOException e)
{
e.printStackTrace();
}
try
{
Thread.sleep(9000);
}
catch (InterruptedException e)
{
e.printStackTrace();
}
System.out.println("Appium server started");
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(CapabilityType.BROWSER_NAME, "");
capabilities.setCapability(CapabilityType.VERSION, "8.4.1");
capabilities.setCapability(CapabilityType.PLATFORM, "Mac");
capabilities.setCapability("deviceName", "iPhone 5c");
capabilities.setCapability("device", "iPhone");
capabilities.setCapability("platformName", "iOS");
capabilities.setCapability("udid", "My device udid");
capabilities.setCapability("app", "My App.app");
capabilities.setCapability("newCommandTimeout", "180000");
driver = new IOSDriver(new URL("http://0.0.0.0:"+port+"/wd/hub"), capabilities);
driver.manage().timeouts().implicitlyWait(80, TimeUnit.SECONDS);

Error:

[36minfo[39m: Welcome to Appium v1.4.8 (REV c81fa58b324491230df9342a)
[36minfo[39m: Appium REST http interface listener started on 0.0.0.0:50879
[36minfo[39m: [debug] Non-default server args: {"port":50879,"noReset":true}
[36minfo[39m: Console LogLevel: debug
Appium server started
[36minfo[39m: [37m-->[39m [37mPOST[39m [37m/wd/hub/session[39m [90m{"desiredCapabilities":{"newCommandTimeout":"90","app”:”/App.app","deviceName":"iPhone 5c","platformName":"iOS","udid":"1a6c5a1a"}}[39m
[36minfo[39m: Client User-Agent string: Apache-HttpClient/4.3.1 (java 1.5)
[36minfo[39m: [debug] Using local app from desired caps: /App.app
[36minfo[39m: [debug] Creating new appium session 0faa9e2c2
[36minfo[39m: [debug] Removing any remaining instruments sockets
[36minfo[39m: [debug] Cleaned up instruments socket /tmp/instruments_sock
[36minfo[39m: [debug] Auto-detecting iOS udid...
[36minfo[39m: [debug] Not auto-detecting udid, running on sim
[36minfo[39m: [debug] Could not parse plist file (as binary) at /App.app/en.lproj/Localizable.strings
[36minfo[39m: Will try to parse the plist file as XML
[36minfo[39m: [debug] Could not parse plist file (as XML) at /App.app/en.lproj/Localizable.strings
[33mwarn[39m: Could not parse app Localizable.strings assuming it doesn't exist
[36minfo[39m: [debug] Getting bundle ID from app
[36minfo[39m: [debug] Parsed app Info.plist (as binary)
[36minfo[39m: [debug] Creating instruments
[36minfo[39m: [debug] Preparing uiauto bootstrap
[36minfo[39m: [debug] Dynamic bootstrap dir: /Users/caaminf/Library/Application Support/appium/bootstrap
[36minfo[39m: [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"}
...6minfo[39m: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
[36minfo[39m: [debug] Dynamic bootstrap path: /Users/caaminf/Library/Application Support/appium/bootstrap/bootstrap-674424bb0c0.js
[36minfo[39m: [debug] Reusing dynamic bootstrap: /Users/caaminf/Library/Application Support/appium/bootstrap/bootstrap-6744bb0c0.js
[36minfo[39m: [debug] Attempting iOS device log capture via libimobiledevice idevicesyslog
[33mwarn[39m: Could not capture device log using libimobiledevice idevicesyslog. Libimobiledevice probably isn't installed
[36minfo[39m: [debug] Attempting iOS device log capture via deviceconsole
[36minfo[39m: [debug] Creating iDevice object with udid dsfdasfasdfasfasa1a
[36minfo[39m: [debug] Couldn't find ideviceinstaller, trying built-in at /Applications/Appium.app/Contents/Resources/node_modules/appium/build/libimobiledevice-macosx/ideviceinstaller
[36minfo[39m: [debug] Cleaning up appium session
[31merror[39m: Could not initialize ideviceinstaller; make sure it is installed and works on your system
[31merror[39m: Failed to start an Appium session, err was: Error: Could not initialize ideviceinstaller; make sure it is installed and works on your system
[36minfo[39m: [debug] Error: Could not initialize ideviceinstaller; make sure it is installed and works on your system
at [object Object].IOS.getIDeviceObj (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios.js:909:13)
at [object Object].IOS.installToRealDevice (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios.js:856:32)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:607:21
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:246:17
at iterate (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:146:13)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:157:25
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:248:21
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:612:34
at [object Object]. (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios-crash-log.js:52:5)
at [object Object]. (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios-crash-log.js:27:5)
at f (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/node_modules/once/once.js:17:25)
at Glob. (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/glob.js:131:7)
at Glob.emit (events.js:107:17)
at Glob.finish (/Applications/Appium.app/Contents/Resources/nodemodules/appium/node_modules/glob/glob.js:168:8)
at done (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/glob.js:157:12)
at Glob.processReaddir2 (/Applications/Appium.app/Contents/Resources/nodemodules/appium/node_modules/glob/glob.js:351:12)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/glob.js:288:17
at RES (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/node_modules/inflight/inflight.js:23:14)
at f (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/node_modules/once/once.js:17:25)
at Glob.readdirEntries (/Applications/Appium.app/Contents/Resources/nodemodules/appium/node_modules/glob/glob.js:480:10)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/glob.js:457:12
at FSReqWrap.oncomplete (fs.js:95:15)
[36minfo[39m: [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}
[36minfo[39m: [37m<-- POST /wd/hub/session [39m[31m500[39m[90m 1386.268 ms - 300[39m [90m[39m
Report :Error ID 46: Could not open Browserorg.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: 1.59 seconds
Build info: version: '2.45.0', revision: '5017cb8', time: '2015-02-27 00:00:10'
System info: host: 'sunils-MBP-2', ip: '195.106.980', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.10.2', java.version: '1.7.0_79'
Driver info: io.appium.java_client.ios.IOSDriver

@bhumireddy100

This comment has been minimized.

Copy link

commented Sep 4, 2015

Hi luonglne,

This is very priority work for me, Please help me on the below things.

  1. In which directory do we need to run below commands from terminal

1.1 brew install --HEAD ideviceinstaller
1.2 node . -U --full-reset
1.3 ideviceinstaller -u 156aa7c8bd6b8334921d2bab442ce0762a7c95 -i io.appium.TestApp

I am getting error no such file or directory when I hit on 1.2 and 1.3 commands on terminal. Could you please elaborate same command and give one example.

what is io.appium.TestApp ?
2. Could you please confirm to me that you faced this issue when starting appium server through programmatically using java code?

Actually I am facing this issue when starting appium server through programmatically using java code. It is working fine when I am starting appium server manually from Appium GUI .

Thanks in advance.

@luonglne

This comment has been minimized.

Copy link

commented Sep 4, 2015

Hi bhumireddy100,

You can run the commands in any directory. I usually run it in /Users/LoginName/ , "cd ~ " would take you back.

io.appium.TestApp must be a default test application that Appium put it together. You should try to run against your iPhone app instead.

Yes, I did faced the same issue starting Appium server through programmatically using java code, where it couldn't find ideviceinstaller.

My recommendation is to do research on ideviceinstaller and homebrew, get familiar with both of them. My issue was when I ran "brew install --HEAD ideviceinstaller", I got the error below:

Error: Homebrew doesn't know what compiler versions ship with your version

So, I ended up cleaning my system, uninstall everything including Appium and start from scratch since I don't know the in-and-out of these software. That's how I got my system to work.

@bhumireddy100

This comment has been minimized.

Copy link

commented Sep 7, 2015

Hi luonglne,

Thank you so much for the reply. will, try it out.

@navui

This comment has been minimized.

Copy link

commented Feb 9, 2016

Thanks a ton CsabaF

Really appreciate the help, was stuck with this problem for long.

Setting Path in RUN Configuration has solved the Issue.

@dhiren-mudgil-olx

This comment has been minimized.

Copy link

commented Mar 22, 2016

For Mac OS X i solved the problem like:

  1. Installed http://macappstore.org/ideviceinstaller/ from here

For running on Eclipse ide
--Added PATH variable in eclipse run configuration

For running on CLI
-- It run normally

This is the right solution and it worked for me.

@mashenka123

This comment has been minimized.

Copy link

commented May 4, 2016

@dhirenmudgil
After I added PATH variable in eclipse, another error pop up:Failed to start an Appium session, err was: Error: Command failed: /bin/sh -c ideviceinstaller -u 814d53f77e5c5ecf2eca376ae3696dffa692cec8 -i "/Users/rachel/Documents/workspace/AppiumAndroidDemo/apps/IBM MeetingsD.app"
dyld: Library not loaded: @executable_path/../lib/libimobiledevice.3.dylib
Referenced from: /Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/libimobiledevice-macosx/ideviceinstaller
Reason: image not found

could you please share the PATH value you added in eclipse?
My PATH value: I installed Appium 1.4.13 using .dmg
/Applications/Appium.app/Contents/Resources/node/bin/:/Applications/Appium.app/Contents/Resources/node_modules/appium/bin/:/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/libimobiledevice-macosx

@Jitu1888

This comment has been minimized.

Copy link

commented May 4, 2016

First install the ideviceinstaller using the below command on terminal
brew install --HEAD ideviceinstaller
Then pass the path variable.

Regards
Jitu Kumar Patel

On Wed, May 4, 2016 at 10:15 AM, mashenka123 notifications@github.com
wrote:

@dhirenmudgil https://github.com/dhirenmudgil
After I added PATH variable in eclipse, another error pop up:Failed to
start an Appium session, err was: Error: Command failed: /bin/sh -c
ideviceinstaller -u 814d53f77e5c5ecf2eca376ae3696dffa692cec8 -i
"/Users/rachel/Documents/workspace/AppiumAndroidDemo/apps/IBM MeetingsD.app"
dyld: Library not loaded: @executable_path/../lib/libimobiledevice.3.dylib
Referenced from:
/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/libimobiledevice-macosx/ideviceinstaller
Reason: image not found

could you please share the PATH value you added in eclipse?
My PATH value: I installed Appium 1.4.13 using .dmg

/Applications/Appium.app/Contents/Resources/node/bin/:/Applications/Appium.app/Contents/Resources/node_modules/appium/bin/:/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/libimobiledevice-macosx


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#4584 (comment)

@bhumireddy100

This comment has been minimized.

Copy link

commented May 5, 2016

Hello luong huynh,

I have upgrade to Appium 1.5 version, now I am unable to execute IOS web
Test scripts on Safari browser, this is blocker for me. Please tell me
steps for executing test scripts on safari browser.
Is appium 1.5.2 does support iPhone 6 - ver 9.3.1.

Thanks in advance.

Thanks & Regards,

Venkat

On Thu, Sep 3, 2015 at 2:19 AM, luong huynh notifications@github.com
wrote:

Hi bhumireddy100,

Can you post a snippet of your error message if they are any different
posted by Jitu?

I am not sure what your environment looks like, but I would recommend to
uninstall everything, including Appium, make sure you clean them up well
because sometimes, there might be a few files here and there lingering
around. Sorry I cannot help you any more than this.


Reply to this email directly or view it on GitHub
#4584 (comment).

@yxiao168

This comment has been minimized.

Copy link

commented Aug 4, 2016

Dear Sir/Madam,

I am using Appium 1.5.3 (Ara) and having problem to ideviceinstaller's "Invalid UDID specified" error. And the problem can't be fixed with the steps mentioned above.

  1. Environment
    iOS: 10.11.3
    xcode: 7.3.1
    Appium: 1.5.3 (Ara)

  2. Scenarios:
    (1). Appium log:
    2016-08-04 19:16:04:548 - error: [MJSONWP] Encountered internal error running command: Error: Command failed: ideviceinstaller -u 0C129B31-8ACD-4655-9A60-25166E8A16B1 -l

    at ChildProcess.exithandler (child_process.js:202:12)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:852:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)

(2). Command line log:
WKRNJMD0000098:Library yxiao$ ideviceinstaller -u 5830CE0D-7209-4398-BC02-197827DAF473 -l
ERROR: Invalid UDID specified
Usage: ideviceinstaller OPTIONS
Manage apps on iOS devices.

-u, --udid UDID Target specific device by its 40-digit device UDID.
-l, --list-apps List apps, possible options:
-o list_user - list user apps only (this is the default)
-o list_system - list system apps only
-o list_all - list all types of apps
-o xml - print full output as xml plist
-i, --install ARCHIVE Install app from package file specified by ARCHIVE.
ARCHIVE can also be a .ipcc file for carrier bundles.
-U, --uninstall APPID Uninstall app specified by APPID.
-g, --upgrade ARCHIVE Upgrade app from package file specified by ARCHIVE.
-L, --list-archives List archived applications, possible options:
-o xml - print full output as xml plist
-a, --archive APPID Archive app specified by APPID, possible options:
-o uninstall - uninstall the package after making an archive
-o app_only - archive application data only
-o docs_only - archive documents (user data) only
-o copy=PATH - copy the app archive to directory PATH when done
-o remove - only valid when copy=PATH is used: remove after copy
-r, --restore APPID Restore archived app specified by APPID
-R, --remove-archive APPID Remove app archive specified by APPID
-o, --options Pass additional options to the specified command.
-h, --help prints usage information
-d, --debug enable communication debugging

Homepage: http://libimobiledevice.org

(3). Tried to re-install ideviceinstaller but unsuccessful.

WKRNJMD0000098:apps yxiao$ brew install ideviceinstaller
Warning: ideviceinstaller-1.1.0_2 already installed
WKRNJMD0000098:apps yxiao$ node . -U --full-reset
module.js:442
throw err;
^

Error: Cannot find module '/Users/yxiao/Documents/LEARNING/APPIUM/appium-mobile-automation/apps'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.runMain (module.js:575:10)
at run (bootstrap_node.js:352:7)
at startup (bootstrap_node.js:144:9)
at bootstrap_node.js:467:3

The syntax of command "node . -U --full-reset" sounds strange to me because it is said that I could run this command in ANY directory.

Thanks in advance for any help!

@CsabaF

This comment has been minimized.

Copy link

commented Aug 4, 2016

Hello @yxiao168 ,

First off try the command line manually not in appium :

ideviceinstaller -u UDIDHERE -i /Users/...../application.ipa

see if this works.

If not, you can also try to :

brew uninstall ideviceinstaller

brew install --HEAD ideviceinstaller

node . -U --full-reset

Also i would suggest you recheck the UDID to see if it is really correct afaik there are no "-" in UDIDs.
If by any chance you get an error with "Could not initialize ideviceinstaller" , then :`

Hard reset device Lock button plus home button for a few seconds

connect to xcode, and enter the DEVICES option.

Select your device and clear all logs. (small trash icon in the bottom).

Let me know if these worked and we will get back on this.

Cheers

@imurchie

This comment has been minimized.

Copy link
Member

commented Aug 5, 2016

You can also set the udid capability to "auto" and the system will find it for you.

@yxiao168

This comment has been minimized.

Copy link

commented Aug 5, 2016

Hello @CsabaF,

Thanks for replying.

  1. I repeated all steps in your post and the error is still "ERROR: Invalid UDID specified".
  2. All evidences indicate that UDID is wrong. I know almost nothing about Xcode and iPhone development.
    The UDID is copied & pasted from Device window of Xcode. See the screenshot.
    screen shot 2016-08-05 at 8 42 35 am

The UDID in my last phone was iPhone 5, that is the reason the UDID is different from this post.
Any idea? Could be a stupid mistake. if so, sorry for such naive and silly question.

@imurchie

This comment has been minimized.

Copy link
Member

commented Aug 5, 2016

That is a simulator. Are you trying to use that simulator? If so, do not specify a udid at all. That is just for real devices.

Use iPhone 6 as your deviceName, and 9.3 as your platformVersion.

@yxiao168

This comment has been minimized.

Copy link

commented Aug 5, 2016

Thank you so much! I removed the UDID then the app runs in simulator!

When using Appium to interact with a real phone, I got an error:
2016-08-05 15:29:50:402 - info: [iOSLog] [IOS_SYSLOG_ROW] Aug 5 11:29:50 CorpiPhone6 securityd[100] : secTaskDiagnoseEntitlements MISSING keychain entitlements: no stored taskRef found

I knew I messed up somewhere with KeyChain, but I don't care about that at this moment, just let you know.

Thanks and have a nice weekend!

@TusharRastogi

This comment has been minimized.

Copy link

commented Jan 16, 2017

I'm having the same issue while trying to launch the appium server programatically. Otherwise it is running fine. I have tried using both Appium GUI locations and appium usr folder locations, is there somthing I'm missing, below is the script for starting server:

//Appium usr folder location
/*private static String node = "/usr/local/bin/node";
private static String appiumJS = "/usr/local/lib/node_modules/appium/build/lib/main.js";*/
	
private static String node = "/Applications/Appium.app/Contents/Resources/node/bin/node";
private static String appiumJS = "/Applications/Appium.app/Contents/Resources/node_modules/appium/build/lib/main.js";

	public AppiumServiceBuilder createService(String ip, String port) {
		System.out.println(ip);
		System.out.println(port);
		service = new AppiumServiceBuilder().usingDriverExecutable(new File(node)).withAppiumJS(new File(appiumJS))
				.withIPAddress(ip.split("//")[1]).usingPort(Integer.parseInt(port));
		return service;
	}
@Jitu1888

This comment has been minimized.

Copy link

commented Jan 16, 2017

Which appium version you are using????

@TusharRastogi

This comment has been minimized.

Copy link

commented Jan 17, 2017

@Jitu1888
v1.5.3

@Jitu1888

This comment has been minimized.

Copy link

commented Jan 17, 2017

Sometimes appium takes time to launch the appium server. You need to wait for some time.

Can please share the exception which you are getting while launching the appium serever ???. Then only i can give the solution

@TusharRastogi

This comment has been minimized.

Copy link

commented Jan 17, 2017

This is what I get in my console:

[Appium] Welcome to Appium v1.5.3
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> GET /wd/hub/status {}
[MJSONWP] Calling AppiumDriver.getStatus() with args: []
[MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.5.3"...
[HTTP] <-- GET /wd/hub/status 200 72 ms - 83 
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"app":"/Users/magicsw/Desktop/CuriousWorld1.12/CuriousWorld-2.ipa","sendKeyStrategy":"setValue","platformVersion":"9.3.5","platformName":"iOS","udid":"c6c7665557414e944c8fcb38b8ec3383f8462b8f","deviceName":"iPad"}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{"app":"/Users/magicsw/Des...
[Appium] Creating new IosDriver session
[Appium] Capabilities:
[Appium]   app: '/Users/magicsw/Desktop/CuriousWorld1.12/CuriousWorld-2.ipa'
[Appium]   sendKeyStrategy: 'setValue'
[Appium]   platformVersion: '9.3.5'
[Appium]   platformName: 'iOS'
[Appium]   udid: 'c6c7665557414e944c8fcb38b8ec3383f8462b8f'
[Appium]   deviceName: 'iPad'
[BaseDriver] Session created with session id: b3bf132e-78f9-4427-a41c-16581b0184d5
[debug] [iOS] Not auto-detecting udid.
[BaseDriver] Using local app '/Users/magicsw/Desktop/CuriousWorld1.12/CuriousWorld-2.ipa'
[debug] [BaseDriver] Copying local zip to tmp dir
[debug] [BaseDriver] Unzipping /var/folders/nj/kcb66w_x1_5ggn983sl3r5rw0000gp/T/2017017-5292-1jd3ih2/appium-app.zip
[debug] [BaseDriver] Testing zip archive: /var/folders/nj/kcb66w_x1_5ggn983sl3r5rw0000gp/T/2017017-5292-1jd3ih2/appium-app.zip
[debug] [BaseDriver] Got a relaxed match for app in zip, be careful for app match errors
[BaseDriver] Unzipped local app to '/var/folders/nj/kcb66w_x1_5ggn983sl3r5rw0000gp/T/2017017-5292-1jd3ih2/Payload/CuriousWorld.app'
[debug] [iOS] Removing any remaining instruments sockets
[debug] [iOS] Cleaned up instruments socket /var/folders/nj/kcb66w_x1_5ggn983sl3r5rw0000gp/T/instruments_sock
[debug] [iOS] No language specified. Using default strings
[debug] [iOS] Parsed app 'Localizable.strings'
[debug] [ios-app-utils] Getting bundle ID from app
[iOS] Extracted bundleID: com.hmhco.curiousworldv2 from app: /var/folders/nj/kcb66w_x1_5ggn983sl3r5rw0000gp/T/2017017-5292-1jd3ih2/Payload/CuriousWorld.app
[debug] [iOS] Creating instruments
[debug] [UIAuto] Preparing bootstrap code
[debug] [UIAuto] Dynamic bootstrap dir: /Users/magicsw/Library/Application Support/appium/bootstrap
[debug] [UIAuto] Dynamic env: {"nodePath":"/Applications/Appium.app/Contents/Resources/node/bin/node","commandProxyClientPath":"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js","instrumentsSock":"/var/folders/nj/kcb66w_x1_5ggn983sl3r5rw0000gp/T/instruments_sock","interKeyDelay":null,"justLoopInfinitely":false,"autoAcceptAlerts":false,"autoDismissAlerts":false,"sendKeyStrategy":"setValue"}
[debug] [UIAuto] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
...
[debug] [UIAuto] Dynamic bootstrap path: /Users/magicsw/Library/Application Support/appium/bootstrap/bootstrap-8029ba9489e2e8e0.js
[debug] [UIAuto] Reusing dynamic bootstrap: /Users/magicsw/Library/Application Support/appium/bootstrap/bootstrap-8029ba9489e2e8e0.js
[debug] [iOS] Running ios real device reset flow
[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[iOSLog] Could not capture device log using libimobiledevice idevicesyslog. Libimobiledevice is probably not installed
[debug] [iOSLog] Attempting iOS device log capture via deviceconsole
[iOS] Could not capture logs from device. Continuing without capturing logs.
[debug] [iOS] Creating iDevice object with udid c6c7665557414e944c8fcb38b8ec3383f8462b8f
[debug] [iOS] Couldn't find ideviceinstaller, trying built-in at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/build/libimobiledevice-macosx/ideviceinstaller
[iOS] Could not initialize ideviceinstaller; make sure it is installed and works on your system
[MJSONWP] Encountered internal error running command: Error: Could not initialize ideviceinstaller; make sure it is installed and works on your system
    at IosDriver.getIDeviceObj (lib/driver.js:380:15)
    at IosDriver.get (lib/driver.js:950:49)
    at IosDriver.installToRealDevice$ (lib/driver.js:335:21)
    at tryCatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at invoke (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
    at enqueueResult (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:185:17)
    at new Promise (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:197:7)
    at AsyncIterator.enqueue (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:184:12)
    at AsyncIterator.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at Object.runtime.async (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:209:12)
    at IosDriver.installToRealDevice (lib/driver.js:351:16)
    at IosDriver.startRealDevice$ (lib/driver.js:309:16)
    at tryCatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
    at run (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:104:47)
    at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:115:28
    at flush (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/$.microtask.js:19:5)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
[HTTP] <-- POST /wd/hub/session 500 12193 ms - 226

The place where it is looking for ideviceinstaller does not have it.

@Jitu1888

This comment has been minimized.

Copy link

commented Jan 17, 2017

@TusharRastogi

This comment has been minimized.

Copy link

commented Jan 17, 2017

YES...

appi-server1:~ magicsw$ which ideviceinstaller
/usr/local/bin/ideviceinstaller
appi-server1:~ magicsw$ echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

What do you think?

@Jitu1888

This comment has been minimized.

Copy link

commented Jan 17, 2017

@Jitu1888

This comment has been minimized.

Copy link

commented Jan 17, 2017

@TusharRastogi

This comment has been minimized.

Copy link

commented Jan 17, 2017

No, using AppiumServiceBuilder.

@jlipps

This comment has been minimized.

Copy link
Member

commented Jan 17, 2017

Looks like you may need to clone your environment if you're running as a Java subprocess. Not sure how that stuff works.

@TusharRastogi

This comment has been minimized.

Copy link

commented Jan 18, 2017

@jlipps, could you redirect it to someone who can help in setting up/environment cloning.

@jlipps

This comment has been minimized.

Copy link
Member

commented Jan 18, 2017

StackOverflow is probably your friend, or a Java expert.

@aqell22

This comment has been minimized.

Copy link

commented Mar 20, 2017

I'm still having trouble with this particular issue.
ERROR:
**MJSONWP] Encountered internal error running command: Error: Command failed: ideviceinstaller -u 3BE0413A-B950-493B-9FFA-A48C8C995B3B -U alix.julian.isItPrime2

at ChildProcess.exithandler (child_process.js:202:12)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at maybeClose (internal/child_process.js:850:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)**

I ran the command "sudo chmod -R 777 /var/db/lockdown/
I even managed to uninstall homebrew and reinstalling then unlinking/linking the ideviceinstaller
brew unlink ideviceinstaller
brew link ideviceinstaller

Still no luck any suggestions ?

@RanjithHS

This comment has been minimized.

Copy link

commented Apr 28, 2017

Any luck on this???

@Sohan-Bakale

This comment has been minimized.

Copy link

commented Aug 4, 2017

This issue occurs while running appium through eclipse using java code but the same works when appium is launched via Terminal.

This is because java uses AppiumServiceBuilder to launch appium and it does not have any information regarding where all the dependency libraries are such as libimobiledevice, deviceconsole etc.

Go to Eclipse in menu select Run->Run Configurations

Select environment variables tab and add paths

ANDROID_HOME /users/UserName/library/Android/sdk
PATH /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

@RanjithHS

This comment has been minimized.

Copy link

commented Aug 4, 2017

@lock

This comment has been minimized.

Copy link

commented Apr 26, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Apr 26, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
You can’t perform that action at this time.