You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.
Unable to run tests using protractor on SauceLabs launched from Travis CI
Step to reproduce.
I have configured .travis.yml (https://docs.travis-ci.com/user/sauce-connect/) to use Sauce Connect to allow Travis runs scripts on Sauce Labs. Travis log displayed that connection was successful:
27 Nov 06:48:18 - Starting Selenium listener...
27 Nov 06:48:18 - Establishing secure TLS connection to tunnel...
27 Nov 06:48:18 - Selenium listener started on port 4445.
27 Nov 06:48:19 - Sauce Connect is up, you may start your tests.
Start e2e test with protractor.config.js configuration.
Expected result: All e2e tests are passed/failed.
Actual result: Tests aren't started. The following error is displayed:
[chrome #2] PID: 3328
[chrome #2] undefined:1190
[chrome #2] vlog(2, () => this + ' scheduling notifications', this);
[chrome #2] ^
[chrome #2] SyntaxError: Unexpected token )
[chrome #2] at goog.loadModuleFromSource_ (/home/travis/.nvm/versions/node/v0.12.4/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1123:19)
[chrome #2] at Object.goog.loadModule (/home/travis/.nvm/versions/node/v0.12.4/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1085:46)
[chrome #2] at /home/travis/.nvm/versions/node/v0.12.4/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1:6
[chrome #2] at Object.exports.runInContext (vm.js:64:17)
[chrome #2] at Object.Context.closure.goog.retrieveAndExecModule_ (/home/travis/.nvm/versions/node/v0.12.4/lib/node_modules/protractor/node_modules/selenium-webdriver/base.js:135:8)
[chrome #2] at :1:6
[chrome #2] at Object.exports.runInContext (vm.js:64:17)
[chrome #2] at Context.closure.closure.vm.createContext.CLOSURE_IMPORT_SCRIPT (/home/travis/.nvm/versions/node/v0.12.4/lib/node_modules/protractor/node_modules/selenium-webdriver/base.js:104:12)
[chrome #2] at Object.goog.importScript (/home/travis/.nvm/versions/node/v0.12.4/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:879:9)
[chrome #2] at Object.goog.importModule (/home/travis/.nvm/versions/node/v0.12.4/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:900:14)
[launcher] Runner process exited unexpectedly with error code: 1
[launcher] 1 instance(s) of WebDriver still running
This error is due to the fact that Protractor 3.x.x does not work with node versions < 4. It looks like you are using node v0.12.4 which is not compatible.
You will need to downgrade to protractor 2.x.x or upgrade your version of node to 4 or greater. You can see the exception is generated from the new es6 arrow syntax in your stacktrace:
Please ask usage and debugging questions on StackOverflow (use the "protractor" tag) or in the Angular discussion group. (Please do not ask support questions here on Github.)
protractor.config.js.txt
Unable to run tests using protractor on SauceLabs launched from Travis CI
Step to reproduce.
27 Nov 06:48:18 - Starting Selenium listener...
27 Nov 06:48:18 - Establishing secure TLS connection to tunnel...
27 Nov 06:48:18 - Selenium listener started on port 4445.
27 Nov 06:48:19 - Sauce Connect is up, you may start your tests.
Actual result: Tests aren't started. The following error is displayed:
[chrome #2] PID: 3328
[chrome #2] undefined:1190
[chrome #2] vlog(2, () => this + ' scheduling notifications', this);
[chrome #2] ^
[chrome #2] SyntaxError: Unexpected token )
[chrome #2] at goog.loadModuleFromSource_ (/home/travis/.nvm/versions/node/v0.12.4/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1123:19)
[chrome #2] at Object.goog.loadModule (/home/travis/.nvm/versions/node/v0.12.4/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1085:46)
[chrome #2] at /home/travis/.nvm/versions/node/v0.12.4/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1:6
[chrome #2] at Object.exports.runInContext (vm.js:64:17)
[chrome #2] at Object.Context.closure.goog.retrieveAndExecModule_ (/home/travis/.nvm/versions/node/v0.12.4/lib/node_modules/protractor/node_modules/selenium-webdriver/base.js:135:8)
[chrome #2] at :1:6
[chrome #2] at Object.exports.runInContext (vm.js:64:17)
[chrome #2] at Context.closure.closure.vm.createContext.CLOSURE_IMPORT_SCRIPT (/home/travis/.nvm/versions/node/v0.12.4/lib/node_modules/protractor/node_modules/selenium-webdriver/base.js:104:12)
[chrome #2] at Object.goog.importScript (/home/travis/.nvm/versions/node/v0.12.4/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:879:9)
[chrome #2] at Object.goog.importModule (/home/travis/.nvm/versions/node/v0.12.4/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:900:14)
[launcher] Runner process exited unexpectedly with error code: 1
[launcher] 1 instance(s) of WebDriver still running
I used protractor@3.0.0.
For more details please refer to the protractor configuration file and full travis log (https://s3.amazonaws.com/archive.travis-ci.org/jobs/93474859/log.txt)
The text was updated successfully, but these errors were encountered: