Skip to content
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

'browser.getTimeouts is not a function' error with 1.5.0 #473

Closed
sebage opened this issue May 19, 2023 · 6 comments · Fixed by #483
Closed

'browser.getTimeouts is not a function' error with 1.5.0 #473

sebage opened this issue May 19, 2023 · 6 comments · Fixed by #483
Assignees
Labels
bug Something isn't working

Comments

@sebage
Copy link

sebage commented May 19, 2023

Describe the bug
With version 1.5.0 we receive the following error when executing our tests in chrome headless mode:

[0-0] 2023-05-19T07:12:44.481Z ERROR @wdio/utils:shim: TypeError: browser.getTimeouts is not a function
[0-0] at Service. (C:\Users\xyz\git\wdi5_tests\node_modules\wdio-ui5-service\dist\service.js:89:54)
[0-0] at step (C:\Users\xyz\git\wdi5_tests\node_modules\wdio-ui5-service\dist\service.js:33:23)
[0-0] at Object.next (C:\Users\xyz\git\wdi5_tests\node_modules\wdio-ui5-service\dist\service.js:14:53)
[0-0] at fulfilled (C:\Users\xyz\git\wdi5_tests\node_modules\wdio-ui5-service\dist\service.js:5:58)
[0-0] at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

In version 1.4.0 or headfull mode the error doesn't occur. We are using the new headless mode of chrome ('--headless=new').

After the error the test continues to run and is reported as successful.

Runtime Env (please complete the following information):

  • wdi5/wdio-ui5-service-version: 1.5.0
  • UI5 version: 1.108.2
  • wdio-version (output of wdio --version): 7.31.1
  • node-version (output of node --version): v18.16.0
  • OS: Windows 11
  • Browser + Version: Chrome 113.0.5672.127 (Official Build) (64-bit)

Additional context
Chrome started with '--headless=new'.

@Siolto
Copy link
Collaborator

Siolto commented May 23, 2023

Hi @sebage,

is the error also occurring with the old headless mode?

@sebage
Copy link
Author

sebage commented May 23, 2023

Hi @Siolto ,
yes, i just tried it out, occurs also for old headless mode.

@vobu
Copy link
Contributor

vobu commented May 23, 2023

as browser.getTimeouts() is a WebDriver-function that should exist when using Chrome w/ wdi5...are you sure, you're actually using Chrome and not by chance the devtools fallback with puppeteer (e.g. see

services: ["ui5"] /* no drivers, so wdio is falling back to devtools + puppeteer*/,
)? I hope you don't mind me asking 😸
Could you probably post the relevant part of your wdio/wdi5 conf file?

@sebage
Copy link
Author

sebage commented May 23, 2023

Hi @vobu,

Following are the browser specific config parts, please let me know if i miss anything.

Same configuration works with WDI5 1.4.0 without the error.

    chrome = {
        driver_args: ['--disable-gpu', '--disable-dev-shm-usage', 'window-size=2560,1440'],
        instances: 5, //Number of instances for parallel test (spec) execution
    }

...
const chrome_args = function () {

    const conf = process._my_conf;

    var args = conf.chrome.driver_args;

    if (conf.headless) {
        args = args.concat(
            ['--headless=new', 'lang=en']
        )
    }

    if (!conf.log_level_verbose) {
        args = args.concat(['--log-level=3'])
    }
    return args;
}();
...
        browserName: 'chrome',
            'goog:chromeOptions': {
                w3c: false,
                args: chrome_args,
                prefs: {
                    'download.prompt_for_download': false,
                    //path needs to be absolute
                    'download.default_directory': process._my_conf.browser_download_dir
                    }
        },
...
services: ['chromedriver', 'ui5'],

@nair-sumesh
Copy link
Contributor

+1

@vobu
Copy link
Contributor

vobu commented Jun 12, 2023

ACK as bug - fix in the works

@vobu vobu added the bug Something isn't working label Jun 12, 2023
@vobu vobu self-assigned this Jun 12, 2023
@vobu vobu closed this as completed in #483 Jun 14, 2023
vobu added a commit that referenced this issue Jun 14, 2023
closes #473
(and merged by the mighty power of grayskull)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants