Vue-cli: Default nightwatch e2e test does not work with stable chrome version

Created on 30 Aug 2019  路  8Comments  路  Source: vuejs/vue-cli

Version

3.11.0

Environment info

Environment Info:


  System:
    OS: macOS 10.14.6
    CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
  Binaries:
    Node: 8.12.0 - /usr/local/bin/node
    Yarn: 1.13.0 - ~/.yarn/bin/yarn
    npm: 6.4.1 - /usr/local/bin/npm
  Browsers:
    Chrome: 76.0.3809.132
    Firefox: 68.0
    Safari: 12.1.2
  npmPackages:
    @fortawesome/vue-fontawesome: ^0.1.6 => 0.1.6 
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0 
    @vue/babel-plugin-transform-vue-jsx:  1.0.0 
    @vue/babel-preset-app:  3.11.0 
    @vue/babel-preset-jsx:  1.1.0 
    @vue/babel-sugar-functional-vue:  1.0.0 
    @vue/babel-sugar-inject-h:  1.0.0 
    @vue/babel-sugar-v-model:  1.0.0 
    @vue/babel-sugar-v-on:  1.1.0 
    @vue/cli-overlay:  3.11.0 
    @vue/cli-plugin-babel: ^3.9.0 => 3.11.0 
    @vue/cli-plugin-e2e-nightwatch: ^3.9.0 => 3.11.0 
    @vue/cli-plugin-eslint: ^3.9.0 => 3.11.0 
    @vue/cli-plugin-typescript: ^3.9.0 => 3.11.0 
    @vue/cli-plugin-unit-jest: ^3.9.0 => 3.11.0 
    @vue/cli-service: ^3.9.0 => 3.11.0 
    @vue/cli-shared-utils:  3.11.0 
    @vue/component-compiler-utils:  3.0.0 
    @vue/eslint-config-standard: ^4.0.0 => 4.0.0 
    @vue/eslint-config-typescript: ^4.0.0 => 4.0.0 
    @vue/preload-webpack-plugin:  1.1.1 
    @vue/test-utils: 1.0.0-beta.29 => 1.0.0-beta.29 
    @vue/web-component-wrapper:  1.2.0 
    bootstrap-vue:  2.0.0-rc.28 
    eslint-plugin-vue: ^5.0.0 => 5.2.3 (4.7.1)
    jest-serializer-vue:  2.0.2 
    portal-vue:  2.1.6 
    typescript: ^3.4.3 => 3.6.2 
    vue: ^2.6.10 => 2.6.10 
    vue-cli-webpack:  1.0.0 
    vue-eslint-parser:  5.0.0 (2.0.3)
    vue-functional-data-merge:  3.1.0 
    vue-hot-reload-api:  2.3.3 
    vue-jest:  3.0.4 
    vue-loader:  15.7.1 
    vue-router: ^3.0.7 => 3.1.2 
    vue-style-loader:  4.1.2 
    vue-template-compiler: ^2.6.10 => 2.6.10 
    vue-template-es2015-compiler:  1.9.1 
    vuedraggable:  2.23.0 
    vuex: ^3.1.1 => 3.1.1 
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

yarn e2e

or

npm e2e

What is expected?

cli demo e2e test runs without issue

What is actually happening?

test fails with following error:

Error retrieving a new session from the selenium server

Connection refused! Is selenium server started?
{ value:
{ message: 'session not created: Chrome version must be between 71 and 75\n (Driver info: chromedriver=2.46.628411 ...


partial fix for this is included in 4.x

Most helpful comment

As a work around i added

~
selenium: {
cli_args: {
'webdriver.chrome.driver': require('chromedriver').path
}
}
~

to my nightwatch.config.js

and used
~
yarn add --dev chromedriver
~

to update my chrome driver

All 8 comments

As a work around i added

~
selenium: {
cli_args: {
'webdriver.chrome.driver': require('chromedriver').path
}
}
~

to my nightwatch.config.js

and used
~
yarn add --dev chromedriver
~

to update my chrome driver

same questtion.
hope to resolve

Ran into this as well, expected it to "just work" out of the box. For some reason this plugin is requiring chromedriver 2.46.0 instead of the latest. Using the workaround from @connoratrug for now.

Same problem here...

The workaround from @connoratrug works for me - but I wanted to try the recently-learned yarn selective dependency resolutions, and tried adding

"resolutions": {
    "@vue/cli-plugin-e2e-nightwatch/chromedriver": "77.0.0"
  }

to my package.json - and that works, too.

Can confirm, I'm hitting the same issue, with less steps.
I expected to be able to:

$ vue create app
$ cd app
$ npm run test:e2e

Results in:

> [email protected] test:e2e /Users/.../app
> vue-cli-service test:e2e

 INFO  Starting development server...


 WARNING  Compiled with 2 warnings                                                                                                                         12:36:39 PM

 warning

asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
  js/chunk-vendors.6dfafbb7.js (266 KiB)

 warning

entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
  app (273 KiB)
      js/chunk-vendors.6dfafbb7.js
      css/app.321eb6eb.css
      js/app.6128f8c9.js



  App running at:
  - Local:   http://localhost:8080/
  - Network: http://192.168.1.130:8080/

  App is served in production mode.
  Note this is for preview or E2E testing only.

Starting selenium server... started - PID:  79631

[Test] Test Suite
=====================

Running:  default e2e tests

Error retrieving a new session from the selenium server

Connection refused! Is selenium server started?
{
  value: {
    message: 'session not created: Chrome version must be between 71 and 75\n' +
      '  (Driver info: chromedriver=2.46.628411 (3324f4c8be9ff2f70a05a30ebc72ffb013e1a71e),platform=Mac OS X 10.13.6 x86_64) (WARNING: The server did not provide any stacktrace information)\n' +
      'Command duration or timeout: 2.06 seconds\n' +
      "Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'\n" +
      "System info: host: 'MacBook-Pro.local', ip: 'fe80:0:0:0:1021:33fc:9886:a1a7%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.6', java.version: '1.8.0_202'\n" +
      'Driver info: driver.version: unknown',
    error: 'session not created'
  },
  status: 33
}

 ERROR  Error: Command failed: /Users/.../app/node_modules/nightwatch/bin/nightwatch --config /Users/.../app/node_modules/@vue/cli-plugin-e2e-nightwatch/nightwatch.config.js --env chrome
Error: Command failed: /Users/.../app/node_modules/nightwatch/bin/nightwatch --config /Users/.../app/node_modules/@vue/cli-plugin-e2e-nightwatch/nightwatch.config.js --env chrome
    at makeError (/Users/.../app/node_modules/execa/index.js:174:9)
    at /Users/.../app/node_modules/execa/index.js:278:16
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test:e2e: `vue-cli-service test:e2e`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test:e2e 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!     /Users/.../.npm/_logs/2019-10-12T10_36_43_907Z-debug.log

Fixed in v4.

Thanks @sodatea for resolving so quickly! To confirm to others, I was experiencing this issue too but everything is ok in v4.

Hi. How would I fix this in an existing project? I am not able to update chromedriver, selenium webdriver or nightwatch without getting the below message

Error: EPERM: operation not permitted, unlink 'C:\Development\project\node_modules\@vue\cli-plugin-e2e-nightwatch\node_modules\.chromedriver.DELETE\lib\chromedriver\chromedriver.exe'"

Was this page helpful?
0 / 5 - 0 ratings

Related issues

joshuajohnson814 picture joshuajohnson814  路  3Comments

DrSensor picture DrSensor  路  3Comments

eladcandroid picture eladcandroid  路  3Comments

Gonzalo2683 picture Gonzalo2683  路  3Comments

wahidrahim picture wahidrahim  路  3Comments