Skip to content

[🐛 Bug]: Creating new Appium session fails #13821

@sander48k

Description

@sander48k

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

latest

Node.js Version

v18.19.0

Mode

Standalone Mode

Which capabilities are you using?

No response

What happened?

I am creating automated tests to run on an iPhone simulator. When trying to create a session with an Appium server (Appium version 2.12.1, running on localhost), an exception is raised. See attached log output.

Note that this error occurs as of webdriverIO version 9.2.2. Using 9.2.1, the session is created correctly.

What is your expected behavior?

I expect the session to be started correctly, with no exceptions.

How to reproduce the bug.

To reproduce the bug, create a file, named reproduce.js with the following content:

const { remote } = require('webdriverio');

remote({
    hostname: 'localhost',
    port: 4723,
    capabilities: {
        "appium:app": "com.apple.MobileAddressBook",
        "appium:automationName": "XCUITest",
        "platformName": "iOS"
    }
}).then((b) => {
    console.log('success');
}).catch((err) => {
    console.log(err);
})

and run the following command on the command line. Make sure that an appium server is running on localhost.

$ node reproduce.js

Relevant log output

2024-10-29T10:16:46.465Z INFO webdriver: Initiate new session using the WebDriver protocol
2024-10-29T10:16:46.465Z INFO @wdio/utils: Connecting to existing driver at http://localhost:4723/
2024-10-29T10:16:46.472Z INFO webdriver: [POST] http://localhost:4723/session
2024-10-29T10:16:46.472Z INFO webdriver: DATA {
  capabilities: {
    alwaysMatch: {
      'appium:app': 'com.apple.MobileAddressBook',
      'appium:automationName': 'XCUITest',
      platformName: 'iOS'
    },
    firstMatch: [ {} ]
  }
}
2024-10-29T10:16:49.769Z INFO webdriver: COMMAND getWindowHandle()
2024-10-29T10:16:49.769Z INFO webdriver: [GET] http://localhost:4723/session/141ca9c0-64c5-4c60-8ed1-5224bbcb86dd/window
2024-10-29T10:16:49.776Z WARN webdriver: WebDriverError: Method is not implemented when running "window" with method "GET"
2024-10-29T10:16:49.776Z INFO webdriver: Retrying 1/3
2024-10-29T10:16:49.776Z INFO webdriver: [GET] http://localhost:4723/session/141ca9c0-64c5-4c60-8ed1-5224bbcb86dd/window
2024-10-29T10:16:50.283Z WARN webdriver: WebDriverError: Method is not implemented when running "window" with method "GET"
2024-10-29T10:16:50.284Z INFO webdriver: Retrying 2/3
2024-10-29T10:16:50.285Z INFO webdriver: [GET] http://localhost:4723/session/141ca9c0-64c5-4c60-8ed1-5224bbcb86dd/window
2024-10-29T10:16:51.297Z WARN webdriver: WebDriverError: Method is not implemented when running "window" with method "GET"
2024-10-29T10:16:51.297Z INFO webdriver: Retrying 3/3
2024-10-29T10:16:51.297Z INFO webdriver: [GET] http://localhost:4723/session/141ca9c0-64c5-4c60-8ed1-5224bbcb86dd/window
2024-10-29T10:16:51.309Z ERROR webdriver: WebDriverError: Method is not implemented when running "window" with method "GET"
unknown method: WebDriverError: Method is not implemented when running "window" with method "GET"

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions