$ 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.
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
Where do we need to make code changes in order to run tests on Mobile Safari on a real device?
-pranav