Solvedremotedebug ios webkit adapter Windows not able to inspect iOS 11
✔️Accepted Answer
I finally got it to work with a lot of failed attempts. Here were my steps for any future users attempting to do the same. I am running Windows 10 with iOS 11 on my device.
- Following from this StackOverflow post, I installed Node, iTunes, and enabled web inspector on my iPad (Settings > Safari > Advanced). Using Powershell as administrator, install the remote debugger:
npm install remotedebug-ios-webkit-adapter -g
I attempted to run the adapter:remotedebug_ios_webkit_adapter --port=9000
. I sawiosAdapter.getTargets
over and over, but the page atchrome://inspect/#devices
didn't show any remote targets at port 9000. (This is a recreation of the problem).
Now is the part where I try to make the edit for iOS 11.
-
Download the latest release of https://github.com/google/ios-webkit-debug-proxy/. No need to install scoop. Just get the zip release. I grabbed version 1.8: https://github.com/google/ios-webkit-debug-proxy/releases/download/v1.8/ios-webkit-debug-proxy-1.8-win64-bin.zip
-
Unzip that release. I chose to put it in the same folder as the broken library (to make the edit easier), in
%AppData%\npm\node_modules\remotedebug-ios-webkit-adapter\node_modules\vs-libimobile\ios-webkit-debug-proxy-1.8-win64-bin
-
Edit the file
%AppData%\npm\node_modules\remotedebug-ios-webkit-adapter\out\adapters\iosAdapter.js
. On line 132, it reads:
const proxy = path.resolve(__dirname, '../../node_modules/vs-libimobile/lib/ios_webkit_debug_proxy.exe');
Change this location to point to the location of theios_webkit_debug_proxy.exe
you unzipped earlier. I changed this line to say:
const proxy = path.resolve(__dirname, '../../node_modules/vs-libimobile/ios-webkit-debug-proxy-1.8-win64-bin/ios_webkit_debug_proxy.exe');
Now try to run again:
- Re-open Chrome to
chrome://inspect/#devices
and run PowerShell as an administrator. Runremotedebug_ios_webkit_adapter --port=9000
and make sure Chrome is configured to search for a network target on that port (Discover Network Targets > Configure). Open Safari on your iPad. Hopefully this works.
I also had to unplug and re-plug my iPad before this would work. It appeared Windows hadn't yet configured the drivers properly. I can confirm that I also see the repeated error message mentioned by @taneltm above. Seeing this message may be a good confirmation that things should be working.
...
iosAdapter.getTargets
error.iosAdapter.getTargets.getDeviceVersion.failed.fallback, device=[object Object]
iosAdapter.getTargets
error.iosAdapter.getTargets.getDeviceVersion.failed.fallback, device=[object Object]
iosAdapter.getTargets
error.iosAdapter.getTargets.getDeviceVersion.failed.fallback, device=[object Object]
...
Other Answers:
I was able to get it running to the point where my remote target shows up in DevTools (without having to perform @bdice's workaround), but when I click inspect nothing shows up in the inspector window. Powershell just keeps repeating the same messages he mentioned at the bottom of his post. This is on an 8 Plus running iOS 12.2.
This issue has been opened two years ago, for IOS 11. Two years later, and two IOS versions later, the issue has still not been resolved.
However, the documentation still represents the library as a solution for debugging IOS Safari from Windows. I suggest updateing the documentation to make it as clear as possible that this solution doesn’t currently work.
Installing this tool on Windows isn’t trivial (it requires 4 installations), so presenting this info before hand can save valuable time to other programmers.
@taneltm @bdice
I really appreciate the contribution of the library and the contributors. However, it has been two weeks since I wrote #79 (comment), and two years since this issue was originally opened.
Currently
- This solution doesn't work for modern IOS for 2 years.
- The documentation presents the library as a working solution for debugging IOS on Windows.
- As a result developers install 4 separate installations and to invest their time for a solution we already know doesn't work.
We must update documentation and notify users about this limitation. I'll submit a suggestion.
@auchenberg @JoeMeeks @taneltm @vaskevich @skrat @qkdreyer @paulirish @pandreyn @ninjaonsafari @kriserickson @gogoprog @elitree @cmaraglio @benzhe @arilotter @Sardtok @OliverJAsh @AamuLumi
unfortunately I have the same issue. Following the instructions above didn't solve my problem.
The issue is of course that the bundled ios-webkit- debug-proxy-win32 doesn't support it.
I installed this https://github.com/google/ios-webkit-debug-proxy then modified iosAdapter.js to use that instead of the bundled version under vs-libimobile - that way I was able to get the debugging to work!
But remotedebug_ios_webkit_adapter keeps logging an error while getting the device version:
I'm guessing it's unable to get the version of the device from
node_modules/vs-libimobile/lib/ideviceinfo.exe
, when I run that directly, it says: