appium: bug: xcode 15.0.1 - WDA is not reused instead it is rebuilded all the time

Do I have the most recent component updates?

  • I use the most recent available driver/plugin and server versions

Is the component officially supported by the Appium team?

  • I have verified the component repository is present under the Appium organization in GitHub

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

While starting the tests, the WDA is always rebuilded regadless there is a WDA on the simulator which was running before.

Launching WebDriverAgent on the device 2023-11-21 09:41:03:072 - [XCUITestDriver@c62f (f7563732)] Cleaning up the WebDriverAgent project after the module upgrade has happened (5.0.0 < 5.14.0) 2023-11-21 09:41:03:073 - [XCUITestDriver@c62f (f7563732)] Cleaning the project scheme ‘WebDriverAgentLib’ to make sure there are no leftovers from previous

Expected Behavior

The behavior while using xcode 14.2 was that once the simulator had a WDA installed and running, i could use it all day long without rebuilding it.

Minimal Reproducible Example

starting with useNewWDA=false

Environment

  • Operating system: Sonoma 14.1.1
  • Appium server version (output of appium --version): 2.2.2
  • Appium driver(s) and their version(s): XCUITESTdriver 5.9.1
  • Appium plugin(s) and their version(s): images 2.1.7
  • Node.js version (output of node --version): 16.19.1
  • npm version (output of npm --version): 8.19.3
  • Last component(s) version which did not exhibit the problem:
  • Platform and version under test: iOS 16.4 (with xcode 15 Simulator)
  • Real device or emulator/simulator: Simulator

Link to Appium Logs

https://gist.github.com/RSM-SBA/b7ad356f2ad4dc232164191877fd8b19

Further Information

No response

About this issue

  • Original URL
  • State: closed
  • Created 7 months ago
  • Comments: 23 (2 by maintainers)

Commits related to this issue

Most upvoted comments

@mykola-mokhnach ok removing the locale “fixed” the problem… Strange that it is only a problem when reusing the WDA and not all the time.

Then I probably know what the issue might be: https://github.com/appium/appium-ios-simulator/pull/384

Restarting Springboard also kills WDA as a side effect. cc @mwakizaka

Restarting Springboard also kills WDA as a side effect. cc @mwakizaka

I’m sorry for the issue. I’m afraid but no have good ideas. Should not we restart Springboard when a WDA session already exists? Although we may try rebooting WDA session in such situation, I guess it will break the motivation (reuse a WDA session as far as possible in order to start a test run quickly)

We may make this behaviour configurable (e.g. add an additional argument to either allow or deny services restart after defaults are changed). So people have a choice. Also, calling this method before the session start is not as bad, because it retries, although calling it mid-session, using https://github.com/appium/appium-xcuitest-driver/blob/master/docs/execute-methods.md#mobile-configurelocalization endpoint, would probably have sad consequences with the current implementation.

It sounds good. Let me work in on next week if no problem.