dryark / ios_remote_provider

Other
49 stars 33 forks source link

No WebDriverAgentRunner installed in the device #67

Open zcmgyu opened 2 years ago

zcmgyu commented 2 years ago

I've followed the steps to build WebDriverAgentRunner on my device, though there is no error message it seems that the web driver agent is also not installed on the device.

Build iOS Remote Provider and CFAgent

  1. cd ios_remote_provider
  2. Copy example config: cp config.json.example config.json
  3. Edit config.json to add your Apple developer details
  4. make
  5. security unlock-keychain login.keychain # to make sure developer details are there for xcode build
  6. make cfa

Logs:


** TEST BUILD SUCCEEDED **

The following commands produced analyzer issues:
    Analyze /Users/hc499/Documents/LongWorkSpace/Dockyard/research/ios_remote_provider/repos/CFAgent/ujsonin/ujsonin.c normal armv7 (in target 'CFAgentLib' from project 'CFAgent')
    Analyze /Users/hc499/Documents/LongWorkSpace/Dockyard/research/ios_remote_provider/repos/CFAgent/ujsonin/ujsonin.c normal arm64 (in target 'CFAgentLib' from project 'CFAgent')
    Analyze /Users/hc499/Documents/LongWorkSpace/Dockyard/research/ios_remote_provider/repos/CFAgent/WebDriverAgentLib/Routing/NNGServer.m normal armv7 (in target 'CFAgentLib' from project 'CFAgent')
    Analyze /Users/hc499/Documents/LongWorkSpace/Dockyard/research/ios_remote_provider/repos/CFAgent/WebDriverAgentLib/Routing/NNGServer.m normal arm64 (in target 'CFAgentLib' from project 'CFAgent')
(4 commands with analyzer issues)

I attempt below the command line to figure out the issue. Based on my experience on using Appium, I assume it's missing WDA on iPhone devices.

./bin/go-ios runwda --bundleid com.appium.WebDriverAgentRunner.xctrunner --testrunnerbundleid com.appium.WebDriverAgentRunner.xctrunner --xctestconfig WebDriverAgentRunner.xctest --udid 00008101-001904CC11A3003A

{"bundleid":"com.appium.WebDriverAgentRunner.xctrunner","level":"info","msg":"Running wda","testbundleid":"com.appium.WebDriverAgentRunner.xctrunner","time":"2021-11-02T16:25:53+09:00","xctestconfig":"WebDriverAgentRunner.xctest"} {"error":"Did not find AppInfo for 'com.appium.WebDriverAgentRunner.xctrunner' on device. Is it installed?","level":"fatal","msg":"Failed running WDA","time":"2021-11-02T16:25:53+09:00"}

Updated:

I opened CFAgent.xcodeproj and start CFAgent test, CFAgent-Runner installed to run on my device. It's worked now, but I still got Did not find AppInfo for 'com.appium.WebDriverAgentRunner.xctrunner' on device message.

Thank you for your open-source. :bow:

nanoscopic commented 2 years ago

Have you installed CFAgent to your device? How do you have your device configured? WebDriverAgent will not be automatically run unless you have wdaMethod set for your device specific config block.

If you have wdaMethod set, you will need to install WDA to your device for it to work.

To install it the easiest way is to start it once with Xcode.

zcmgyu commented 2 years ago

@nanoscopic Thank you for your response. It worked if I install CFAgent into my device manually in Xcode. I've already set startMethod: "tidevice", then runmake cfa does not install CFAgent though I got no error message. I'm using this commit https://github.com/nanoscopic/ios_remote_provider/commit/39f998723a9aedad500b7d35e34f3ec079bebd05