Getting Cannot load libimobiledevice-sdk.dylib error when running ios-driver server with beta switch

699 views
Skip to first unread message

prana...@gmail.com

unread,
Sep 30, 2013, 7:23:14 PM9/30/13
to ios-d...@googlegroups.com
When I am trying to run ios-driver with -beta I get cannot load libimobiledevice-sdk.dylib..

$ java -jar ios-server-0.6.3-jar-with-dependencies.jar -beta
Cannot load libimobiledevice-sdk.dylib
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.uiautomation.ios.server.IOSServerManager.<init>(IOSServerManager.java:57)
at org.uiautomation.ios.server.IOSServer.init(IOSServer.java:112)
at org.uiautomation.ios.server.IOSServer.init(IOSServer.java:83)
at org.uiautomation.ios.server.IOSServer.<init>(IOSServer.java:62)
at org.uiautomation.ios.server.IOSServer.main(IOSServer.java:66)
Caused by: java.lang.NullPointerException
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1792)
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1769)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:1744)
at org.libimobiledevice.ios.driver.binding.IMobileDeviceFactory.unpack(IMobileDeviceFactory.java:73)
at org.libimobiledevice.ios.driver.binding.IMobileDeviceFactory.<clinit>(IMobileDeviceFactory.java:42)
... 5 more


Need help on fixing this issue.

abhinavn

unread,
Oct 1, 2013, 1:34:50 PM10/1/13
to ios-d...@googlegroups.com, prana...@gmail.com
Did you have the libmobiledevice-wrapper submodule? You need to have that

prana...@gmail.com

unread,
Oct 1, 2013, 7:02:06 PM10/1/13
to ios-d...@googlegroups.com, prana...@gmail.com
I thought libmobiledevice-wrapper is added in ios-server-0.6.3-jar-with-dependencies.jar. Do I need to reference libmobiledevice-wrapper anywhere explicitly? I looked for a release on libmobiledevice-wrapper on git but did not find any.

Greg Dennis

unread,
Oct 1, 2013, 7:53:08 PM10/1/13
to prana...@gmail.com, ios-d...@googlegroups.com
Was this run on Linux? I encountered that error attempted to run the server on Linux with the -beta flag, and I think I tracked it down to some Darwin assumption buried in the code.

Greg

Greg Dennis

unread,
Oct 1, 2013, 7:53:17 PM10/1/13
to prana...@gmail.com, ios-d...@googlegroups.com
Was this run on Linux? I encountered that error attempted to run the server on Linux with the -beta flag, and I think I tracked it down to some Darwin assumption buried in the code.

Greg
On Tue, Oct 1, 2013 at 7:02 PM, <prana...@gmail.com> wrote:

prana...@gmail.com

unread,
Oct 2, 2013, 10:43:44 AM10/2/13
to ios-d...@googlegroups.com
No I ran this test on Mac OS X

nicegraham

unread,
Oct 9, 2013, 2:31:36 AM10/9/13
to ios-d...@googlegroups.com, prana...@gmail.com
the libraries are currently not bundled, so the -beta flag won't work. We are working to resolve this. 

a.eup...@googlemail.com

unread,
Oct 10, 2013, 6:39:38 PM10/10/13
to ios-d...@googlegroups.com, prana...@gmail.com
Is there a workaround at the moment? Any way to test against mobile web? Just getting this setup as a PoC and stuck at this point
Thanks

a.eup...@googlemail.com

unread,
Oct 28, 2013, 5:47:06 PM10/28/13
to ios-d...@googlegroups.com, prana...@gmail.com, a.eup...@googlemail.com
Any ETA on a fix for this? We are at a juncture of choosing selenium (and this project) or a commercial tool for our testing and this working could be the clincher

Thanks

nicegraham

unread,
Oct 28, 2013, 5:50:09 PM10/28/13
to ios-d...@googlegroups.com, prana...@gmail.com, a.eup...@googlemail.com
I haven't heard but I'll try and get an update this week. 

prana...@gmail.com

unread,
Nov 13, 2013, 5:19:57 PM11/13/13
to ios-d...@googlegroups.com, prana...@gmail.com, a.eup...@googlemail.com
Hi,

Is there any update on this issue?

Thanks
Pranav

emil.s...@tenkod.com

unread,
Jan 4, 2014, 3:07:08 PM1/4/14
to ios-d...@googlegroups.com, prana...@gmail.com, a.eup...@googlemail.com
Hi guys,

Happy new year and all the best also in 2014!

I face absolutely the same issue with running tests on a real device. Apart from any long-term resolution, which I see is actively sought, couldn't you point us to some temporary workaround here?

It seems that there are actually a couple of issues:

1. 'darwin/libimobiledevice-sdk.dylib' resource cannot be found and loaded for some reason (a null input stream for the resource is returned). The reason is probably the lack of the library as part of the ios-driver.
2. IOUtils.copy throws a NPE, since the input stream for the resource is null. This one shall be easy to be fixed, but I assume that this is not the root cause of the issue, hence this is not that critical for me.

The first issue is the one doing the damage, I guess. I got it that the whole story with testing on real devices is being thoroughly redesigned and re-implemented. In this sense, I need an unofficially supported solution for the time being. Once the official mechanism is in place, I will switch to it.

Could you, please, share a little bit more on what could be done here? Isn't there any way for me to supply the missing library? If so, how to do it? I don't mind pulling the ios-driver project from the 'refactor' branch and building it in-house. In fact I have already done so. If I had to modify the source code, I would not mind doing so, as well.

Thank you in advance.

Kind regards,
Emil

sassd...@gmail.com

unread,
Jan 29, 2014, 9:05:15 PM1/29/14
to ios-d...@googlegroups.com, prana...@gmail.com, a.eup...@googlemail.com, emil.s...@tenkod.com
I just ran into this today, has any workaround been identified right now?

Greg Dennis

unread,
Jan 30, 2014, 9:57:43 AM1/30/14
to sassd...@gmail.com, ios-d...@googlegroups.com, prana...@gmail.com, a.eup...@googlemail.com, emil.s...@tenkod.com
I've been trying to work around it and it's difficult. libimobiledevice-wrapper depends on the libimobiledevice-sdk library, which is nominally open source but the source has not been released yet. Note that even *if* the source has been released, the -beta flag still still trigger a dependence on libimobiledevice-instruments, which as a commercial license. It should be possible to try mobile Safari on a real device without either library, but it will take some non-trivial refactoring of the code to make that possible. If you're looking to interact with a native app on a real device, at least the instruments library will be necessary.

sassd...@gmail.com

unread,
Jan 30, 2014, 12:46:20 PM1/30/14
to ios-d...@googlegroups.com, sassd...@gmail.com, prana...@gmail.com, a.eup...@googlemail.com, emil.s...@tenkod.com
I am trying to work with a native app.
So let's say I am willing to pay (I have no idea what the cost is).
What would I need to do?

Greg Dennis

unread,
Jan 30, 2014, 10:19:13 PM1/30/14
to sassd...@gmail.com, ios-d...@googlegroups.com, prana...@gmail.com, a.eup...@googlemail.com, emil.s...@tenkod.com
I assume you'd have to contact the libimobiledevice devs and ask how to purchase a license to libimobiledevice-instruments and additional ask if they can provide you with the libimobiledevice-sdk source or dylib. Let us know how it goes.
Message has been deleted

prana...@gmail.com

unread,
Jan 31, 2014, 10:21:17 AM1/31/14
to ios-d...@googlegroups.com, sassd...@gmail.com, prana...@gmail.com, a.eup...@googlemail.com, emil.s...@tenkod.com
Greg,

Where do we need to make code changes in order to run tests on Mobile Safari on a real device?

-pranav

Greg Dennis

unread,
Jan 31, 2014, 10:27:56 AM1/31/14
to prana...@gmail.com, ios-d...@googlegroups.com, sassd...@gmail.com, a.eup...@googlemail.com, emil.s...@tenkod.com
Ha, currently everywhere :) I'm trying to make it work and then push my changes back to the repo.
Reply all
Reply to author
Forward
0 new messages