Appium: WDA not recognised

Installed 1.16.0-beta.3 for iOS 13. The XCode WDA succeeds but when running the automation script on real device, WDA is not recognized.

The certificates and profile is correct.

There are two WDA present and the other has the Runner but it is always linking to below location(which is not the correct). Tried removing this WDA but it didn’t work.

The WDA cannot find the specified path:
/Users/USERS/Library/Developer/Xcode/DerivedData/WebDriverAgent-aiaejbhejflmruhkhsmeebmhbaia/Logs/Test/Test-WebDriverAgentRunner-2020.02.05_17-59-09-+0530.xcresult

[35m[[email protected]]e[39m at Usbmux.connect (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/node_modules/appium-ios-device/lib/usbmux/index.js:207:13)
[debug] e[35m[WebDriverAgent]e[39m Log file for xcodebuild test:
/Users/USERS/Library/Developer/Xcode/DerivedData/WebDriverAgent-aiaejbhejflmruhkhsmeebmhbaia/Logs/Test/Test-WebDriverAgentRunner-2020.02.05_17-59-09-+0530.xcresult/Staging/2_Test/Diagnostics/WebDriverAgentRunner-94ADD6BF-B695-420D-A0A9-7CD0CDA4F687/WebDriverAgentRunner-F854E881-BFC8-4D59-ABF2-FBE1B1D5C414/Session-WebDriverAgentRunner-2020-02-05_175909-X68Jzx.log
e[35m[Xcode]e[39m 2020-02-05 17:59:09.698 xcodebuild[26336:3112952] Error Domain=NSCocoaErrorDomain Code=260 “The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file.” UserInfo={NSFilePath=/Users/USERS/Library/Developer/Xcode/DerivedData/WebDriverAgent-aiaejbhejflmruhkhsmeebmhbaia/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app, NSUnderlyingError=0x7fe2479c9530 {Error Domain=NSPOSIXErrorDomain Code=2 “No such file or directory”}}
e[35m[Xcode]e[39m
e[35m[Xcode]e[39m
e[35m[Xcode]e[39m Test session results, code coverage, and logs:
e[35m[Xcode]e[39m /Users/USERS/Library/Developer/Xcode/DerivedData/WebDriverAgent-aiaejbhejflmruhkhsmeebmhbaia/Logs/Test/Test-WebDriverAgentRunner-2020.02.05_17-59-09-+0530.xcresult
e[35m[Xcode]e[39m
e[35m[Xcode]e[39m
e[35m[Xcode]e[39m Testing failed:
e[35m[Xcode]e[39m Signing for “WebDriverAgentRunner” requires a development team. Select a development team in the Signing & Capabilities editor.
e[35m[Xcode]e[39m WebDriverAgentRunner:
e[35m[Xcode]e[39m WebDriverAgentRunner-Runner.app encountered an error (Failed to install or launch the test runner. (Underlying error: The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file. The file doesn’t exist. (Underlying error: The operation couldn’t be completed. No such file or directory)))
e[35m[Xcode]e[39m
e[35m[Xcode]e[39m ** TEST EXECUTE FAILED **
e[35m[Xcode]e[39m
e[35m[Xcode]e[39m
e[35m[Xcode]e[39m Testing started on ‘iPAD’
e[35m[Xcode]e[39m
e[35m[WebDriverAgent]e[39m xcodebuild exited with code ‘65’ and signal ‘null’
[debug] e[35m[BaseDriver]e[39m Event ‘wdaStartFailed’ logged at 1580905749785 (17:59:09 GMT+0530 (India Standard Time))
[debug] e[35m[XCUITest]e[39m Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
[debug] e[35m[XCUITest]e[39m xcodebuild error message:
[debug] e[35m[XCUITest]e[39m
[debug] e[35m[XCUITest]e[39m 2020-02-05 17:59:09.698 xcodebuild[26336:3112952] Error Domain=NSCocoaErrorDomain Code=260 “The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file.” UserInfo={NSFilePath=/Users/USERS/Library/Developer/Xcode/DerivedData/WebDriverAgent-aiaejbhejflmruhkhsmeebmhbaia/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app, NSUnderlyingError=0x7fe2479c9530 {Error Domain=NSPOSIXErrorDomain Code=2 “No such file or directory”}}
[debug] e[35m[XCUITest]e[39m Test session results, code coverage, and logs:
[debug] e[35m[XCUITest]e[39m /Users/USERS/Library/Developer/Xcode/DerivedData/WebDriverAgent-aiaejbhejflmruhkhsmeebmhbaia/Logs/Test/Test-WebDriverAgentRunner-2020.02.05_17-59-09-+0530.xcresult
[debug] e[35m[XCUITest]e[39m Testing failed:
[debug] e[35m[XCUITest]e[39m Signing for “WebDriverAgentRunner” requires a development team. Select a development team in the Signing & Capabilities editor.
[debug] e[35m[XCUITest]e[39m WebDriverAgentRunner:
[debug] e[35m[XCUITest]e[39m WebDriverAgentRunner-Runner.app encountered an error (Failed to install or launch the test runner. (Underlying error: The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file. The file doesn’t exist. (Underlying error: The operation couldn’t be completed. No such file or directory)))
[debug] e[35m[XCUITest]e[39m ** TEST EXECUTE FAILED **
[debug] e[35m[XCUITest]e[39m Testing started on 'iPAD’. Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
e[35m[XCUITest]e[39m Quitting and uninstalling WebDriverAgent
e[35m[WebDriverAgent]e[39m Shutting down sub-processes
[debug] e[35m[WebDriverAgent]e[39m No WDAs on the device.

Any help will be appreciated.

did you generate WDA with xCode from

/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent

folder?

1 Like

No. Its from ⁨usr⁩ ▸ ⁨local⁩ ▸ ⁨lib⁩ ▸ ⁨node_modules⁩ ▸ appium-webdriveragent.

Then do in folder i mentioned and try.

By default, it is installing to appium-webdriveragent. with new Appium and OS, this is the folder for running WDA. Is it something else?

-> https://github.com/appium/appium-xcuitest-driver/commit/011115c48bd1dc8ff5019c76e12acd9e15f1650c

Thanks Aleksei. That worked but the WDA is still not working\

[debug] e[35m[XCUITest]e[39m Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 70

logs. and PLEASE not here but link to https://gist.github.com/

https://gist.github.com/smita13/5d9748880abd3eb5a05dd59497c03560 Added

did you build with xCode WDA in folder i mentioned for your iPad ?

Yes. And the build succeeds.

pls check that after you build app in xCode -> it is appeared in mentioned above path

PS better build WDA for general iOS device

With generic, it build fails. Attaching screenshot

I have cleaned the DerivedData folder with the command below, same errors. Also, changed Architecture to ${inherited} but no update.
rm -rf ~/Library/Developer/Xcode/DerivedData

  1. this is NOT generic!
  2. generic is below:
    image
  3. did you follow “http://appium.io/docs/en/drivers/ios-xcuitest-real-devices/” before open project in xCode? for example i do Full Manual Config:
  • navigate in terminal to “/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent”
  • execute in terminal:
    mkdir -p Resources/WebDriverAgent.bundle
    ./Scripts/bootstrap.sh -d
  • now double click on “WebDriverAgent.xcodeproj” and open project in xCode
  • now in xCode add your DEV signature to: WebDriverAgentLib + WebDriverAgentRunner
  • now with WebDriverAgentRunner select “Generic iOS Device”
  • build

PS something wrong? -> uninstall and install appium again

Yes, the errors are with Generic setting not the iPhone 11 Pro as in screenshot.

We have followed all the steps mentioned.

Will reinstall appium again and get back. Thanks for the support.

Hey. I re-installed appium and built WDA. The build succeeds but on running the scripts the errors are same and WDA does not get installed.

[debug] e[35m[WD Proxy]e[39m Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
e[35m[[email protected]]e[39m Connection was refused to port 8100
e[35m[WD Proxy]e[39m Got an unexpected response with status undefined: {“code”:“ECONNRESET”}
e[35m[WebDriverAgent]e[39m xcodebuild exited with code ‘70’ and signal ‘null’
[debug] e[35m[BaseDriver]e[39m Event ‘wdaStartFailed’ logged at 1581091428555 (21:33:48 GMT+0530 (India Standard Time))
[debug] e[35m[XCUITest]e[39m Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 70
[debug] e[35m[XCUITest]e[39m xcodebuild error message:
[debug] e[35m[XCUITest]e[39m . Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
e[35m[XCUITest]e[39m Quitting and uninstalling WebDriverAgent
e[35m[WebDriverAgent]e[39m Shutting down sub-processes
[debug] e[35m[WebDriverAgent]e[39m No WDAs on the device.
e[35m[XCUITest]e[39m Error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 70

No more ideas… ask ios dev for help.

Did you checked that in xCode derived folder builded wda and it size about 20Mb?

Also what is your xcode version ? It should be latest! To support ios 13.3

The Xcode is latest. But the Derived Data build folder size is 90MB.

no idea about data. check that you have 20Mb WDA app size. see my screenshot where one WDA generated for real phone and another one for simulator. It should be similar with you.

Hi,
In iPhones folder, WebDriverAgentRunner-Runner.app is not getting generated.