WDA won't start up

iPhone 17.5
MacOS 14.5
Appium 2.11.5
XCUITest 7.27
XCode 16

I’ve been dealing with this problem for a couple of days, the most standard configuration is done in WebDriverAgent(XCode), I make a build of WDARunner, after making a test of the same TARGET, it installs me WDA on the iPhone, starts it (the screen fades and there is an inscription that it is automation and how it can be turned off). As soon as I turn off this test or reboot the phone, of course WDA is disabled, and when trying to run it manually again, nothing works, it just opens for a second and closes immediately, to run it again you need to run the test again from the XCode application.

I tried IDB, when I tried to use capabilities related to WDA startup, it wrote that it didn’t find it.

And no, I don’t want to run the test and WDA through XCode every time. Thank you all in advance, please help me. I did everything I saw, cleared data, checked certificates, reinstalled and more.

UPD:

[Appium] Welcome to Appium v2.11.5[Appium] The autodetected Appium home path: - Pastebin.com - Appium Logs, try run Inspector.

And regarding your post above, I’ve tried them already. I’ve seen about Framework, I’ve tried running it and uninstalling it. But the most important commands from them do not run, because of the absence of such a file or subcommand.
Here is the proof of the word admin@37-139-52-208 ~ % xcrun devicectl device process launchError: Missing ex - Pastebin.com

More information will be given by what I used and the appium:usePreinstalledWDA setting, when running from the console and from the inspector. It is the same everywhere, it opens the WebDriverAgentRunner-Runner application and closes it immediately. And even if I use the command devicectl device process launch --device 00008020-000E4080368A002E --terminate-existing --environment-variables ‘{“USE_PORT”: “54377”, “WDA_PRODUCT_BUNDLE_IDENTIFIER”: “com. aui.WebDriverAgentRunner.xctrunner”, ‘MJPEG_SERVER_PORT’: ‘54378’}’ com.aui.WebDriverAgentRunner.xctrunner

It says it has run, but it just opens the application and closes it immediately.

Isn’t this the expected behaviour? Check the device logs to verify the WDA server is listening at the given port. Also make sure the most recent version of it is being used.

How can I check the device logs? Via XCode?

  1. Write your driver capabilities.
  2. Nothing can be done with automation inscription on phone. It does not hurt actually e.g. video recording of test. This is by design of XCUITest.
  3. WDA app on phone has no UI. It is expected that it is not visible on phone while running.

1.


2. I’m not saying it’s bothering me in any particular way, I’ve already read about this inscription, the fact that it doesn’t show up anywhere but my direct screen.
3. I realize it doesn’t have a user interface, it’s just that when I look at the build and run the test through XCode, it opens this app that I installed, exits and this automation label appears, I thought I could run it the same way.

  1. My general idea, I want to do automation, and to do that I need to be able to not manually run WDA every time, but I mean run it once, and then it executed its code, rebooted, cleaned itself up and ran WDA again, without my involvement. Minimal, that is.

I uninstalled WDARunner from my iPhone and ran it from the inspector, wanted to connect: gist:9be05fbe78e57814cbdfdd7c2f8514e8 · GitHub


But you also need to take into account that all it shows, writes that there is no certificate, or it is somehow crookedly configured, although in fact when I do through Product → Build ; Product → Test, everything is fine

the only thing what is familiar to me is that you have to change the WDA bundleId regularly. So try to make unique again and try something else instead of “aui”. Then build it again and try to run again.