go-ios icon indicating copy to clipboard operation
go-ios copied to clipboard

ios forward not reconnecting automatically if device disconnected and reconnected

Open mega6453 opened this issue 1 year ago • 2 comments

Describe the bug ios forward command not reconnecting when device is disconnected and connected back.

To Reproduce Steps to reproduce the behavior:

  1. Connect iOS device
  2. Forward port using command "ios forwad 7777 9100"
  3. Load the localhost - http://localhost:7777 - Works
  4. Disconnect device
  5. Connect device again
  6. Load the localhost - http://localhost:7777 - Not connecting

Expected behavior When reconnecting the device , the forwarded port should work automatically. The same steps works with iproxy.exe which is from libimobiledevice.

Desktop (please complete the following information):

  • OS: Windows
  • Version: Windows 10 Enterprise 22H2 19045.4046

Smartphone (please complete the following information):

  • Device: iPhone 12
  • OS: 16.5.1

mega6453 avatar Mar 09 '24 07:03 mega6453

If you disconnect you have to start xctest again

krishtoautomate avatar Mar 09 '24 13:03 krishtoautomate

@krishtoautomate I'm fine with starting wda again. But even after starting it, the forwarding is not happening. It stops saying "msg":"could not connect to phone","phonePort":9100,"

But in the same case with iproxy, it forwards the local port to the ios port in the same cmd window session without doing anything.

mega6453 avatar Mar 10 '24 13:03 mega6453