Skip to content

iOS 14.0 support #366

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
ghost opened this issue Jul 3, 2020 · 5 comments
Closed

iOS 14.0 support #366

ghost opened this issue Jul 3, 2020 · 5 comments

Comments

@ghost
Copy link

ghost commented Jul 3, 2020

Recently iOS 14.0 has been launched. When running the proxy, it's always showing empty list of devices? Is there anything we're missing?

@filipesilva
Copy link

filipesilva commented Aug 5, 2020

I tried to connect to an iPad Pro 11'' 2020 running iPad OS 14 beta 3 today using a Windows 10 machine.

I started by following the setup in https://github.com/RemoteDebug/remotedebug-ios-webkit-adapter#getting-started to install everything.

I opened https://www.google.com/ on a Safari tab and kept the iPad unlocked.

I couldn't get the iPad to be recognized in iTunes and tried all sorts of stuff until I figured out that I had to connect the USB cable directly to the iPad, and could not connect it to the magic keyboard I had the iPad mounted on. After that, iTunes recognized it.

Following RemoteDebug/remotedebug-ios-webkit-adapter#181 (comment) I only tried to connect when iTunes was running, but wasn't able to get any tab listed using remotedebug_ios_webkit_adapter.

At this point I tried using ios-webkit-debug-proxy --debug directly to see if I could get more debug information.

Connecting my iPad at this point showed the following debug logs:

PS C:\Users\kamik> ios_webkit_debug_proxy --debug
ss.add_server_fd(132)
Listing devices on :9221
ss.add_fd(424)
ss.add_server_fd(640)
ss.remove_server_fd(640)
ss.recv fd=424 len=294
ss.recv fd=424 len=664
ss.add_server_fd(648)
ss.add_fd(708)
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 31 36 35 63 37 39 66 62 2D 35 39 30 61 2D 34  y_.$165c79fb-590a-4
 38 66 37 2D 62 61 36 38 2D 31 61 33 36 37 31 61 31 36 64  8f7-ba68-1a3671a16d
 32 66 08 0D 18 31 3C 3F 5C 00 00 00 00 00 00 01 01 00 00  2f...1<?\..........
 00 00 00 00 00 07 00 00 00 00 00 00 00 00 00 00 00 00 00  ...................
 00 00 83                                                  ...
ss.recv fd=708 len=4
wi.recv[4]:
 00 00 00 AC                                               ....
ss.recv fd=708 len=1
wi.recv[1]:
 62                                                        b
ss.recv fd=708 len=171
wi.recv[171]:
 70 6C 69 73 74 30 30 D2 01 02 03 06 5A 5F 5F 61 72 67 75  plist00.....Z__argu
 6D 65 6E 74 5A 5F 5F 73 65 6C 65 63 74 6F 72 D1 04 05 5F  mentZ__selector..._
 10 1C 57 49 52 41 75 74 6F 6D 61 74 69 6F 6E 41 76 61 69  ..WIRAutomationAvai
 6C 61 62 69 6C 69 74 79 4B 65 79 5F 10 22 57 49 52 41 75  labilityKey_."WIRAu
 74 6F 6D 61 74 69 6F 6E 41 76 61 69 6C 61 62 69 6C 69 74  tomationAvailabilit
 79 41 76 61 69 6C 61 62 6C 65 5F 10 18 5F 72 70 63 5F 72  yAvailable_.._rpc_r
 65 70 6F 72 74 43 75 72 72 65 6E 74 53 74 61 74 65 3A 08  eportCurrentState:.
 0D 18 23 26 45 6A 00 00 00 00 00 00 01 01 00 00 00 00 00  ..#&Ej.............
 00 00 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 85  ...................
wi.recv_packet[176]:
 00 00 00 AC 62 70 6C 69 73 74 30 30 D2 01 02 03 06 5A 5F  ....bplist00.....Z_
 5F 61 72 67 75 6D 65 6E 74 5A 5F 5F 73 65 6C 65 63 74 6F  _argumentZ__selecto
 72 D1 04 05 5F 10 1C 57 49 52 41 75 74 6F 6D 61 74 69 6F  r..._..WIRAutomatio
 6E 41 76 61 69 6C 61 62 69 6C 69 74 79 4B 65 79 5F 10 22  nAvailabilityKey_."
 57 49 52 41 75 74 6F 6D 61 74 69 6F 6E 41 76 61 69 6C 61  WIRAutomationAvaila
 62 69 6C 69 74 79 41 76 61 69 6C 61 62 6C 65 5F 10 18 5F  bilityAvailable_.._
 72 70 63 5F 72 65 70 6F 72 74 43 75 72 72 65 6E 74 53 74  rpc_reportCurrentSt
 61 74 65 3A 08 0D 18 23 26 45 6A 00 00 00 00 00 00 01 01  ate:...#&Ej........
 00 00 00 00 00 00 00 07 00 00 00 00 00 00 00 00 00 00 00  ...................
 00 00 00 00 85                                            .....
Invalid message _rpc_reportCurrentState: <dict>
        <key>WIRAutomationAvailabilityKey</key>
        <string>WIRAutomationAvailabilityAvailable</string>
</dict>
ss.remove_fd(708)
Unable to connect to FilipeΓÇÖs iPad (00008027-000E188A1A40402E)
  Please verify that Settings > Safari > Advanced > Web Inspector = ON
ss.remove_server_fd(648)

I double checked that "Web Inspector" is turned on, and I also turned on the "Remote Automation" option next to it. If I don't have "Remote Automation" turned on, then Invalid message _rpc_reportCurrentState: contains the WIRAutomationAvailabilityNotAvailable key instead.

I imagine it refers to https://webkit.org/blog/9395/webdriver-is-coming-to-safari-in-ios-13/.

I also opened http://localhost:9221/ and saw this listing:

iOS Devices:
localhost:9222 - Filipe’s iPad

The iPad is recognized, but no tabs are available.

If I use ios_webkit_debug_proxy without the --debug option, I just get this part of the logging:

Invalid message _rpc_reportCurrentState: <dict>
        <key>WIRAutomationAvailabilityKey</key>
        <string>WIRAutomationAvailabilityAvailable</string>
</dict>
Unable to connect to FilipeΓÇÖs iPad (00008027-000E188A1A40402E)
  Please verify that Settings > Safari > Advanced > Web Inspector = ON

I'm not really familiar with how this project functions and this is my first time using it. From the logging it looks like WIRAutomationAvailabilityKey is a new setting being sent over RPC and ios_webkit_debug_proxy doesn't not know what to do with it, so it fails to connect.

Maybe it would be enough to recognize the message to get iPad OS 14 to work, or maybe that's a red herring and it would still fail to connect regardless.

Happy to test things if someone wants me to.

cc @artygus since you are a maintainer and added the 👀 reaction to the original post, so I thought you might be interested in the details.

@artygus
Copy link
Collaborator

artygus commented Aug 5, 2020

hi @filipesilva, changes handling _rpc_reportCurrentState message already landed in master branch 253ee30, I didn't prepare new release yet. will do over the weekend

@filipesilva
Copy link

Oh cool, thanks for letting me know!

@artygus
Copy link
Collaborator

artygus commented Aug 8, 2020

@filipesilva
Copy link

@artygus I tried getting the latest build via Scoop, but it says that 1.8.6 is the latest there. Then I downloaded the release from github and just replaced the contents of the 1.8.6 scoop folder with the newer 1.8.8.

I can confirm the errors while connecting with ios_webkit_debug_proxy are gone.

I tried with remotedebug_ios_webkit_adapter as well and was able to inspect running tabs with iTunes open and with it closed as well.

Worth mentioning that I yesterday also updated to iPad OS beta 4.

So in summary, it all seems to work for me. Thanks for your hard work @artygus!

@artygus artygus closed this as completed Aug 8, 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