HimbeersaftLP / ios-safari-remote-debug-kit

Remotely debugging iOS Safari on Windows and Linux
GNU General Public License v3.0
196 stars 16 forks source link

http://localhost:9222 is blank with no console error #29

Open abiola-ajibola opened 3 months ago

abiola-ajibola commented 3 months ago

When I open localhost:9222 the page just displays the following;

Inspectable pages for My iPhone:

and nothing else, no console errors, and no errors in the network tab.

http://localhost:8080/Main.html?ws=localhost:9222/devtools/page/1 displays the devtool page, but nothing to inspect. In the console it has the following errors; GET http://localhost:8080/WebKitAdditions/WebInspectorUI/WebInspectorUIAdditions.css net::ERR_ABORTED 404 (File not found) GET http://localhost:8080/WebKitAdditions/WebInspectorUI/WebInspectorUIAdditions.js net::ERR_ABORTED 404 (File not found) WebSocket connection to 'ws://localhost:9222/devtools/page/1' failed: and network tab for chrome devtools also shows the missing files logged in the console were not found

If I click the target or reload buttons, I get an uncaught error that looks like the following;

image

When I go to HTTP://localhost:8080, the result is as shown below.

image

HimbeersaftLP commented 3 months ago

Those two 404s are normal. This is most likely a connection issue, see the second point in https://github.com/HimbeersaftLP/ios-safari-remote-debug-kit?tab=readme-ov-file#troubleshooting Make sure iTunes is installed, debugging is enabled on the iPhone, the PC is trusted from the iPhone and the console window shows your device as connected.

bkhtrv commented 2 months ago

I've got the same behaviour on Windows 11 + iOS 17.5.1 (iPhone)

Everything is OK and connected, but there's no pages to inspect. The console says "WebSocket connection to 'ws://localhost:9222/devtools/page/1' failed"

I've made sure iTunes is installed, debugging (Safari Web Inspector) is enabled on the iPhone, the PC is trusted from the iPhone and the console window shows my device as connected. Also, I tried disabling Windows Firewall, without result.

bkhtrv commented 2 months ago

I've just tried to do the same with my iPad (iOS 17.5.1) and it did better. It allowed me to inspect all the open pages except for one (the one I needed the most). I wonder why some pages won't show up in the list

P.S. I went back to my iPhone after that and localhost:9222 showed none of the same pages I had tried to inspect on the iPad. That's weird :)

kingnathi112 commented 1 month ago

Doesn't work with iPhone 15, I get a blank page on localhost:9222

HimbeersaftLP commented 1 month ago

@kingnathi112 Does the phone show up in the logs of ios-webkit-debug-proxy?

kingnathi112 commented 1 month ago

@HimbeersaftLP yes it does show up, localhost:9222 shows the phone name but no page information is shown

HimbeersaftLP commented 2 weeks ago

@kingnathi112 So far, I have always been able to fix that issue with a combination of closing and reopening the tab and/or Safari and/or unplugging and plugging back in the device.