-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: xcode 15.0.1 - WDA is not reused instead it is rebuilded all the time #19440
Comments
Are you sure the attached log is the right one? |
Also the above flow should only be executed after the driver upgrade. The driver persists the actual WDA version every time a new version of it is installed, so after upgrade it compares the actual version with the persisted one and decides whether project cleanup is necessary |
yes its the correct one I had completly uninstalled appium and the appium_home components. |
By default the driver always rebuilds WDA after upgrade. The only way to prevent that is to provide the |
But i thought the upgrade does only occurs once and not every testrun. |
if i call the /status after a test is shutdown, the WDA is still running { |
Unfortunately I cannot see it occurs every start from the above log |
What I can see is the cached build is used then session creation fails because of some reason (maybe visible in device logs) and then it tries to reinit xcodebuild |
ok tried it with the iOS deviceLogs https://gist.github.com/RSM-SBA/064e12a4f3688857f222d6093326813b |
Exactly. Unfortunately I cannot find any traces of a possible reason in the logs. To me it looks like the app under test never returns the control to WDA. Are you able to start the session without providing the |
Seems that the app under test is not the problem. When the WDA is re-builded the test runs. https://gist.github.com/RSM-SBA/64bc6388e5d15d76b5ef4e3a02ff2afe |
Does it change anything if you also remove these both capabilities? :
|
will try it tomorrow and respond here, thank you so far for your input :) |
@mykola-mokhnach ok removing the locale "fixed" the problem... |
Then I probably know what the issue might be: appium/appium-ios-simulator#384 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? |
But would'nt rebooting WDA much faster than completly rebuilding it (as it is now) ? |
@RSM-SBA I have created the above PR to avoid services restart if the Simulator language is already set to the desired value. This should prevent WDA restart for the following sessions. |
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. |
@mwakizaka Thank you very much to fix it so quickly! |
With the current fix WDA should only restart once between locale changes. The process must not be restarted If the locale remains unchanged between sessions. |
the fix is working, thank you both for your quick response and fixing it |
…lators (#2276) * feat: add skipSyncUiDialogTranslation for initializing simulator * fix: avoid WDA shutdown when running mobile: configureLocalization script ref: appium/appium#19440 (comment) --------- Co-authored-by: Kazuaki Matsuo <[email protected]>
## [5.12.0](v5.11.8...v5.12.0) (2023-12-06) ### Features * use skipSyncUiDialogTranslation option for localization on simulators ([#2276](#2276)) ([3f4898a](3f4898a)), closes [/github.com/appium/appium/issues/19440#issuecomment-1823461012](https://github.com/appium//github.com/appium/appium/issues/19440/issues/issuecomment-1823461012)
Do I have the most recent component updates?
Is the component officially supported by the Appium team?
Is there an existing issue for this?
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
appium --version
): 2.2.2node --version
): 16.19.1npm
version (output ofnpm --version
): 8.19.3Link to Appium Logs
https://gist.github.com/RSM-SBA/b7ad356f2ad4dc232164191877fd8b19
Further Information
No response
The text was updated successfully, but these errors were encountered: