webdriverio / selenium-standalone

A Node.js based package and CLI library for launching Selenium with WebDrivers support (Chrome, Firefox, IE, Edge)
https://webdriver.io
Other
909 stars 222 forks source link

Upgraded to 6.9.0 and can't find correct server.jar #307

Closed toien44 closed 4 years ago

toien44 commented 7 years ago

Expected Behavior

If you're describing a bug, tell us what should happen. If you're suggesting a change/improvement, tell us how it should work.

Expecting to download and run

selenium install:
from: https://selenium-release.storage.googleapis.com/3.5/selenium-server-standalone-3.5.3.jar
to: /Users/user/Documents/dir/dir/node_modules/selenium-standalone/.selenium/selenium-server/3.5.3-server.jar

and it does download the new 3.5.3.jar and it's in the location node_modules/selenium-standalone/.selenium/selenium-server/3.5.3-server.jar

Current Behavior

If describing a bug, tell us what happens instead of the expected behavior. If suggesting a change/improvement, explain the difference from current behavior.

But when the test runs I get the error

Error: Missing /Users/user/Documents/dir/dir/node_modules/selenium-standalone/.selenium/selenium-server/3.3.1-server.jar
    at /Users/user/Documents/dir/dir/node_modules/selenium-standalone/lib/check-paths-existence.js:15:20
    at FSReqWrap.cb [as oncomplete] (fs.js:258:19)

so it's still looking for the older jar file, however when I run the test in Jenkins I delete the repo before the run and it does a new npm install and I checked in the package.json that selenium-standalone: 6.9.0. I reinstalled the npm package globally on my local machine and on Jenkins and it then worked fine on my local, but does not work on Jenkins still.

Logs

It is helpful to include any logs that selenium-standalone outputs to help diagnose issues. Take a look at the README for how to enable debug log statements that will help us even more than the standard output logs.

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'test' ]
2 info using npm@3.10.8
3 info using node@v6.9.1
4 verbose run-script [ 'pretest', 'test', 'posttest' ]
5 info lifecycle qa_mobile@1.0.0~pretest: qa_mobile@1.0.0
6 silly lifecycle qa_mobile@1.0.0~pretest: no script for pretest, continuing
7 info lifecycle qa_mobile@1.0.0~test: qa_mobile@1.0.0
8 verbose lifecycle qa_mobile@1.0.0~test: unsafe-perm in lifecycle true
9 verbose lifecycle qa_mobile@1.0.0~test: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/qa-administrator/jenkins/workspace/dev-demo-tim/node_modules/.bin:/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/android/sdk/tools:/Applications/android/sdk/platform-tools:/Applications/android/sdk/tools:/Applications/android/sdk/platform-tools
10 verbose lifecycle qa_mobile@1.0.0~test: CWD: /Users/qa-administrator/jenkins/workspace/dev-demo-tim
11 silly lifecycle qa_mobile@1.0.0~test: Args: [ '-c',
11 silly lifecycle   'npm run babel && node dist/setup.js --start && node dist/runner.js && node dist/setup.js --shutdown && node dist/setup.js --zipReport && node dist/setup.js --jsonToXml && node dist/setup.js --zipLogs' ]
12 silly lifecycle qa_mobile@1.0.0~test: Returned: code: 1  signal: null
13 info lifecycle qa_mobile@1.0.0~test: Failed to exec test script
14 verbose stack Error: qa_mobile@1.0.0 test: `npm run babel && node dist/setup.js --start && node dist/runner.js && node dist/setup.js --shutdown && node dist/setup.js --zipReport && node dist/setup.js --jsonToXml && node dist/setup.js --zipLogs`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:255:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:191:7)
14 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:191:7)
14 verbose stack     at maybeClose (internal/child_process.js:877:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid qa_mobile@1.0.0
16 verbose cwd /Users/qa-administrator/jenkins/workspace/dev-demo-tim
17 error Darwin 16.7.0
18 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "test"
19 error node v6.9.1
20 error npm  v3.10.8
21 error code ELIFECYCLE
22 error qa_mobile@1.0.0 test: `npm run babel && node dist/setup.js --start && node dist/runner.js && node dist/setup.js --shutdown && node dist/setup.js --zipReport && node dist/setup.js --jsonToXml && node dist/setup.js --zipLogs`
22 error Exit status 1
23 error Failed at the qa_mobile@1.0.0 test script 'npm run babel && node dist/setup.js --start && node dist/runner.js && node dist/setup.js --shutdown && node dist/setup.js --zipReport && node dist/setup.js --jsonToXml && node dist/setup.js --zipLogs'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the qa_mobile package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     npm run babel && node dist/setup.js --start && node dist/runner.js && node dist/setup.js --shutdown && node dist/setup.js --zipReport && node dist/setup.js --jsonToXml && node dist/setup.js --zipLogs
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs qa_mobile
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls qa_mobile
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

Your Environment

mgrybyk commented 4 years ago

Please try the latest version.

Thanks!