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

Issue running tests on freshly rebooted iOS 17+ device

Open shamanec opened this issue 1 year ago • 1 comments
trafficstars

Describe the bug If a freshly rebooted device is connected to host while tunnel is already running, runtest fails

To Reproduce Steps to reproduce the behavior:

  1. Disconnect your iOS 17+ device
  2. Reboot your device
  3. Start a tunnel with ios tunnel start --userspace
  4. Connect the device - notice that the tunnel registers the new connection
  5. Execute ios runtest --bundle-id={bundleId} --test-runner-bundle-id={bundleId} --xctest-config={config} --udid={udid}
  6. Observe the error:
    {"channel_id":"dtxproxy:XCTestManager_IDEInterface:XCTestManager_DaemonConnectionInterface","error":"Timed out waiting for response for message:5 channel:0","level":"error","msg":"failed requesting channel","time":"2024-08-02T17:22:37+03:00"} {"level":"error","msg":"DeviceConnection failed writing 1297 bytes, only 0 sent","time":"2024-08-02T17:22:37+03:00"} {"level":"error","msg":"Failed sending: write tcp 127.0.0.1:61169-\u003e127.0.0.1:60108: write: broken pipe","time":"2024-08-02T17:22:37+03:00"} {"channel_id":"dtxproxy:XCTestManager_IDEInterface:XCTestManager_DaemonConnectionInterface","error":"write tcp 127.0.0.1:61169-\u003e127.0.0.1:60108: write: broken pipe","level":"info","methodselector":"_IDE_initiateSessionWithIdentifier:capabilities:","msg":"failed starting invoking method","time":"2024-08-02T17:22:37+03:00"} {"level":"error","msg":"initiateSessionWithIdentifierAndCaps failed: write tcp 127.0.0.1:61169-\u003e127.0.0.1:60108: write: broken pipe","time":"2024-08-02T17:22:37+03:00"} {"error":"runXUITestWithBundleIdsXcode15Ctx: cannot initiate a IDE session: write tcp 127.0.0.1:61169-\u003e127.0.0.1:60108: write: broken pipe","level":"info","msg":"Failed running Xcuitest","time":"2024-08-02T17:22:37+03:00"}

Expected behavior XCUITest should successfully start

Screenshots

Desktop (please complete the following information):

  • macOS
  • Ventura 13.5.1

Smartphone (please complete the following information):

  • Device: iPhone 11/iPhone SE
  • OS: 17.5.1

Additional context v1.0.133 Only restarting the tunnel seems to help

shamanec avatar Aug 02 '24 14:08 shamanec