Skip to content

[🐛 Bug]: V9.2.2 Unable to run Appium tests using mac2 driver #13813

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

Closed
1 task done
APshenkin opened this issue Oct 28, 2024 · 3 comments
Closed
1 task done

[🐛 Bug]: V9.2.2 Unable to run Appium tests using mac2 driver #13813

APshenkin opened this issue Oct 28, 2024 · 3 comments
Labels
Bug 🐛 Needs Triaging ⏳ No one has looked into the issue yet

Comments

@APshenkin
Copy link

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

9.2.2

Node.js Version

20

Mode

WDIO Testrunner

Which capabilities are you using?

{
  "platformName": "mac",
  "appium:automationName": "mac2",
  "appium:showServerLogs": true,
  "appium:bundleId": "my_byndle_id",
  "appium:appPath": "my_app_path"
}

What happened?

On startup of tests webdriverIO calls getWindowHandle() method, which is not implemented in mac2 driver for appium.

Downgrading @wdio/local-runner to 9.2.1 solves the issue

What is your expected behavior?

No response

How to reproduce the bug.

Try to run automation for any application using mac2 driver

Relevant log output

[0-0] 2024-10-28T15:14:26.678Z INFO webdriver: COMMAND getWindowHandle()
[0-0] 2024-10-28T15:14:26.678Z INFO webdriver: [GET] http://127.0.0.1:4723/session/9bf46ad9-6725-41f3-a06b-847e14854913/window
2024-10-28T15:14:26.680Z DEBUG @wdio/appium-service: [9bf46ad9][HTTP] --> GET /session/9bf46ad9-6725-41f3-a06b-847e14854913/window {}

2024-10-28T15:14:26.681Z DEBUG @wdio/appium-service: [9bf46ad9][Mac2Driver@e826] Driver proxy active, passing request on via HTTP proxy

2024-10-28T15:14:26.682Z DEBUG @wdio/appium-service: [9bf46ad9][WD Proxy] Matched '/session/9bf46ad9-6725-41f3-a06b-847e14854913/window' to command name 'getWindowHandle'

2024-10-28T15:14:26.683Z DEBUG @wdio/appium-service: [9bf46ad9][Protocol Converter] Did not know how to rewrite the original URL '/session/9bf46ad9-6725-41f3-a06b-847e14854913/window' for W3C protocol

2024-10-28T15:14:26.683Z DEBUG @wdio/appium-service: [9bf46ad9][WD Proxy] Proxying [GET /session/9bf46ad9-6725-41f3-a06b-847e14854913/window] to [GET http://127.0.0.1:10100/session/D5D22723-608E-4351-BE09-117ABAA231A3/window] with no body

2024-10-28T15:14:26.687Z DEBUG @wdio/appium-service: [9bf46ad9][WD Proxy] Got response with status 404: {"value":{"error":"unknown command","message":"Unhandled endpoint: /session/D5D22723-608E-4351-BE09-117ABAA231A3/window -- http://127.0.0.1:10100/ with parameters {\n    wildcards =     (\n        \"session/D5D22723-608E-4351-BE09-117ABAA231A3/window\"\n    );\n}","traceback":""},"sessionId":"D5D22723-608E-4351-BE09-117ABAA231A3"}

2024-10-28T15:14:26.687Z DEBUG @wdio/appium-service: [9bf46ad9][W3C] Matched W3C error code 'unknown command' to UnknownCommandError

2024-10-28T15:14:26.695Z DEBUG @wdio/appium-service: [9bf46ad9][HTTP] <-- GET /session/9bf46ad9-6725-41f3-a06b-847e14854913/window 404 14 ms - 1066

[0-0] 2024-10-28T15:14:26.696Z DEBUG webdriver: request failed due to response error: unknown command
[0-0] 2024-10-28T15:14:26.697Z WARN webdriver: WebDriverError: Unhandled endpoint: /session/D5D22723-608E-4351-BE09-117ABAA231A3/window -- http://127.0.0.1:10100/ with parameters {
[0-0]     wildcards =     (
[0-0]         "session/D5D22723-608E-4351-BE09-117ABAA231A3/window"
[0-0]     );
[0-0] } when running "window" with method "GET"


### Code of Conduct

- [X] I agree to follow this project's Code of Conduct

### Is there an existing issue for this?

- [X] I have searched the existing issues
@APshenkin APshenkin added Bug 🐛 Needs Triaging ⏳ No one has looked into the issue yet labels Oct 28, 2024
@christian-bromann
Copy link
Member

christian-bromann commented Oct 28, 2024

On startup of tests webdriverIO calls getWindowHandle() method, which is not implemented in mac2 driver for appium.

This is a bug with the Mac2 driver which should implement the basic WebDriver Classic commands as it states in the readme:

The driver operates in scope of W3C WebDriver protocol with several custom extensions to cover operating-system specific scenarios.

I recommend to open an issue in the Mac2 Driver project.

@APshenkin
Copy link
Author

APshenkin commented Oct 28, 2024

@christian-bromann Opened. However I feel that those changes were breaking, as obviously, no tests can be run now and webdriver just bump patch version, not major. So maybe this should been fixed in WebdriverIO as well, until it will be fixed in appium mac2 driver?

@christian-bromann
Copy link
Member

So maybe this should been fixed in WebdriverIO as well, until it will be fixed in appium mac2 driver?

I understand that this is frustrating from the user perspective. Unfortunately it is impossible for us to foresee this happening as we rely on other systems, e.g. browsers or Appium, to fulfill their contracts, e.g. having support for all WebDriver Classic commands. This made me realise that something we definitely can do is to introduce Appium tests into our pipeline to ensure we are not breaking the experience for Appium users again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐛 Needs Triaging ⏳ No one has looked into the issue yet
Projects
None yet
Development

No branches or pull requests

2 participants