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

Nightwatch/BrowserStack + Safari results in "timeout error" #2522

Closed
Kenvdb opened this issue Oct 20, 2020 · 7 comments
Closed

Nightwatch/BrowserStack + Safari results in "timeout error" #2522

Kenvdb opened this issue Oct 20, 2020 · 7 comments

Comments

@Kenvdb
Copy link

Kenvdb commented Oct 20, 2020

Description of bug / issue
Running Nightwatch with BrowserStack on Safari results in a timeout error:

  TimeoutError: timeout error
       at processTicksAndRejections (internal/process/task_queues.js:97:5)

Dev Dependencies

"nightwatch": "^1.4.3",
"browserstack-local": "^1.4.8",

Running script
nightwatch -c nightwatch.conf.js -e safari

Nightwatch config

// var browserstack = require('browserstack-local');

  nightwatch_config = {
    src_folders: ['resources/tests/e2e/specs'],
    output_folder: 'resources/tests/e2e/reports',  
    selenium : {
      "start_process" : false,
      "host" : "hub-cloud.browserstack.com",
      "port" : 80,
      "check_process_delay": 0
      // "selenium_port": 8080,
      // "selenium_host": "site.com.local",
      // "silent": true,
    },
  
    common_capabilities: {
      'build': 'nightwatch-browserstack',
      'browserstack.user': process.env.BROWSERSTACK_USERNAME,
      'browserstack.key': process.env.BROWSERSTACK_ACCESS_KEY,
      'browserstack.debug': true
    },
  
    test_settings: {
      default: {},
      chrome: {
        desiredCapabilities: {
          browserName: "chrome",
          chromeOptions : {
            // This tells Chromedriver to run using the legacy JSONWire protocol
            // More info on Chromedriver: https://sites.google.com/a/chromium.org/chromedriver/
            w3c: false
          }
        }
      },
      firefox: {
        desiredCapabilities: {
          browserName: "firefox"
        }
      },
      edge: {
        desiredCapabilities: {
          os: 'Windows',
          os_version: '10',
          browser: 'edge',
        },
      },
      safari: {
        desiredCapabilities:{
          "os": "OS X",
          'os_version': 'Yosemite',
          'browser': 'Safari',
          'browser_version': '8.0'
        }
      },
      ie: {
        desiredCapabilities: {
          browserName: 'IE',
          browserVersion: '11.0',
          'bstack:options' : {
            os: 'Windows',
            osVersion: '10',
            local: 'false',
            seleniumVersion: '3.5.2',
            resolution: '1366x768'
          }
        }
      }
    }
  };
  
  // Code to support common capabilites
  for(var i in nightwatch_config.test_settings){
    var config = nightwatch_config.test_settings[i];
    config['selenium_host'] = nightwatch_config.selenium.host;
    config['selenium_port'] = nightwatch_config.selenium.port;
    config['desiredCapabilities'] = config['desiredCapabilities'] || {};
    for(var j in nightwatch_config.common_capabilities){
      config['desiredCapabilities'][j] = config['desiredCapabilities'][j] || nightwatch_config.common_capabilities[j];
    }
  }
  
  module.exports = nightwatch_config;

Console Error

TEST FAILURE: 1 error during execution; 0 tests failed, 0 passed (10.873s)

 × CookieBar.test
 – Google's Search Functionality (2.135s)

  TimeoutError: timeout error
       at processTicksAndRejections (internal/process/task_queues.js:97:5)


npm ERR! code ELIFECYCLE
npm ERR! errno 5
npm ERR! app@0.1.0 nightwatch-safari: `nightwatch -c nightwatch.conf.js -e safari`
npm ERR! Exit status 5
npm ERR!
npm ERR! Failed at the app@0.1.0 nightwatch-safari script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\<username>\AppData\Roaming\npm-cache\_logs\2020-10-20T09_37_56_790Z-debug.log
The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command npm run nightwatch-safari" terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.
@Kenvdb
Copy link
Author

Kenvdb commented Oct 26, 2020

Can you anyone pls give me any directions how to solve this issue? Much appreciated.

@eleni-salamani
Copy link

I am having the exact same issue. Any updates/hints?

@Dharin-shah
Copy link
Contributor

#2615
this should help

@Dharin-shah
Copy link
Contributor

This is fixed in Nightwatch v1.6 release. Please verify @Kenvdb @eleni-salamani

@eleni-salamani
Copy link

We will be trying out the new version in the upcoming 2 weeks, so will send out an update.

@beatfactor
Copy link
Member

Closing this as issues has been fixed, but feel free to reopen if needed.

@eleni-salamani
Copy link

Although the issue has been closed, just confirming that it has been fixed with the latest nightwatch version (1.6.3)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants