Skip to content

Unable to connect to iPhone even when "Web Inspector = ON" in iOS 13 Beta #314

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nagpalkaran12111995 opened this issue Jun 5, 2019 · 87 comments

Comments

@nagpalkaran12111995
Copy link

Was trying to use ios-webkit-debug-proxy to connect to latest iOS 13 Beta on iPhone 8.

After running the command:

ios_webkit_debug_proxy -c 10e43da25a9174d34a07a9287c5d709f8xxxxx:27753

Output:
Unable to connect to iPhone (10e43da25a9174d34a07a9287c5d709f878xxxxx)
Please verify that Settings > Safari > Advanced > Web Inspector = ON

Even though I can confirm that the option is set to ON, still the error persists.

When running an appium session, I get an error because of the same reason

An unknown server-side error occurred while processing the command. Original error: Could not start ios_webkit_debug_proxy server: Timed out waiting for ios_webkit_debug_proxy to open (Selenium::WebDriver::Error::UnknownError)

Screenshot 2019-06-05 at 6 04 54 PM

@mickelluchko
Copy link

The way how web inspector initiates the service on device and the way how it should mange conversations (WIR messages) is changed on iOS 13 Beta ... (hint: related to the SSL flag on the service connection).
There some job should be made to adopt the current ios-webkit-debug-proxy ...

@nghiadhd
Copy link
Contributor

nghiadhd commented Jul 1, 2019

Have any update for this issue? I have got the same issue
The Safari can be launched but cannot load the URL

@mickelluchko
Copy link

Pull request [ ios 13 support changes - Perfecto contribution ] has been created.

@hiitsdan
Copy link

any update on when this will be done?

@vasogiamarelou
Copy link

hello, do we have any update?

@ctjlewis
Copy link

Can Apple just go bankrupt so we don't have to deal with this shit anymore?

@artygus artygus mentioned this issue Oct 4, 2019
@nhhphuong
Copy link

nhhphuong commented Oct 6, 2019

I got the same issue on iOS 13.1.1 with Appium 1.15.0-1. However, it works fine on iOS 11.4.1 and iOS 12.4.1 with this version of Appium.

@imurchie
Copy link
Contributor

imurchie commented Oct 6, 2019 via email

@cvnboss
Copy link

cvnboss commented Oct 8, 2019

For me, with same iPhone iOS 13.0, it only working with macOS 10.14.6 and not working with macOS 10.15.

ios_webkit_debug_proxy -c fcdffff5f3a5ab32a3f942a9fda1e650b2fxxxxx:27753 -d
ss.add_fd(3)
ss.recv fd=3 len=294
ss.recv fd=3 len=851
ss.add_server_fd(4)
ss.add_fd(6)
wi.send_packet[174]:
00 00 00 AA 62 70 6C 69 73 74 30 30 D2 01 03 02 04 5A 5F ....bplist00.....Z_
5F 73 65 6C 65 63 74 6F 72 5F 10 16 5F 72 70 63 5F 72 65 selector..rpc_re
70 6F 72 74 49 64 65 6E 74 69 66 69 65 72 3A 5A 5F 5F 61 portIdentifier:Z__a
72 67 75 6D 65 6E 74 D1 05 06 5F 10 1A 57 49 52 43 6F 6E rgument...
..WIRCon
6E 65 63 74 69 6F 6E 49 64 65 6E 74 69 66 69 65 72 4B 65 nectionIdentifierKe
79 5F 10 24 44 44 38 35 44 45 38 44 2D 43 45 34 45 2D 34 y_.$DD85DE8D-CE4E-4
46 38 44 2D 41 37 31 45 2D 38 41 44 31 39 46 46 38 45 32 F8D-A71E-8AD19FF8E2
33 34 08 0D 18 31 3C 3F 5C 00 00 00 00 00 00 01 01 00 00 34...1<?..........
00 00 00 00 00 07 00 00 00 00 00 00 00 00 00 00 00 00 00 ...................
00 00 83 ...
ss.failed fd=6
ssl send failed: Undefined error: 0
Unable to send 174 bytes to inspector
ss.remove_server_fd(4)
Unable to connect to ジャパンクオリティのiPhone (fcdffff5f3a5ab32a3f942a9fda1e650b2fxxxxx)
Please verify that Settings > Safari > Advanced > Web Inspector = ON
ss.remove_fd(6)
Unable to report to inspector fcdffff5f3a5ab32a3f942a9fda1e650b2fxxxxx

@Detrimon
Copy link

Detrimon commented Oct 9, 2019

I have similar problem with connection to iPhone with iOS 13.1.2.

But in my case there is not a problem with ssl I think, but Web Inspector is ON..

ss.add_server_fd(496)
Listing devices on :9221
ss.add_fd(140)
ss.add_server_fd(736)
ss.remove_server_fd(736)
ss.recv fd=140 len=910
ss.add_server_fd(728)
ss.add_fd(756)
wi.send_packet[174]:
00 00 00 AA 62 70 6C 69 73 74 30 30 D2 01 03 02 04 5A 5F ....bplist00.....Z_
5F 73 65 6C 65 63 74 6F 72 5F 10 16 5F 72 70 63 5F 72 65 selector..rpc_re
70 6F 72 74 49 64 65 6E 74 69 66 69 65 72 3A 5A 5F 5F 61 portIdentifier:Z__a
72 67 75 6D 65 6E 74 D1 05 06 5F 10 1A 57 49 52 43 6F 6E rgument...
..WIRCon
6E 65 63 74 69 6F 6E 49 64 65 6E 74 69 66 69 65 72 4B 65 nectionIdentifierKe
79 5F 10 24 35 34 30 32 35 61 33 39 2D 33 39 31 63 2D 34 y_.$54025a39-391c-4
36 38 38 2D 61 35 31 61 2D 33 33 65 30 36 31 38 37 34 38 688-a51a-33e0618748
37 63 08 0D 18 31 3C 3F 5C 00 00 00 00 00 00 01 01 00 00 7c...1<?..........
00 00 00 00 00 07 00 00 00 00 00 00 00 00 00 00 00 00 00 ...................
00 00 83 ...
ss.accept server=496 new_client=768
ss.add_fd(768)
ss.accept server=496 new_client=752
ss.add_fd(752)
ss.recv fd=752 len=44
ws.recv[44]:
47 45 54 20 2F 6A 73 6F 6E 20 48 54 54 50 2F 31 2E 31 0D GET /json HTTP/1.1.
0A .
48 6F 73 74 3A 20 31 32 37 2E 30 2E 30 2E 31 3A 39 32 32 Host: 127.0.0.1:922
31 0D 0A 1..
0D 0A ..
ss.remove_fd(752)
ss.recv fd=756 len=0
ss.remove_fd(756)
Unable to connect to iPhone (870269d8709439f0a9ee2bf7bb16d8db1ba105e5)
Please verify that Settings > Safari > Advanced > Web Inspector = ON
ss.remove_server_fd(728)
ss.recv fd=768 len=44
ws.recv[44]:

@artygus
Copy link
Collaborator

artygus commented Oct 9, 2019

you could try brew reinstall --HEAD ios-webkit-debug-proxy

@Detrimon
Copy link

Detrimon commented Oct 9, 2019

you could try brew reinstall --HEAD ios-webkit-debug-proxy

But what about Windows 10? As I understand this solution is for OS X?

@artygus
Copy link
Collaborator

artygus commented Oct 9, 2019

windows binaries will be available later, you could build with mingw

@patricktann
Copy link

I failed to build with mingw, but I need to debug mobile safari on Windows PC. So could you build it please?

@nhhphuong
Copy link

Thanks @imurchie, it works fine with Appium 1.15.0-1 and iOS 13.0 simulator (I don't have a real device with iOS 13.0). However, I got a problem with real device run on iOS 13.1.2. It can open safari and open web app, but it cannot execute sendKeys or click on that page.

About a native app run on real device with iOS 13.1.2, it works fine.

@acasciani
Copy link

acasciani commented Oct 14, 2019

windows binaries will be available later, you could build with mingw

Is there an ETA on windows binaries?

@wendisong
Copy link

Hi, is there any update on this? I also faced this issue.
image

The software is installed successfully.
image

@WebVooruit
Copy link

Hi, is there any update on this? I also faced this issue.
image

The software is installed successfully.
image

Exact the same issue .

@wendisong
Copy link

是不是必须使用原装数据线

我觉得不是数据线问题,我用品胜数据线,可以正常连到macmini,然后Chrome或者Safari也可以正常去debug iphone6s。但是同样的数据线,用这个工具在Windows下就不能连。

@Xquick
Copy link

Xquick commented Nov 3, 2019

I am having this issue on iOS 13.2 against macOS 10.14.6

ios_webkit_debug_proxy 1.8.5
Built with libimobiledevice v1.2.0, libplist v2.0.0

We inspector is ON, I tried restarting both devices, pluging and unpluging, reinstalling ios_webkit_debug_proxy --HEAD

Is there any working advice?

@artygus
Copy link
Collaborator

artygus commented Nov 3, 2019

@Xquick check out readme, you need to have libimobiledevice 1.2.1, which is only available from sources

@mkhrystenko
Copy link

When ios-webkit-debug-proxy binary for ios 13 will be created for windows?
I can not compile it with gcc (MinGW)...

@artygus
Copy link
Collaborator

artygus commented Nov 3, 2019

@mkhrystenko there's no ETA, you can easily do it yourself

@mkhrystenko
Copy link

@artygus where I can find instructions how to compile ios-webkit-debug-proxy with gcc?
(I don't know c or c++, I'm just web developer)

@artygus
Copy link
Collaborator

artygus commented Nov 3, 2019

unfortunately there're no guides and no plans to do them, it's nothing specific to this project, just general familiriaty win mingw, similar question were raised a couple of times in libimobiledevice issues, you could start from here

@stefannesic
Copy link

I am trying to use compile the Windows binaries myself and have submitted this issue since I am stuck : #351

@danrossi
Copy link

I had to resort to using weinre with an ngrok hack for accessing the host on ssl. Its dodgy and slow. It seems IOS 13 has completely uprooted many things. They even changed the device name breaking device detection. This is standard.

I'm still going with work arounds for IOS 13.

You can try this work around for now I gave up trying the direct remote debug.

/usr/local/bin/weinre --boundHost -all-
ngrok http 8080

@danrossi
Copy link

If you go weinre, be ready for despair. It wont log everything and is slow. I am still trying to get IOS 13 device detection working as its changed and broken everything.

@artygus
Copy link
Collaborator

artygus commented Mar 5, 2020

new release is out https://github.com/google/ios-webkit-debug-proxy/releases/tag/v1.8.6, with iOS 13 support

@artygus artygus closed this as completed Mar 5, 2020
@danrossi
Copy link

danrossi commented Mar 6, 2020

target appears but it's blank. No output. Running this binary standalone.

@artygus
Copy link
Collaborator

artygus commented Mar 6, 2020

@danrossi dev tools page is blank or utility doesn't find pages/devices?

@danrossi
Copy link

danrossi commented Mar 6, 2020

the dev tools console. refreshed multiple times and nothing. The device showed up. and it connected to it immediately in powershell

 ./ios_webkit_debug_proxy
Listing devices on :9221
Connected :9222 to 

@artygus
Copy link
Collaborator

artygus commented Mar 6, 2020

@danrossi
Copy link

danrossi commented Mar 6, 2020

I got to this location and a different console output. But it's still empty

http://localhost:9222/devtools/devtools.html?ws=localhost:9222/devtools/page/1

@danrossi
Copy link

danrossi commented Mar 6, 2020

This is the output I see.

Capture

@Pavel-DV
Copy link

Thanks. Now connected.
But dev tools is empty.

@artygus
Copy link
Collaborator

artygus commented Mar 11, 2020

@danrossi
Copy link

I was about to determine why the console is blank as I mentioned. Viewing this in the browser console shows these errors.

Capture

@danrossi
Copy link

danrossi commented Mar 14, 2020

I changed the command to this

 ./ios_webkit_debug_proxy -f chrome-devtools://devtools/bundled/inspector.html
Listing devices on :9221
Connected :9222 to ... (.....)
Taking page 9222/1 from local ...
Disconnected :9222 from ... (....)
Connected :9222 to ... (...)

load

http://localhost:9221/

navigate to it. http://localhost:9222/

copy and paste this url and navigate to it

devtools://devtools/bundled/inspector.html?ws=localhost:9222/devtools/page/4

It's a different screen, its not a html console its a native chrome console, and blank. Refreshing shows no output.

@Pavel-DV
Copy link

Pavel-DV commented Mar 15, 2020

@Pavel-DV check out readme https://github.com/google/ios-webkit-debug-proxy#using-with-devtools

I checked this readme already, and checked it again and many times.
I tried to connect Chrome Devtools.
I started Command Prompt as Administrator in Windows 10 for installing RemoteDebug/remotedebug-ios-webkit-adapter.
Then I run this:

scoop bucket add extras
scoop install ios-webkit-debug-proxy
npm install -g vs-libimobile

installed this version: ios-webkit-debug-proxy: 1.8.6
[email protected]

Next this:
npm install remotedebug-ios-webkit-adapter -g

installed: [email protected]

Then I run this:
remotedebug_ios_webkit_adapter --port=9000

Result:
remotedebug-ios-webkit-adapter is listening on port 9000

Then I connected the phone, and I see this error in console multiple times:

iosAdapter.getTargets
error.iosAdapter.getTargets.getDeviceVersion.failed.fallback, device=[object Object]

I go to URL in google chrome: chrome://inspect/#devices
And configure port forwarding: localhost:9000

I see titles of web sites, opened in Safari, And click inspect on one of them.

Opened new blank window of devtools, and i see in console this:

New websocket connection to /ios_80ca243dff81665cd669f824dc88e5fd7838a4d4/ws://127.0.0.1:9101/devtools/page/1
Existing target found for id ws://127.0.0.1:9101/devtools/page/1
Socket is closed
Connection established to ws://127.0.0.1:9101/devtools/page/1

What I am doing wrong?

@artygus
Copy link
Collaborator

artygus commented Mar 15, 2020

@Pavel-DV I think you should post your issue at the relevant repo

UPD: blank dev tools might be fixed in RemoteDebug/remotedebug-ios-webkit-adapter#186
UPD2: error error.iosAdapter.getTargets.getDeviceVersion.failed.fallback suggests device version doesn't get detected properly which might lead to incorrect adapter applied and blank dev tools, make sure you have ideviceinfo where remote debug adapter expects it https://github.com/RemoteDebug/remotedebug-ios-webkit-adapter/blob/6c65cda49a8343bb7e8c541d804e00b19da9e50e/src/adapters/iosAdapter.ts#L168-L180

@Pavel-DV
Copy link

@Pavel-DV I think you should post your issue at the relevant repo

UPD: blank dev tools might be fixed in RemoteDebug/remotedebug-ios-webkit-adapter#186
UPD2: error error.iosAdapter.getTargets.getDeviceVersion.failed.fallback suggests device version doesn't get detected properly which might lead to incorrect adapter applied and blank dev tools, make sure you have ideviceinfo where remote debug adapter expects it https://github.com/RemoteDebug/remotedebug-ios-webkit-adapter/blob/6c65cda49a8343bb7e8c541d804e00b19da9e50e/src/adapters/iosAdapter.ts#L168-L180

If all this bugs are inside remotedebug-ios-webkit-adapter, I tried to use ios-webkit-debug-proxy without it.
I used the readme, and did this:

>ios_webkit_debug_proxy
Listing devices on :9221
Connected :9222 to iPhone (80ca243dff81665cd669f824dc88e5fd7838a4d4)

I navigated to http://localhost:9222/
I clicked on the link, and redirected to http://localhost:9222/devtools/devtools.html?ws=localhost:9222/devtools/page/1

It is opened DevTools-like interface, but without html elements of web page in the iPhone.
In browser console for this interface I see error messages. Check the screenshot, please:

ScreenShot

@artygus
Copy link
Collaborator

artygus commented Mar 15, 2020

@Pavel-DV iwdp is a tool that allows you to send commands to webinspectord via websocket interface, it won't work with chrome devtools frontend without compatibility adapter since chrome and safari devtools protocols diverted long ago

quote from readme

The reason is that recent versions of Chrome and Safari there're major discrepancies between Chrome Remote Debugging Protocol and Apple's Remote Web Inspector service, which means that newer versions of Chrome DevTools aren't compatible with Safari.

@Pavel-DV
Copy link

Pavel-DV commented Mar 15, 2020

@Pavel-DV iwdp is a tool that allows you to send commands to webinspectord via websocket interface, it won't work with chrome devtools frontend without compatibility adapter since chrome and safari devtools protocols diverted long ago

I thought that since it’s written in readme, this way should work. I thought that the interface that opens through that link is another devtool, specially converted for this protocol. I think the readme is confusing for many people who have done the same thing as me.

make sure you have ideviceinfo where remote debug adapter expects it

I tried this:

>%USERPROFILE%\AppData\Roaming\npm\node_modules\vs-libimobile\lib\ideviceinfo.exe
socket_receive_timeout: fd=720 recv returned 0
ERROR: Could not connect to lockdownd, error code -3

So, ideviceinfo exists. I don't know if it is works correctly.

@artygus
Copy link
Collaborator

artygus commented Mar 15, 2020

@Pavel-DV obviously it doesn't work, there's clearly an error output. it seems https://www.npmjs.com/package/vs-libimobile is an ancient package, remotedebug-ios-webkit-adapter needs another way to read device version

I thought that since it’s written in readme, this way should work. I thought that the interface that opens through that link is another devtool, specially converted for this protocol. I think the readme is confusing for many people who have done the same thing as me.

you're more than welcome to contribute a proper wording

@artygus
Copy link
Collaborator

artygus commented Mar 15, 2020

@Pavel-DV new version of remotedebug-ios-webkit-adapter is out with RemoteDebug/remotedebug-ios-webkit-adapter#188 and RemoteDebug/remotedebug-ios-webkit-adapter#186 merged your issues should've been solved

@Pavel-DV
Copy link

@artygus Thanks! Now all works for me.

@danrossi
Copy link

there is no release file for this. has it been updated yet ? I got 1.8.6 by mistake again

@geresy
Copy link

geresy commented Apr 13, 2020

Windows 10 - command prompt says i'm connected to the iPhone
chrome://inspect - I can see the target
The debug page is empty however.
Version 1.8.6

@danrossi
Copy link

You have to wait for a new binary release. 1.8.6 has the bug. I gave up , and had to suffer with weinre SSL hacks through ngrok. Slow but coped.

@danrossi
Copy link

danrossi commented May 3, 2020

latest fix is not released. any ideas ? cant even test it works. blank console 100%

@danrossi
Copy link

danrossi commented May 4, 2020

This is silly. How can we build a 1.8.7 binary for Windows ? Still no chance to get a fix.

@Vinocm
Copy link

Vinocm commented Jun 3, 2020

I am having this issue on iOS 13.3 against macOS 10.15.4

ios_webkit_debug_proxy 1.8.6
Built with libimobiledevice v1.2.0, libplist v2.1.0

Web inspector is ON, I tried restarting both devices, pluging and unpluging, reinstalling
Tried below as well
brew uninstall --ignore-dependencies libimobiledevice
brew uninstall --ignore-dependencies ideviceinstaller
brew uninstall --ignore-dependencies usbmuxd
brew install --HEAD usbmuxd
brew unlink usbmuxd
brew link usbmuxd
brew install --HEAD libimobiledevice
brew install --HEAD ideviceinstaller

Any work around for the same?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests