Skip to content

"No device found" when running latest ios-webkit-debug-proxy on Windows #351

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
stefannesic opened this issue Feb 26, 2020 · 21 comments
Closed

Comments

@stefannesic
Copy link

I have installed the 1.85 release which seems to work, but there's the iOS 13 issue where the device is not detected properly in Chrome which was fixed in this merge

Therefore, I am compiling the Windows binaries myself and I am trying to use remotedebug-ios-webkit-adapter with the latest version of ios-webkit-debug-proxy on Windows. I have the iPhone plugged in and have accepted the connection with iTunes.

ios_webkit_debug_proxy.exe execution:

Unable to bind "devices list" on port 9221-9221
No device found, is it plugged in?

remotedebug-ios-webkit-adapter executes properly withnpm startand it is listening on port 9000, but nothing is detected.

I installed usbmuxd with the make files and it might not be running
usbmuxd apparently runs automatically after make install.

usbmuxd/src/usbmuxd.exe execution:
usbmuxd: ERROR: Child process exited with error 1, check syslog for messages.
I don't have more information in syslog with cygwin.

idevice_id returns this:

./idevice_id.exe -l
socket_connect: getaddrinfo: Unknown error
ERROR: Unable to retrieve device list!

Can anyone please help me figure out why remotedebug-ios-webkit-adapter is not detecting properly and why ios-webkit-debug-proxy and usbmuxd are not executing? Thanks in advance.

@artygus
Copy link
Collaborator

artygus commented Feb 26, 2020

hey @stefannesic, do you build with mingw? on windows you don't need usbmuxd, make sure you have itunes running (required software name should be Apple Mobile Device Support and Apple Application Support applications)

@stefannesic
Copy link
Author

hey @artygus thanks for the quick response.

  • I did everything with Cygwin, should I try again with mingw ? I don't understand these programs very well, but it seems to me that they both are used for cross compiling and interchangeable
  • I installed usbmuxd since it was necessary for compiling libimobiledevice
  • I have iTunes running during the tests and iPhone is detected

@artygus
Copy link
Collaborator

artygus commented Feb 28, 2020

@stefannesic libusbmuxd should be enough to compile libimobiledevice, the error suggests it can't connect to usbmuxd daemon (which might be provided via itunes), can you verify you can connect to 127.0.0.1:27015 from cygwin?

https://github.com/libimobiledevice/libusbmuxd/blob/5cbf7635e34b68125b01dbc71b333525ad3cea40/include/usbmuxd-proto.h#L29-L33

https://github.com/libimobiledevice/libusbmuxd/blob/5cbf7635e34b68125b01dbc71b333525ad3cea40/src/libusbmuxd.c#L208-L210

I recommend you checking libimobiledevice issues on github, maybe other users had faced similar issues

@stefannesic
Copy link
Author

stefannesic commented Feb 28, 2020

While I try to dig deeper into the cause of the problem on my side, here's some results...

Connection to 127.0.0.1:27015 from cygwin

nc -vz 127.0.0.1 27015
Connection to 127.0.0.1 27015 port [tcp/*] succeeded!

Also, outside of cygwin on cmd...
TCP 127.0.0.1:27015 0.0.0.0:0 LISTENING 3856 TCP 127.0.0.1:27015 127.0.0.1:57518 ESTABLISHED 3856 TCP 127.0.0.1:27015 127.0.0.1:57533 ESTABLISHED 3856 TCP 127.0.0.1:27015 127.0.0.1:57558 ESTABLISHED 3856 TCP 127.0.0.1:27015 127.0.0.1:57571 ESTABLISHED 3856 TCP 127.0.0.1:27015 127.0.0.1:57586 ESTABLISHED 3856 TCP 127.0.0.1:27015 127.0.0.1:64054 ESTABLISHED 3856 TCP 127.0.0.1:27015 127.0.0.1:64075 ESTABLISHED 3856 TCP 127.0.0.1:27015 127.0.0.1:65370 ESTABLISHED 3856

@artygus
Copy link
Collaborator

artygus commented Feb 28, 2020

can't help you with libimobiledevice debugging, but I think I'll craft a windows beta build with recent changes over the weekend, because work on getting rid of libimobiledevice is stalling

@stefannesic
Copy link
Author

ok are you sure it's a libimobiledevice issue? I'll debug all day today and see. Thanks, a beta build would be welcome!

@artygus
Copy link
Collaborator

artygus commented Feb 28, 2020

if libimobiledevice binaries don't work it's 100% problem with *imobiledevice libs, which I infer from OP

./idevice_id.exe -l
socket_connect: getaddrinfo: Unknown error
ERROR: Unable to retrieve device list!

@artygus
Copy link
Collaborator

artygus commented Feb 28, 2020

Also, this one looks very suspicious

Unable to bind "devices list" on port 9221-9221

do you have any antivirus software or something else that might block cygwin accessing network?

@stefannesic
Copy link
Author

yes, normally I have a anti-virus and proxy on my work computer, but I am using a 4G hotspot to bypass most of these issues.

@stefannesic
Copy link
Author

I'll re-test the latest release with the iOS 13 bug to see if the issue is from my work environment

@stefannesic
Copy link
Author

@artygus Just an update! I checked and the 1.85 release works normally on my computer when I run it:

Listing devices on :9221
Unable to connect to iPhone 
  Please verify that Settings > Safari > Advanced > Web Inspector = ON

I compiled in the following order: libplist-master, libusbmuxd-master, libimobiledevice-master, and ios-webkit-debug-proxy-master.

When I run the generate ios-webkit-debug-proxy.exe, same error:

Unable to bind "devices list" on port 9221-9221
No device found, is it plugged in?

How do you normally compile the Windows binaries? In Cygwin, do you just ./autogen then make then make install for each of the listed repositories above? The binary fetched using scoop doesn't depend on any cygwin .dll files, so I assume they are compiled using mingw64.

Also, in the execution of the 1.85 ios-debug-webkit-proxy, the npm package vs-libimobile is used. Can this be used to compile the latest commit instead of compiling three libraries?

@artygus
Copy link
Collaborator

artygus commented Mar 3, 2020

  1. compilation is straight forward, download source, run make etc, no magic
  2. not sure I understand part with npm package vs-libimobile, it is was not used in any offcicial releases of iwdp

@stefannesic
Copy link
Author

  1. then, how come my compiled .exe file depends on cygwin1.dll, but the official release version does not?
  2. in the installation instructions of remotedebug-debug-ios-webkit-adapter, an installation of vs-libimobile is required according to the README.

I am running both .exe files in the same directory on the same computer, but the one I compiled has an error. You mentioned that it's a libusbmuxd issue, but I don't understand why I need to test idevice_id.exe if the official version of ios-debug-webkit-proxy works.

@artygus
Copy link
Collaborator

artygus commented Mar 3, 2020

  1. it was compiled in different environment (mingw)
  2. remotedebug-debug-ios-webkit-adapter is a separate project, I don't know the reasoning behind it

I am running both .exe files in the same directory on the same computer, but the one I compiled has an error. You mentioned that it's a libusbmuxd issue, but I don't understand why I need to test idevice_id.exe if the official version of ios-debug-webkit-proxy works.

at the moment iwdp depends on libimobiledevice and friends (libplist, libusbmuxd) to initiate handshake and connect to usbmuxd daemon. idevice_id is the simplest program that does exactly this, gets list of devices from usbmuxd and does handshake to read device name. If it doesn't work, don't expect iwdp to work either

@artygus
Copy link
Collaborator

artygus commented Mar 3, 2020

a little research shows that remotedebug-debug-ios-webkit-adapte requires vs-libimobile to get os version from connected device, it was not possible to get it using only with iwdp before version 1.8.5

https://github.com/RemoteDebug/remotedebug-ios-webkit-adapter/blob/6c65cda49a8343bb7e8c541d804e00b19da9e50e/src/adapters/iosAdapter.ts#L167-L189

@stefannesic
Copy link
Author

mobiledevice and friends (libplist, libusbmuxd) to initiate handshake and connect to usbmuxd daemon. idevice_id is the simplest program that does exactly this, gets list of devices from usbmuxd and does handshake to read device name. If it doesn't work, don't expect iwdp to work either

Does this handshake occur on compilation or execution? Does this mean that the 1.85 release of iwdp, which executes properly, doesn't initiate the handshake and connect to the usbmuxd daemon? Since, I don't believe I call these "friends" during the execution of 1.85.

I am trying to understand... is my error in the compilation of the dependencies making the executable of iwdp disfunction?

@artygus
Copy link
Collaborator

artygus commented Mar 5, 2020

@stefannesic I published new release with windows binaries https://github.com/google/ios-webkit-debug-proxy/releases/tag/v1.8.6, please check out if it works for you

@artygus
Copy link
Collaborator

artygus commented Mar 5, 2020

Does this handshake occur on compilation or execution? Does this mean that the 1.85 release of iwdp, which executes properly, doesn't initiate the handshake and connect to the usbmuxd daemon? Since, I don't believe I call these "friends" during the execution of 1.85.

It does, you can see it if you look at source code. I believe there's something wrong with your build environment, unfortunately I can't help you with this

@stefannesic
Copy link
Author

@stefannesic I published new release with windows binaries https://github.com/google/ios-webkit-debug-proxy/releases/tag/v1.8.6, please check out if it works for you

It works and connects to the iPhone!!!
Listing devices on :9221 Connected :9222 to iPhone ...

Unfortunately, I'm getting the same issue with remotedebug, is it still an iwdp problem?
iosAdapter.getTargets error.iosAdapter.getTargets.getDeviceVersion.failed.fallback, device=[object Object] iosAdapter.getTargets

@stefannesic
Copy link
Author

Does this handshake occur on compilation or execution? Does this mean that the 1.85 release of iwdp, which executes properly, doesn't initiate the handshake and connect to the usbmuxd daemon? Since, I don't believe I call these "friends" during the execution of 1.85.

It does, you can see it if you look at source code. I believe there's something wrong with your build environment, unfortunately I can't help you with this

Thanks so much for the release!! I'm still curious to understand why it wasn't working for me..

Following this logic of build environment issues, why does the official release version execute the handshake properly in the same environment, but my own cygwin build doesn't ?

@artygus
Copy link
Collaborator

artygus commented Mar 5, 2020

@stefannesic I have no answers for this, start with making idevice_id work, libimobiledevice has larger community I hope you'll be able to find answers there

@artygus artygus closed this as completed Mar 5, 2020
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

2 participants