Page MenuHomePhabricator
Paste P12964

Tests pass when running `npm run selenium` command but exit with error on Mac
ActivePublic

Authored by Harriet on Oct 10 2020, 5:00 PM.
> @ selenium /Users/user/Documents/apps/core
> bash ./tests/selenium/selenium.sh
Starting ChromeDriver 84.0.4147.30 (48b3e868b4cc0aa7e8149519690b6f6949e110a8-refs/branch-heads/4147@{#310}) on port 4444
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
[1602348247.923][SEVERE]: bind() failed: Address already in use (48)
IPv4 port not available. Exiting...
> @ selenium-test /Users/user/Documents/apps/core
> wdio ./tests/selenium/wdio.conf.js
Execution of 6 spec files started at 2020-10-10T16:44:10.667Z
[0-0] RUNNING in chrome - /tests/selenium/wdio-mediawiki/specs/BlankPage.js
[0-0] (node:5030) DeprecationWarning: Got: "options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"
[0-0]
Screenshot location: /Users/user/Documents/apps/core/tests/selenium/log/BlankPage-should-have-its-title-%40daily.png
[0-0] PASSED in chrome - /tests/selenium/wdio-mediawiki/specs/BlankPage.js
[0-1] RUNNING in chrome - /tests/selenium/specs/page.js
[0-1] (node:5061) DeprecationWarning: Got: "options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"
[0-1] [19:44:19] [S] [MWBOT] Login successful: Admin@http://localhost:8080/w
[0-1]
Screenshot location: /Users/user/Documents/apps/core/tests/selenium/log/Page-should-be-previewable.png
[0-1]
Screenshot location: /Users/user/Documents/apps/core/tests/selenium/log/Page-should-be-creatable.png
[0-1]
Screenshot location: /Users/user/Documents/apps/core/tests/selenium/log/Page-should-be-re-creatable.png
[0-1]
Screenshot location: /Users/user/Documents/apps/core/tests/selenium/log/Page-should-be-editable-%40daily.png
[0-1]
Screenshot location: /Users/user/Documents/apps/core/tests/selenium/log/Page-should-have-history-%40daily.png
[0-1]
Screenshot location: /Users/user/Documents/apps/core/tests/selenium/log/Page-should-be-deletable.png
[0-1]
Screenshot location: /Users/user/Documents/apps/core/tests/selenium/log/Page-should-be-restorable.png
[0-1]
Screenshot location: /Users/user/Documents/apps/core/tests/selenium/log/Page-should-be-undoable.png
[0-1] PASSED in chrome - /tests/selenium/specs/page.js
[0-2] RUNNING in chrome - /tests/selenium/specs/rollback.js
[0-2] (node:5332) DeprecationWarning: Got: "options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"
[0-2] PASSED in chrome - /tests/selenium/specs/rollback.js
[0-3] RUNNING in chrome - /tests/selenium/specs/specialrecentchanges.js
[0-3] (node:5393) DeprecationWarning: Got: "options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"
[0-3] [19:45:56] [S] [MWBOT] Login successful: Admin@http://localhost:8080/w
[0-3]
Screenshot location: /Users/user/Documents/apps/core/tests/selenium/log/Special%3ARecentChanges-shows-page-creation.png
[0-3] PASSED in chrome - /tests/selenium/specs/specialrecentchanges.js
[0-4] RUNNING in chrome - /tests/selenium/specs/specialwatchlist.js
[0-4] (node:5453) DeprecationWarning: Got: "options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"
[0-4] [19:46:10] [S] [MWBOT] Login successful: Admin@http://localhost:8080/w
[0-4]
Screenshot location: /Users/user/Documents/apps/core/tests/selenium/log/Special%3AWatchlist-should-show-page-with-new-edit.png
[0-4] PASSED in chrome - /tests/selenium/specs/specialwatchlist.js
[0-5] RUNNING in chrome - /tests/selenium/specs/user.js
[0-5] (node:5542) DeprecationWarning: Got: "options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"
[0-5] [19:46:35] [S] [MWBOT] Login successful: Admin@http://localhost:8080/w
[0-5]
Screenshot location: /Users/user/Documents/apps/core/tests/selenium/log/User-should-be-able-to-create-account.png
[0-5]
Screenshot location: /Users/user/Documents/apps/core/tests/selenium/log/User-should-be-able-to-log-in-%40daily.png
[0-5] PASSED in chrome - /tests/selenium/specs/user.js
"dot" Reporter:
....................
Spec Files: 6 passed, 6 total (100% completed) in 00:02:45
./tests/selenium/selenium.sh: line 16: kill: (4999) - No such process
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ selenium: `bash ./tests/selenium/selenium.sh`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ selenium 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/hari/.npm/_logs/2020-10-10T16_46_56_112Z-debug.log

Event Timeline

Harriet changed the title of this paste from Tests passes when running `npm run selenium` command but exit with error on Mac to Tests pass when running `npm run selenium` command but exit with error on Mac.

@Harriet are you running these inside fresh-node? It would also help if you specified what your MacOS version is along with the Node version

@Soham , yes. I'm running inside fresh-node. I'm using macOS Catalina. I managed to resolve the issue though. I realized that I had chrome driver running in a different terminal so there were port conflicts. I had to terminate the chrome driver running instance on the terminal and continue using fresh-node instead.

@Harriet it would be helpful if you could include all the commands you ran including the ones to set up MediaWiki locally.
Please include the Node version as well along with the version of any other tools you used (if relevant)

@Vidhi-Mody, do I need to include those commands in this patch(because this patch is for an error that I had encountered earlier) or should I include those commands in this patch: P12966, which has an output for the successful test results?

@Harriet include it in the paste with successful test results