danielpaulus / go-ios

This is an operating system independent implementation of iOS device features. You can run UI tests, launch or kill apps, install apps etc. with it.
MIT License
888 stars 172 forks source link

Feat req: runwda also starts testmanagerd on iphone #391

Open dokisha opened 5 months ago

dokisha commented 5 months ago

Is your feature request related to a problem? Please describe.

  1. Close Xcode
  2. Reboot iphone
  3. Start tunnel
  4. Execute command: go-ios runwda --udid=<UDID> --address=<RSD_ADDR> --rsd-port=<RSD_PORT>

output:

{"bundleid":"com.facebook.WebDriverAgentRunner.xctrunner","level":"info","msg":"Running wda","testbundleid":"com.facebook.WebDriverAgentRunner.xctrunner","time":"2024-03-26T12:42:59+01:00","xctestconfig":"WebDriverAgentRunner.xctest"}
{"level":"debug","msg":"iOS version: 17.3.0 detected, running with ios17 support","time":"2024-03-26T12:42:59+01:00"}
{"error":"runXUITestWithBundleIdsXcode15Ctx: cannot create a tunnel connection to testmanagerd: ConnectToServiceTunnelIface: failed to connect to tunnel: connectToTunnel: failed to dial: dial tcp [fdb1:fa29:5d81::1]:0: connect: can't assign requested address","level":"fatal","msg":"Failed running WDA","time":"2024-03-26T12:42:59+01:00"}

Describe the solution you'd like 'go-ios runwda' starts 'testmanagerd' service on iphone (if it's not running )

Describe alternatives you've considered Open Xcode, go-ios runwda starts working (and opens WDA on iphone)

Additional context MacOS Sonoma 14.3.1 Iphone 17.3

When Xcode is opened, seems like it automatically starts this process on iphone: { "isApplication": false, "name": "testmanagerd", "realAppName": "/System/Developer/usr/libexec/testmanagerd", }

Haven't tried ios runwda on Linux yet, not sure what will start testmanagerd there.

Blue-FatMan commented 1 month ago

I also face this problem. but my env is on windows. Iphone os is 17.5.

runXUITestWithBundleIdsXcode15Ctx: cannot create a tunnel connection to testmanagerd: ConnectToServiceTunnelIface: failed to connect to tunnel: ConnectToHttp2WithAddr: failed to dial: dial tcp [fd8c:e0bf:13bc::1]:0: connectex: The requested address is not valid in its context.

dokisha commented 1 month ago

testmanagerd will be started after personalized disk image is mounted with command

go-ios image auto

AND tunnel is recreated, so you need to; either restart Agent process started by

go-ios tunnel start --pair-record-path=/some/existing/dir

or unplugging and plugging device which will make (already running) Agent to recreate the tunnel.

after that testmanagerd is working and runwda is working.