Hybrid app on real device: iOS-webkit-debug-proxy error -3

Hi there,

I’m trying to launch an automation on a hybrid app + iOS 11 real device.

Appium iOS real device (XCUITest) is setted up. I’m able to launch native apps with no problem.

But, at the hybrid/web side I’m not able to launch iOS-webkit-debug-proxy. I followed up the whole setup manual from http://appium.io/docs/en/writing-running-appium/web/ios-webkit-debug-proxy/ and upgraded ilibmobiledevice, but there is no luck.

With startIWDP capability set to true the error message in the appium server log is:

[debug] [iOS] Starting ios_webkit_debug_proxy at port 27753 on device 831de7bf0724fe215b69e83e95b772060a427f70
[IWDP] Could not connect to lockdownd, error code -3. Exiting.
[IWDP] Unable to attach 831de7bf0724fe215b69e83e95b772060a427f70 inspector
[iOS] Error: Timed out waiting for ios_webkit_debug_proxy to open

I tried to launch manually the command above and the result is the same:

admin$ ios_webkit_debug_proxy -c 831de7bf0724fe215b69e83e95b772060a427f70:277753 -d
ss.add_fd(3)
ss.recv fd=3 len=294
ss.recv fd=3 len=684
ss.recv fd=3 len=16
ss.recv fd=3 len=668
ss.add_server_fd(4)
Could not connect to lockdownd, error code -3. Exiting.
ss.remove_server_fd(4)
Unable to attach 831de7bf0724fe215b69e83e95b772060a427f70 inspector

It’s poorly documented what ‘error code -3’ means… In fact I didn’t found its meaning.

Looking and searching for a solution the only workaround I found is to give permissions to /var/db/lockdown or reinstalling libimobiledevice and ios-webkit-debug-proxy from brew. Both solutions doesn’t work… I’ve lost the count of many times I granted 777 (ou shet!) permissions to lockdown dir and reinstalled ios-webkit-debug-proxy

Appium server is 1.9.0 if it helps

Thank you in advance.

Good news

I’ve realized usbmuxd libraries were outdated. I upgraded the following:
brew upgrade usbmuxd --HEAD
brew upgrade libimobiledevice --HEAD
brew upgrade ios-webkit-debug-proxy --HEAD

And it worked! In fact the solution was libraries reinstall…