Page MenuHomePhabricator

Failed selenium tests in MediaWiki docker installation
Closed, ResolvedPublic

Description

I installed mediawiki following the instructions here and here. I am using nodejs 12 lts.

I am running the selenium tests using

npm ci
npm run selenium

The terminal output is

> @ selenium /home/dinp2/Desktop/mediawiki
> bash ./tests/selenium/selenium.sh

Starting ChromeDriver 80.0.3987.106 (f68069574609230cf9b635cd784cfb1bf81bb53a-refs/branch-heads/3987@{#882}) on port 4444
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.

> @ selenium-test /home/dinp2/Desktop/mediawiki
> wdio ./tests/selenium/wdio.conf.js


Execution of 6 spec files started at 2020-03-20T10:06:21.679Z

[0-0] RUNNING in chrome - /tests/selenium/wdio-mediawiki/specs/BlankPage.js
[0-0] Error in ""before each" hook"
spawn ffmpeg ENOENT
[0-0] 
        Screenshot location: /home/dinp2/Desktop/mediawiki/tests/selenium/log/BlankPage-should-have-its-title-%40daily.png 

[0-0] 2020-03-20T10:06:23.721Z ERROR webdriver: Request failed due to invalid session id: invalid session id
    at getErrorFromResponseBody (/home/dinp2/Desktop/mediawiki/node_modules/webdriver/build/utils.js:175:10)
    at Request._callback (/home/dinp2/Desktop/mediawiki/node_modules/webdriver/build/request.js:110:64)
    at Request.self.callback (/home/dinp2/Desktop/mediawiki/node_modules/request/request.js:185:22)
    at Request.emit (events.js:311:20)
    at Request.EventEmitter.emit (domain.js:482:12)
    at Request.<anonymous> (/home/dinp2/Desktop/mediawiki/node_modules/request/request.js:1161:10)
    at Request.emit (events.js:311:20)
    at Request.EventEmitter.emit (domain.js:482:12)
    at IncomingMessage.<anonymous> (/home/dinp2/Desktop/mediawiki/node_modules/request/request.js:1083:12)
    at Object.onceWrapper (events.js:417:28)
[0-0] (node:10336) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'currentRetry' of undefined
    at /home/dinp2/Desktop/mediawiki/node_modules/mocha/lib/runner.js:656:28
    at done (/home/dinp2/Desktop/mediawiki/node_modules/mocha/lib/runnable.js:334:5)
    at /home/dinp2/Desktop/mediawiki/node_modules/mocha/lib/runnable.js:398:11
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
[0-0] (node:10336) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:10336) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[0-0] FAILED in chrome - /tests/selenium/wdio-mediawiki/specs/BlankPage.js
[0-1] RUNNING in chrome - /tests/selenium/specs/page.js
[0-1] [15:36:25] [S] [MWBOT] Login successful: Admin@http://localhost:8080/
[0-1] Error in ""before each" hook"
spawn ffmpeg ENOENT
[0-1] 
        Screenshot location: /home/dinp2/Desktop/mediawiki/tests/selenium/log/Page-should-be-previewable.png 

[0-1] FAILED in chrome - /tests/selenium/specs/page.js
[0-2] RUNNING in chrome - /tests/selenium/specs/rollback.js
[0-2] PASSED in chrome - /tests/selenium/specs/rollback.js
[0-3] RUNNING in chrome - /tests/selenium/specs/specialrecentchanges.js
[0-3] [15:36:33] [S] [MWBOT] Login successful: Admin@http://localhost:8080/
[0-3] Error in ""before each" hook"
spawn ffmpeg ENOENT
[0-3] 
        Screenshot location: /home/dinp2/Desktop/mediawiki/tests/selenium/log/Special%3ARecentChanges-shows-page-creation.png 

[0-3] FAILED in chrome - /tests/selenium/specs/specialrecentchanges.js
[0-4] RUNNING in chrome - /tests/selenium/specs/specialwatchlist.js
[0-4] [15:36:36] [S] [MWBOT] Login successful: Admin@http://localhost:8080/
[0-4] Error in ""before each" hook"
spawn ffmpeg ENOENT
[0-4] 
        Screenshot location: /home/dinp2/Desktop/mediawiki/tests/selenium/log/Special%3AWatchlist-should-show-page-with-new-edit.png 

[0-4] 2020-03-20T10:06:36.737Z ERROR webdriver: Request failed due to invalid session id: invalid session id
    at getErrorFromResponseBody (/home/dinp2/Desktop/mediawiki/node_modules/webdriver/build/utils.js:175:10)
    at Request._callback (/home/dinp2/Desktop/mediawiki/node_modules/webdriver/build/request.js:110:64)
    at Request.self.callback (/home/dinp2/Desktop/mediawiki/node_modules/request/request.js:185:22)
    at Request.emit (events.js:311:20)
    at Request.EventEmitter.emit (domain.js:482:12)
    at Request.<anonymous> (/home/dinp2/Desktop/mediawiki/node_modules/request/request.js:1161:10)
    at Request.emit (events.js:311:20)
    at Request.EventEmitter.emit (domain.js:482:12)
    at IncomingMessage.<anonymous> (/home/dinp2/Desktop/mediawiki/node_modules/request/request.js:1083:12)
    at Object.onceWrapper (events.js:417:28)
    at IncomingMessage.emit (events.js:323:22)
    at IncomingMessage.EventEmitter.emit (domain.js:482:12)
    at endReadableNT (_stream_readable.js:1204:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
[0-4] invalid session id in "Special:Watchlist "before each" hook for "should show page with new edit""
invalid session id
[0-4] (node:10926) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'fail' of undefined
    at DotReporter.<anonymous> (/home/dinp2/Desktop/mediawiki/node_modules/@wdio/reporter/build/index.js:110:16)
    at DotReporter.emit (events.js:311:20)
    at DotReporter.EventEmitter.emit (domain.js:482:12)
    at /home/dinp2/Desktop/mediawiki/node_modules/@wdio/runner/build/reporter.js:38:49
    at Array.forEach (<anonymous>)
    at BaseReporter.emit (/home/dinp2/Desktop/mediawiki/node_modules/@wdio/runner/build/reporter.js:38:20)
    at MochaAdapter.emit (/home/dinp2/Desktop/mediawiki/node_modules/@wdio/mocha-framework/build/index.js:211:19)
    at Runner.emit (events.js:323:22)
    at Runner.EventEmitter.emit (domain.js:482:12)
    at Runner.fail (/home/dinp2/Desktop/mediawiki/node_modules/mocha/lib/runner.js:304:8)
    at Runner.failHook (/home/dinp2/Desktop/mediawiki/node_modules/mocha/lib/runner.js:343:8)
    at /home/dinp2/Desktop/mediawiki/node_modules/mocha/lib/runner.js:412:16
    at done (/home/dinp2/Desktop/mediawiki/node_modules/mocha/lib/runnable.js:334:5)
    at /home/dinp2/Desktop/mediawiki/node_modules/mocha/lib/runnable.js:398:11
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
[0-4] (node:10926) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:10926) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[0-4] FAILED in chrome - /tests/selenium/specs/specialwatchlist.js
[0-5] RUNNING in chrome - /tests/selenium/specs/user.js
[0-5] [15:36:38] [S] [MWBOT] Login successful: Admin@http://localhost:8080/
[0-5] Error in ""before each" hook"
spawn ffmpeg ENOENT
[0-5] 
        Screenshot location: /home/dinp2/Desktop/mediawiki/tests/selenium/log/User-should-be-able-to-create-account.png 

[0-5] FAILED in chrome - /tests/selenium/specs/user.js

 "dot" Reporter:
FF......FFF

Spec Files:      1 passed, 5 failed, 6 total (100% completed) in 00:00:17 

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ selenium-test: `wdio ./tests/selenium/wdio.conf.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ selenium-test 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!     /home/dinp2/.npm/_logs/2020-03-20T10_06_39_360Z-debug.log
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!     /home/dinp2/.npm/_logs/2020-03-20T10_06_39_400Z-debug.log

Is there any other information that I should include?

Event Timeline

Nevermind, I did not have the ffmpeg package installed. Now all 6 tests are passing.

Here is the terminal output after all 6 tests passed :

> @ selenium /home/dinp2/Desktop/mediawiki
> bash ./tests/selenium/selenium.sh

Starting ChromeDriver 80.0.3987.106 (f68069574609230cf9b635cd784cfb1bf81bb53a-refs/branch-heads/3987@{#882}) on port 4444
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.

> @ selenium-test /home/dinp2/Desktop/mediawiki
> wdio ./tests/selenium/wdio.conf.js


Execution of 6 spec files started at 2020-03-20T10:21:47.017Z

[0-0] RUNNING in chrome - /tests/selenium/wdio-mediawiki/specs/BlankPage.js
[0-0] ffmpeg stderr: [x11grab @ 0x556917d09d80] Capture area 1280x1024 at position 0.0 outside the screen size 1366x768
ffmpeg stderr: :0: Invalid argument
[0-0] 
        Video location: /home/dinp2/Desktop/mediawiki/tests/selenium/log/BlankPage-should-have-its-title-%40daily.mp4 

        ffmpeg exited with code 1 /home/dinp2/Desktop/mediawiki/tests/selenium/log/BlankPage-should-have-its-title-%40daily.mp4
[1584699708.570][SEVERE]: Timed out receiving message from renderer: 0.100
[0-0] PASSED in chrome - /tests/selenium/wdio-mediawiki/specs/BlankPage.js
[0-1] RUNNING in chrome - /tests/selenium/specs/page.js
[0-1] [15:51:50] [S] [MWBOT] Login successful: Admin@http://localhost:8080/
[0-1] ffmpeg stderr: [x11grab @ 0x55dcbfae9d80] Capture area 1280x1024 at position 0.0 outside the screen size 1366x768
[0-1] ffmpeg stderr: :0: Invalid argument
[0-1] 
        Video location: /home/dinp2/Desktop/mediawiki/tests/selenium/log/Page-should-be-previewable.mp4 

        ffmpeg exited with code 1 /home/dinp2/Desktop/mediawiki/tests/selenium/log/Page-should-be-previewable.mp4
[1584699711.720][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699711.821][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699711.922][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699712.023][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699712.125][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699712.226][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699712.327][SEVERE]: Timed out receiving message from renderer: 0.100
[0-1] ffmpeg stderr: [x11grab @ 0x564abea03d80]
[0-1] ffmpeg stderr: Capture area 1280x1024 at position 0.0 outside the screen size 1366x768
[0-1] ffmpeg stderr: :0: Invalid argument
[0-1] 
        Video location: /home/dinp2/Desktop/mediawiki/tests/selenium/log/Page-should-be-creatable.mp4 

        ffmpeg exited with code 1 /home/dinp2/Desktop/mediawiki/tests/selenium/log/Page-should-be-creatable.mp4
[1584699714.975][SEVERE]: Timed out receiving message from renderer: 0.100
[0-1] ffmpeg stderr: [x11grab @ 0x55594f4bcd80] Capture area 1280x1024 at position 0.0 outside the screen size 1366x768
ffmpeg stderr: :0: Invalid argument
[0-1] 
        Video location: /home/dinp2/Desktop/mediawiki/tests/selenium/log/Page-should-be-re-creatable.mp4 

[0-1]   ffmpeg exited with code 1 /home/dinp2/Desktop/mediawiki/tests/selenium/log/Page-should-be-re-creatable.mp4
[0-1] ffmpeg stderr: [x11grab @ 0x5566dd479d80] Capture area 1280x1024 at position 0.0 outside the screen size 1366x768
[0-1] ffmpeg stderr: :0: Invalid argument
[0-1] 
        Video location: /home/dinp2/Desktop/mediawiki/tests/selenium/log/Page-should-be-editable-%40daily.mp4 

[0-1]   ffmpeg exited with code 1 /home/dinp2/Desktop/mediawiki/tests/selenium/log/Page-should-be-editable-%40daily.mp4
[0-1] ffmpeg stderr: [x11grab @ 0x5585b08c4d80] Capture area 1280x1024 at position 0.0 outside the screen size 1366x768
[0-1] ffmpeg stderr: :0: Invalid argument
[0-1] 
        Video location: /home/dinp2/Desktop/mediawiki/tests/selenium/log/Page-should-have-history-%40daily.mp4 

[0-1]   ffmpeg exited with code 1 /home/dinp2/Desktop/mediawiki/tests/selenium/log/Page-should-have-history-%40daily.mp4
[1584699719.180][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699719.282][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699719.519][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699719.620][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699719.721][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699719.822][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699719.923][SEVERE]: Timed out receiving message from renderer: 0.100
[0-1] ffmpeg stderr: [x11grab @ 0x5587c7e07d80] Capture area 1280x1024 at position 0.0 outside the screen size 1366x768
[0-1] ffmpeg stderr: :0: Invalid argument
[0-1] 
        Video location: /home/dinp2/Desktop/mediawiki/tests/selenium/log/Page-should-be-deletable.mp4 

[0-1]   ffmpeg exited with code 1 /home/dinp2/Desktop/mediawiki/tests/selenium/log/Page-should-be-deletable.mp4
[1584699720.746][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699722.957][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699723.315][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699723.420][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699723.521][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699723.622][SEVERE]: Timed out receiving message from renderer: 0.100
[0-1] ffmpeg stderr: [x11grab @ 0x55be72d24d80] Capture area 1280x1024 at position 0.0 outside the screen size 1366x768
[0-1] ffmpeg stderr: :0: Invalid argument
[0-1] 
        Video location: /home/dinp2/Desktop/mediawiki/tests/selenium/log/Page-should-be-restorable.mp4 

[0-1]   ffmpeg exited with code 1 /home/dinp2/Desktop/mediawiki/tests/selenium/log/Page-should-be-restorable.mp4
[1584699726.181][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699726.282][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699726.384][SEVERE]: Timed out receiving message from renderer: 0.100
[0-1] ffmpeg stderr: [x11grab @ 0x555cc3665d80] Capture area 1280x1024 at position 0.0 outside the screen size 1366x768
[0-1] ffmpeg stderr: :0: Invalid argument
[0-1] 
        Video location: /home/dinp2/Desktop/mediawiki/tests/selenium/log/Page-should-be-undoable.mp4 

[0-1]   ffmpeg exited with code 1 /home/dinp2/Desktop/mediawiki/tests/selenium/log/Page-should-be-undoable.mp4
[0-1] PASSED in chrome - /tests/selenium/specs/page.js
[0-2] RUNNING in chrome - /tests/selenium/specs/rollback.js
[1584699730.634][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699732.013][SEVERE]: Timed out receiving message from renderer: 0.100
[0-2] PASSED in chrome - /tests/selenium/specs/rollback.js
[0-3] RUNNING in chrome - /tests/selenium/specs/specialrecentchanges.js
[0-3] [15:52:16] [S] [MWBOT] Login successful: Admin@http://localhost:8080/
[0-3] ffmpeg stderr: [x11grab @ 0x5615afe07d80] Capture area 1280x1024 at position 0.0 outside the screen size 1366x768
[0-3] ffmpeg stderr: :0: Invalid argument
[0-3] 
        Video location: /home/dinp2/Desktop/mediawiki/tests/selenium/log/Special%3ARecentChanges-shows-page-creation.mp4 

[0-3]   ffmpeg exited with code 1 /home/dinp2/Desktop/mediawiki/tests/selenium/log/Special%3ARecentChanges-shows-page-creation.mp4
[1584699738.896][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699738.997][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699739.098][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699739.199][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699739.300][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699739.402][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699739.503][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699739.604][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699739.705][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699739.806][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699739.908][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699740.009][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699740.110][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699740.211][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699740.312][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699740.414][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699740.515][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699740.615][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699740.716][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699740.817][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699740.918][SEVERE]: Timed out receiving message from renderer: 0.100
[0-3] PASSED in chrome - /tests/selenium/specs/specialrecentchanges.js
[0-4] RUNNING in chrome - /tests/selenium/specs/specialwatchlist.js
[0-4] [15:52:23] [S] [MWBOT] Login successful: Admin@http://localhost:8080/
[0-4] ffmpeg stderr: [x11grab @ 0x555aae82ed80] Capture area 1280x1024 at position 0.0 outside the screen size 1366x768
ffmpeg stderr: :0: Invalid argument

        Video location: /home/dinp2/Desktop/mediawiki/tests/selenium/log/Special%3AWatchlist-should-show-page-with-new-edit.mp4 

        ffmpeg exited with code 1 /home/dinp2/Desktop/mediawiki/tests/selenium/log/Special%3AWatchlist-should-show-page-with-new-edit.mp4
[1584699746.163][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699748.027][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699748.128][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699748.230][SEVERE]: Timed out receiving message from renderer: 0.100
[1584699748.460][SEVERE]: Timed out receiving message from renderer: 0.100
[0-4] PASSED in chrome - /tests/selenium/specs/specialwatchlist.js
[0-5] RUNNING in chrome - /tests/selenium/specs/user.js
[0-5] [15:52:31] [S] [MWBOT] Login successful: Admin@http://localhost:8080/
[0-5] ffmpeg stderr: [x11grab @ 0x55f1405d1d80] Capture area 1280x1024 at position 0.0 outside the screen size 1366x768
[0-5] ffmpeg stderr: :0: Invalid argument
[0-5] 
        Video location: /home/dinp2/Desktop/mediawiki/tests/selenium/log/User-should-be-able-to-create-account.mp4 

[0-5]   ffmpeg exited with code 1 /home/dinp2/Desktop/mediawiki/tests/selenium/log/User-should-be-able-to-create-account.mp4
[0-5] ffmpeg stderr: [x11grab @ 0x562892bffd80] Capture area 1280x1024 at position 0.0 outside the screen size 1366x768
[0-5] ffmpeg stderr: :0: Invalid argument
[0-5] 
        Video location: /home/dinp2/Desktop/mediawiki/tests/selenium/log/User-should-be-able-to-log-in-%40daily.mp4 

[0-5]   ffmpeg exited with code 1 /home/dinp2/Desktop/mediawiki/tests/selenium/log/User-should-be-able-to-log-in-%40daily.mp4
[1584699755.935][SEVERE]: Timed out receiving message from renderer: 0.100
[0-5] PASSED in chrome - /tests/selenium/specs/user.js

 "dot" Reporter:
....................

Spec Files:      6 passed, 6 total (100% completed) in 00:00:49