mllrsohn / gulp-protractor

gulp wrapper for protractor tests
MIT License
136 stars 82 forks source link

Server terminated early with status 1 #128

Closed Shyam-Chen closed 7 years ago

Shyam-Chen commented 7 years ago

When I update to v4.0... (in Docker/CI)

$ if [[ "$MODE" == "e2e" ]]; then yarn run e2e; fi
yarn run v0.21.3
$ gulp e2e 
[12:09:40] Requiring external module babel-register
[12:09:46] Using gulpfile ~/build/Shyam-Chen/Frontend-Starter-Kit/gulpfile.babel.js
[12:09:46] Starting 'e2e'...
(node:2863) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[12:09:48] I/launcher - Running 1 instances of WebDriver
[12:09:48] I/local - Starting selenium standalone server...
[12:09:49] E/launcher - Error: Error: Server terminated early with status 1
    at earlyTermination.catch.e (/home/travis/build/Shyam-Chen/Frontend-Starter-Kit/node_modules/protractor/node_modules/selenium-webdriver/remote/index.js:252:52)
    at process._tickCallback (internal/process/next_tick.js:109:7)
[12:09:49] E/launcher - Process exited with error code 100
/home/travis/build/Shyam-Chen/Frontend-Starter-Kit/tools/tasks/e2e.js:22
      throw error;
      ^
Error: protractor exited with code 100
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
The command "if [[ "$MODE" == "e2e" ]]; then yarn run e2e; fi" exited with 1.
rahulmr commented 7 years ago

could you please try running with node 6.10.0 npm 4.1.2 and jdk8? Please report back.

rahulmr commented 7 years ago

If possible share the repository details so that I can try it out if it is hosted on github.com as public. Tests are working fine at my end, except that Firefox is having some issue. Chrome works fine. Check logs here

Shyam-Chen commented 7 years ago

I installed Java 8, but still can not work.

# Travis CI
5.07s$ if [[ "$MODE" == "e2e" ]]; then yarn run e2e; fi
yarn run v0.21.3
$ gulp e2e 
[11:35:19] Requiring external module babel-register
[11:35:23] Using gulpfile ~/build/Shyam-Chen/Frontend-Starter-Kit/gulpfile.babel.js
[11:35:23] Starting 'e2e'...
(node:3138) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[11:35:24] I/launcher - Running 1 instances of WebDriver
[11:35:24] E/local - Error code: 135
[11:35:24] E/local - Error message: No update-config.json found. Run 'webdriver-manager update' to download binaries.
[11:35:24] E/local - Error: No update-config.json found. Run 'webdriver-manager update' to download binaries.
    at Local.addDefaultBinaryLocs_ (/home/travis/build/Shyam-Chen/Frontend-Starter-Kit/node_modules/protractor/lib/driverProviders/local.ts:47:15)
    at Local.setupDriverEnv (/home/travis/build/Shyam-Chen/Frontend-Starter-Kit/node_modules/protractor/lib/driverProviders/local.ts:98:10)
    at Local.setupEnv (/home/travis/build/Shyam-Chen/Frontend-Starter-Kit/node_modules/protractor/lib/driverProviders/driverProvider.ts:124:30)
    at q.then (/home/travis/build/Shyam-Chen/Frontend-Starter-Kit/node_modules/protractor/lib/runner.ts:387:39)
    at _fulfilled (/home/travis/build/Shyam-Chen/Frontend-Starter-Kit/node_modules/q/q.js:834:54)
    at self.promiseDispatch.done (/home/travis/build/Shyam-Chen/Frontend-Starter-Kit/node_modules/q/q.js:863:30)
    at Promise.promise.promiseDispatch (/home/travis/build/Shyam-Chen/Frontend-Starter-Kit/node_modules/q/q.js:796:13)
    at /home/travis/build/Shyam-Chen/Frontend-Starter-Kit/node_modules/q/q.js:857:14
    at runSingle (/home/travis/build/Shyam-Chen/Frontend-Starter-Kit/node_modules/q/q.js:137:13)
    at flush (/home/travis/build/Shyam-Chen/Frontend-Starter-Kit/node_modules/q/q.js:125:13)
[11:35:24] E/launcher - Process exited with error code 135
/home/travis/build/Shyam-Chen/Frontend-Starter-Kit/tools/tasks/e2e.js:22
      throw error;
      ^
Error: protractor exited with code 135
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
The command "if [[ "$MODE" == "e2e" ]]; then yarn run e2e; fi" exited with 1.

# .travis.yml
[...]
sudo: false
addons:
  apt:
    packages:
      - oracle-java8-installer
[...]
rahulmr commented 7 years ago

Could you please try to change your package.json to have gulp-protractor: "mllrsohn/gulp-protractor#spawn_to_fork" ? If it is able to fix then I can merge the changes. Also please check my .travis.yml present here.

Just check the new error which says that webdriver-update is not updated. Share your repo if its on github.

Shyam-Chen commented 7 years ago

My boilerplate is here.

I use gulp-protractor here.

rahulmr commented 7 years ago

I tried some tests though I was not successful making it work with Linux or docker but it went great on windows. See tests on appveyor here. I will try to make it work for Docker, I think you need to make some changes in your Dockerfile and the way tests are executed on Linux.

rahulmr commented 7 years ago

Finally was able to fix your repository. See here Will close this issue once I merge the code

Shyam-Chen commented 7 years ago

Awesome! I'll try it tomorrow. Thanks.

Shyam-Chen commented 7 years ago

Thanks. It can run successfully. https://github.com/Shyam-Chen/Frontend-Starter-Kit/commit/fde3124a6a7e39cb4ebaab79273bec59b4e66d8b

rahulmr commented 7 years ago

Merged code with version upgrade