-
Notifications
You must be signed in to change notification settings - Fork 461
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
Proxy unable to connect to iOS7 lockdownd #38
Comments
I'm also seeing this on my Linux machine. Every time I run the ios_webkit_proxy command, my phone (running IOS7) pops up a message asking me if would like to trust this computer. Before I can answer, the following error message appears:
|
I'm guessing this is related to libimobiledevice/libimobiledevice#20 I can confirm that ios_webkit_proxy works on an iOS6 device with my setup fine. |
I'm not sure. People claim this works with iOS 7 and we are both experiencing the same issue even though you are testing on a physical device and I'm testing on the simulator. I'll try to get someone else to test on the simulator tonight and report back. |
Thanks, it'd be helpful to run iOS6 vs iOS7 tests on simulated vs physical devices. Also, can you run other idevice* commands, e.g. "ideviceinstaller -l" and "idevicepair validate"? |
I don't seem to have the "ideviceinstaller" command on my system. I have libimobiledevice 1.1.5 installed on my Archlinux box. On my iOS7 device
ERROR: Device (big hash) is not paired with this host
ERROR: Could not pair with the device because a passcode is set. Please enter the passcode on the device and retry. (I don't use a passcode) On my iOS6 device
Seems like an upstream bug, eh? |
Actually, removing the passcode from my device (prompted by the error message above) seems to have caused ios-webkit-debug-proxy to start working! (depite the error message that I still receive from |
Nice. There doesn't seem to be an iOS Simulator passcode option/functionality, but I also get that same "ERROR: Could not pair with the device because a passcode is set. Please enter the passcode on the device and retry." |
A passcode is fine on physical devices, but even desktop Safari can't inspect an iOS6 device unless you unlock the device. Is the ios-webkit-debug-proxy unable to attach to an iOS7 device with an unlocked passcode? Can desktop Safari's inspector attach to a simulated iOS7 Safari? Or does it have the same error/popup as ios-webkit-debug-proxy? |
I have the same issue in desktop Safari with iOS Simulator. It can only view/highlight/edit markup, no styles populate and no timeline info. I've never actually seen this error/popup, possibly because I don't have a passcode set. I'll try using my physical device next (which does have a passcode) to see if there's any difference. |
Please use the libimobiledevice/trustdialog branch to properly test iOS 7 support. |
I was getting the same I installed the
The iOS7 simulator connects OK (both with the standard |
i am also seeing the |
(I'm not a C programmer, so I apologise in advance if I have this wrong) Looking at the code in
The
Is that a correct interpretation of the issue? If so, then presumably when @FunkyM merges the |
@scottohara You are right about the struct. However, the correct change should be to make the project actually use libimobiledevice's webinspector implementation instead of reimplementing it's own. Furthermore it make sense to merge the "higher level" API bits implemented here into the libimobiledevice protocol implementation, too. |
The proxy's webinspector was released before libimobiledevice's webinspector, so it's not a "reimpl". Scott's correct: the above struct must be updated to match libimobiledevice, ideally with an "#ifdef" to support both branches. A better fix would be to modify libimobiledevice to provide access to their "idevice_connection_private" struct's fd. Merging this code into libimobiledevice would be difficult. The proxy uses non-blocking I/O (e.g. "wi_on_recv(self, buf, len)"), libimobiledevice uses blocking I/O (e.g. "webinspector_receive_with_timeout(client, to_plist, millis)"). Non-blocking I/O requires access to the fd. I strongly prefer non-blocking I/O and see no reason to switch to blocking I/O. Eventually I'd like to refactor the proxy's webinspector.c into low-level ("wi_recv_packet", "wi_send_msg") v.s. higher-level ("wi_recv_msg", "wi_send_forwardSocketData") files, but, as noted above, merging any of this into libimobiledevice would be awkward. |
Just as a test (notwithstanding both of your comments about the correct way to handle this); I temporarily added I was able to successfully debug a webapp running on my connected iOS7 device. Cheers, |
Great! Once I setup an iOS7 device (ASAP, ideally), I'll commit your fix (w/ #ifdef) and update the README. Thanks, Todd |
@wrightt You are right by the terms, it's rather another implementation than a reimplementation and you had it working earlier. I really like what you implemented here. I agree with you that it's not an easy task to merge your webinspector implementation in libimobiledevice but it's also not rocket science, clearly doable and the right place for the protocol layer. I'll have to work on it anyways so it would just have been nice if we could join forces and let both projects benefit. If you have an issue about blocking/non-blocking I/O then we can most likely find a solution for that, too. As you also noticed there are two levels of the webinspector "protocol". One low level and one encapsulated higher level protocol, both of which are targeted to become implemented in libimobiledevice at some point for easier "consumption" in other projects. The trustdialog branch is being merged into master pretty soon. |
Hey guys, FWIW I just installed the proxy on a fully up-to-date OSX ML, using a freshly-updated brew. I use a physical iPhone 4 running iOS 6.1.3 (don't want to update to iOS 7). It was unlocked every time I tried to connect. Proxy installing worked fine but on the first connect attempts I got the usual "lockdown/unable to attach" messages. I did an BUT when I look at localhost:9221 I keep seeing the iPhone as not usable (not a link, a mere listing), and attempting localhost:9222 (the listed URL) doesn't get anywhere (Chrome network failure). What gives here? |
This is still happening in Ubuntu 13.10. Can anyone confirm working 7.0.3 or 7.0.4? |
I'm getting the exact same issue as @tdd with an iPhone 4S running iOS 7.0.4 and Macbook Pro running OSX 10.9. Nothing gets printed to the console. Is this related or does it need a new issue? |
@programmin1: Just built everything (ie. libplist,libusbmuxd, libimobiledevice and ios-webkit-debug-proxy) from HEAD on Ubuntu 13.04 and tested and iPad running 7.0.4. Same problem. EDIT: The Safari debugger in OSX works as expected. |
Which version of libimobiledevice are you using? To check: Also, if you the libimobiledevice tools installed, does |
libimobiledevice version 1.1.5. Checkmarks on all dependencies. |
@tdd: Had the same issue. I ran |
@tdd I too had the same issue. ideviceinfo works fine. So does idevice_id -l and idevicepair validate. I am trying to connect to iPad 2.1 running 7.0.2 from a MacBook running OSX (10.8.5). I see the device listed in localhost:9221 but it isn't clickable and if I try to connect to the device on port 9222 I get a cannot connect to server error. Any clues? UPDATE: My solution was here - #49 |
@markduerden |
Fixed for Mac: I've updated the proxy to use libimobiledevice 1.1.6 and improved the logging. My Mac can now inspect real & simulated MobileSafari. Linux seems to have trust dialog issues, so I'm leaving this issue open until they're resolved. |
@wrightt |
libimobiledevice 1.1.6 is now available: http://libimobiledevice.org |
Frustrating, I've just not been able to figure out what's wrong. I compiled and installed everything in Ubuntu from libimobiledevice.org, but have the following issues:
[/code] Now the pairing seems to be lost, and I have to click the 'Trust' dialogue to repair. What have I done wrong? |
I just tried this again and things are working as expected now. Starting from scratch on OSX:
|
Linux ios7 trust issue is still a major problem... |
i fixed this error on mac with brew reinstall --HEAD libimobiledevice |
This is what I see when I run the proxy. Everything is fully updated (Xcode 5, etc.).
This is what I see when I go to to http://localhost:9221 (which I assume is correct). That link takes me to a full-screen inspector view, but styles don't populate in the Styles pane on the right and nothing populates in the Timeline when reloading the page in the Simulator window. The rendered source does load in the Inspector and corresponding elements highlight correctly in the Simulator when hovering in Inspector, so I presume everything is getting hung up on the problem with the proxy.
Any ideas on what could be wrong?
The text was updated successfully, but these errors were encountered: