Attempting to run Selenium tests in mediawiki core using the instructions provided by DEVELOPERS.md, but receiving ERROR webdriver: RequestError: connect ECONNREFUSED 127.0.0.1:4444. I am using Ubuntu 20.04.1 LTS, 64-bit. Full error message at P13721.
Steps to Reproduce
- Download Mediawiki core using:
git clone ssh://<USERNAME>@gerrit.wikimedia.org:29418/mediawiki/core.git mediawiki
- Install docker and docker-compose
- Start the environment:
# -d is detached mode - runs containers in the background: docker-compose up -d
Install Composer dependencies:
docker-compose exec mediawiki composer update
Install MediaWiki in the environment:
docker-compose exec mediawiki /bin/bash /docker/install.sh
- Set environment variables, run fresh-node, npm ci, and selenium test
export MW_SERVER=http://localhost:8080 export MW_SCRIPT_PATH=/w export MEDIAWIKI_USER=Admin export MEDIAWIKI_PASSWORD=dockerpass fresh-node -env -net npm ci npm run selenium-test
Expected Results:
Run selenium tests without error.
Actual Results:
| 1 | jaredblumer@jdot:~/Desktop/mediawiki$ fresh-node -env -net |
|---|---|
| 2 | # fresh: 20.08.1 (2020-08-27) |
| 3 | # image: docker-registry.wikimedia.org/releng/node10-test-browser:0.6.2 |
| 4 | # software: Debian GNU/Linux 9 (stretch) |
| 5 | # Node.js v10.15.2 (npm 6.14.5) |
| 6 | # Chromium 71.0.3578.80 |
| 7 | # Mozilla Firefox 68.11.0esr |
| 8 | # JSDuck 5.3.4 (Ruby 2.3.3) |
| 9 | # mount: /mediawiki ➟ /home/jaredblumer/Desktop/mediawiki (read-write) |
| 10 | # /mediawiki/.git ➟ /home/jaredblumer/Desktop/mediawiki/.git (read-only) |
| 11 | # env: MW_*, MEDIAWIKI_* |
| 12 | # net: expose host |
| 13 | |
| 14 | 🌱 Fresh! |
| 15 | |
| 16 | I have no name!@jdot:/mediawiki$ npm ci |
| 17 | npm WARN prepare removing existing node_modules/ before installation |
| 18 | |
| 19 | > @ffmpeg-installer/darwin-x64@4.1.0 postinstall /mediawiki/node_modules/@ffmpeg-installer/darwin-x64 |
| 20 | > chmod u+x ffmpeg |
| 21 | |
| 22 | |
| 23 | > @ffmpeg-installer/linux-x64@4.1.0 postinstall /mediawiki/node_modules/@ffmpeg-installer/linux-x64 |
| 24 | > chmod u+x ffmpeg |
| 25 | |
| 26 | |
| 27 | > @ffmpeg-installer/linux-ia32@4.1.0 postinstall /mediawiki/node_modules/@ffmpeg-installer/linux-ia32 |
| 28 | > chmod u+x ffmpeg |
| 29 | |
| 30 | |
| 31 | > @ffmpeg-installer/linux-arm64@4.1.4 postinstall /mediawiki/node_modules/@ffmpeg-installer/linux-arm64 |
| 32 | > chmod u+x ffmpeg |
| 33 | |
| 34 | |
| 35 | > @ffmpeg-installer/linux-arm@4.1.3 postinstall /mediawiki/node_modules/@ffmpeg-installer/linux-arm |
| 36 | > chmod u+x ffmpeg |
| 37 | |
| 38 | |
| 39 | > fibers@4.0.3 install /mediawiki/node_modules/fibers |
| 40 | > node build.js || nodejs build.js |
| 41 | |
| 42 | `linux-x64-64-glibc` exists; testing |
| 43 | Binary is fine; exiting |
| 44 | |
| 45 | > sauce-connect-launcher-update@1.3.2 postinstall /mediawiki/node_modules/sauce-connect-launcher-update |
| 46 | > node scripts/install.js || nodejs scripts/install.js |
| 47 | |
| 48 | |
| 49 | > core-js@3.6.5 postinstall /mediawiki/node_modules/core-js |
| 50 | > node -e "try{require('./postinstall')}catch(e){}" |
| 51 | |
| 52 | Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library! |
| 53 | |
| 54 | The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: |
| 55 | > https://opencollective.com/core-js |
| 56 | > https://www.patreon.com/zloirock |
| 57 | |
| 58 | Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -) |
| 59 | |
| 60 | added 1550 packages in 175.413s |
| 61 | I have no name!@jdot:/mediawiki$ npm run selenium |
| 62 | npm ERR! missing script: selenium |
| 63 | |
| 64 | npm ERR! A complete log of this run can be found in: |
| 65 | npm ERR! /cache/_logs/2021-01-12T00_32_14_739Z-debug.log |
| 66 | I have no name!@jdot:/mediawiki$ npm run selenium-test |
| 67 | |
| 68 | > @ selenium-test /mediawiki |
| 69 | > wdio ./tests/selenium/wdio.conf.js |
| 70 | |
| 71 | |
| 72 | Execution of 6 spec files started at 2021-01-12T00:32:27.688Z |
| 73 | |
| 74 | (node:85) ExperimentalWarning: The dns.promises API is experimental |
| 75 | (node:85) ExperimentalWarning: The fs.promises API is experimental |
| 76 | [0-0] (node:94) ExperimentalWarning: The dns.promises API is experimental |
| 77 | [0-0] (node:94) ExperimentalWarning: The fs.promises API is experimental |
| 78 | [0-0] RUNNING in chrome - /tests/selenium/wdio-mediawiki/specs/BlankPage.js |
| 79 | [0-0] (node:94) DeprecationWarning: Got: "options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized" |
| 80 | [0-0] 2021-01-12T00:32:29.287Z ERROR webdriver: RequestError: connect ECONNREFUSED 127.0.0.1:4444 |
| 81 | at ClientRequest.request.once (/mediawiki/node_modules/got/dist/source/core/index.js:940:25) |
| 82 | at Object.onceWrapper (events.js:277:13) |
| 83 | at ClientRequest.emit (events.js:194:15) |
| 84 | at ClientRequest.EventEmitter.emit (domain.js:441:20) |
| 85 | at ClientRequest.origin.emit.args (/mediawiki/node_modules/@szmarczak/http-timer/dist/source/index.js:39:20) |
| 86 | at Socket.socketErrorListener (_http_client.js:392:9) |
| 87 | at Socket.emit (events.js:189:13) |
| 88 | at Socket.EventEmitter.emit (domain.js:441:20) |
| 89 | at emitErrorNT (internal/streams/destroy.js:82:8) |
| 90 | at emitErrorAndCloseNT (internal/streams/destroy.js:50:3) |
| 91 | at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1104:14) |
| 92 | [0-0] 2021-01-12T00:32:29.289Z ERROR @wdio/runner: Error: Failed to create session. |
| 93 | Unable to connect to "http://127.0.0.1:4444/wd/hub", make sure browser driver is running on that address. |
| 94 | If you use services like chromedriver see initialiseServices logs above or in wdio.log file as the service might had problems to start the driver. |
| 95 | at startWebDriverSession (/mediawiki/node_modules/webdriver/build/utils.js:45:11) |
| 96 | at process._tickCallback (internal/process/next_tick.js:68:7) |
| 97 | [0-0] Error: Failed to create session. |
| 98 | Unable to connect to "http://127.0.0.1:4444/wd/hub", make sure browser driver is running on that address. |
| 99 | If you use services like chromedriver see initialiseServices logs above or in wdio.log file as the service might had problems to start the driver. |
| 100 | [0-0] 2021-01-12T00:32:34.303Z ERROR @wdio/runner: Error: Some reporters are still unsynced: Video |
| 101 | at Timeout.setInterval (/mediawiki/node_modules/@wdio/runner/build/reporter.js:86:25) |
| 102 | at ontimeout (timers.js:436:11) |
| 103 | at tryOnTimeout (timers.js:300:5) |
| 104 | at listOnTimeout (timers.js:263:5) |
| 105 | at Timer.processTimers (timers.js:223:10) |
| 106 | [0-0] FAILED in chrome - /tests/selenium/wdio-mediawiki/specs/BlankPage.js |
| 107 | [0-1] (node:107) ExperimentalWarning: The dns.promises API is experimental |
| 108 | [0-1] (node:107) ExperimentalWarning: The fs.promises API is experimental |
| 109 | [0-1] RUNNING in chrome - /tests/selenium/specs/page.js |
| 110 | [0-1] (node:107) DeprecationWarning: Got: "options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized" |
| 111 | [0-1] 2021-01-12T00:32:36.292Z ERROR webdriver: RequestError: connect ECONNREFUSED 127.0.0.1:4444 |
| 112 | at ClientRequest.request.once (/mediawiki/node_modules/got/dist/source/core/index.js:940:25) |
| 113 | at Object.onceWrapper (events.js:277:13) |
| 114 | at ClientRequest.emit (events.js:194:15) |
| 115 | at ClientRequest.EventEmitter.emit (domain.js:441:20) |
| 116 | at ClientRequest.origin.emit.args (/mediawiki/node_modules/@szmarczak/http-timer/dist/source/index.js:39:20) |
| 117 | at Socket.socketErrorListener (_http_client.js:392:9) |
| 118 | at Socket.emit (events.js:189:13) |
| 119 | at Socket.EventEmitter.emit (domain.js:441:20) |
| 120 | at emitErrorNT (internal/streams/destroy.js:82:8) |
| 121 | at emitErrorAndCloseNT (internal/streams/destroy.js:50:3) |
| 122 | at process._tickCallback (internal/process/next_tick.js:63:19) |
| 123 | at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1104:14) |
| 124 | 2021-01-12T00:32:36.295Z ERROR @wdio/runner: Error: Failed to create session. |
| 125 | Unable to connect to "http://127.0.0.1:4444/wd/hub", make sure browser driver is running on that address. |
| 126 | If you use services like chromedriver see initialiseServices logs above or in wdio.log file as the service might had problems to start the driver. |
| 127 | at startWebDriverSession (/mediawiki/node_modules/webdriver/build/utils.js:45:11) |
| 128 | at process._tickCallback (internal/process/next_tick.js:68:7) |
| 129 | [0-1] Error: Failed to create session. |
| 130 | Unable to connect to "http://127.0.0.1:4444/wd/hub", make sure browser driver is running on that address. |
| 131 | If you use services like chromedriver see initialiseServices logs above or in wdio.log file as the service might had problems to start the driver. |
| 132 | [0-1] 2021-01-12T00:32:41.310Z ERROR @wdio/runner: Error: Some reporters are still unsynced: Video |
| 133 | at Timeout.setInterval (/mediawiki/node_modules/@wdio/runner/build/reporter.js:86:25) |
| 134 | at ontimeout (timers.js:436:11) |
| 135 | at tryOnTimeout (timers.js:300:5) |
| 136 | at listOnTimeout (timers.js:263:5) |
| 137 | at Timer.processTimers (timers.js:223:10) |
| 138 | [0-1] FAILED in chrome - /tests/selenium/specs/page.js |
| 139 | [0-2] (node:120) ExperimentalWarning: The dns.promises API is experimental |
| 140 | [0-2] (node:120) ExperimentalWarning: The fs.promises API is experimental |
| 141 | [0-2] RUNNING in chrome - /tests/selenium/specs/rollback.js |
| 142 | [0-2] (node:120) DeprecationWarning: Got: "options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized" |
| 143 | [0-2] 2021-01-12T00:32:43.214Z ERROR webdriver: RequestError: connect ECONNREFUSED 127.0.0.1:4444 |
| 144 | at ClientRequest.request.once (/mediawiki/node_modules/got/dist/source/core/index.js:940:25) |
| 145 | at Object.onceWrapper (events.js:277:13) |
| 146 | at ClientRequest.emit (events.js:194:15) |
| 147 | at ClientRequest.EventEmitter.emit (domain.js:441:20) |
| 148 | at ClientRequest.origin.emit.args (/mediawiki/node_modules/@szmarczak/http-timer/dist/source/index.js:39:20) |
| 149 | at Socket.socketErrorListener (_http_client.js:392:9) |
| 150 | at Socket.emit (events.js:189:13) |
| 151 | at Socket.EventEmitter.emit (domain.js:441:20) |
| 152 | at emitErrorNT (internal/streams/destroy.js:82:8) |
| 153 | at emitErrorAndCloseNT (internal/streams/destroy.js:50:3) |
| 154 | at process._tickCallback (internal/process/next_tick.js:63:19) |
| 155 | at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1104:14) |
| 156 | 2021-01-12T00:32:43.217Z ERROR @wdio/runner: Error: Failed to create session. |
| 157 | Unable to connect to "http://127.0.0.1:4444/wd/hub", make sure browser driver is running on that address. |
| 158 | If you use services like chromedriver see initialiseServices logs above or in wdio.log file as the service might had problems to start the driver. |
| 159 | at startWebDriverSession (/mediawiki/node_modules/webdriver/build/utils.js:45:11) |
| 160 | at process._tickCallback (internal/process/next_tick.js:68:7) |
| 161 | [0-2] Error: Failed to create session. |
| 162 | Unable to connect to "http://127.0.0.1:4444/wd/hub", make sure browser driver is running on that address. |
| 163 | If you use services like chromedriver see initialiseServices logs above or in wdio.log file as the service might had problems to start the driver. |
| 164 | [0-2] 2021-01-12T00:32:48.230Z ERROR @wdio/runner: Error: Some reporters are still unsynced: Video |
| 165 | at Timeout.setInterval (/mediawiki/node_modules/@wdio/runner/build/reporter.js:86:25) |
| 166 | at ontimeout (timers.js:436:11) |
| 167 | at tryOnTimeout (timers.js:300:5) |
| 168 | at listOnTimeout (timers.js:263:5) |
| 169 | at Timer.processTimers (timers.js:223:10) |
| 170 | [0-2] FAILED in chrome - /tests/selenium/specs/rollback.js |
| 171 | [0-3] (node:133) ExperimentalWarning: The dns.promises API is experimental |
| 172 | [0-3] (node:133) ExperimentalWarning: The fs.promises API is experimental |
| 173 | [0-3] RUNNING in chrome - /tests/selenium/specs/specialrecentchanges.js |
| 174 | [0-3] (node:133) DeprecationWarning: Got: "options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized" |
| 175 | [0-3] 2021-01-12T00:32:50.088Z ERROR webdriver: RequestError: connect ECONNREFUSED 127.0.0.1:4444 |
| 176 | at ClientRequest.request.once (/mediawiki/node_modules/got/dist/source/core/index.js:940:25) |
| 177 | at Object.onceWrapper (events.js:277:13) |
| 178 | at ClientRequest.emit (events.js:194:15) |
| 179 | at ClientRequest.EventEmitter.emit (domain.js:441:20) |
| 180 | at ClientRequest.origin.emit.args (/mediawiki/node_modules/@szmarczak/http-timer/dist/source/index.js:39:20) |
| 181 | at Socket.socketErrorListener (_http_client.js:392:9) |
| 182 | at Socket.emit (events.js:189:13) |
| 183 | at Socket.EventEmitter.emit (domain.js:441:20) |
| 184 | at emitErrorNT (internal/streams/destroy.js:82:8) |
| 185 | at emitErrorAndCloseNT (internal/streams/destroy.js:50:3) |
| 186 | at process._tickCallback (internal/process/next_tick.js:63:19) |
| 187 | at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1104:14) |
| 188 | [0-3] 2021-01-12T00:32:50.090Z ERROR @wdio/runner: Error: Failed to create session. |
| 189 | Unable to connect to "http://127.0.0.1:4444/wd/hub", make sure browser driver is running on that address. |
| 190 | If you use services like chromedriver see initialiseServices logs above or in wdio.log file as the service might had problems to start the driver. |
| 191 | at startWebDriverSession (/mediawiki/node_modules/webdriver/build/utils.js:45:11) |
| 192 | at process._tickCallback (internal/process/next_tick.js:68:7) |
| 193 | [0-3] Error: Failed to create session. |
| 194 | Unable to connect to "http://127.0.0.1:4444/wd/hub", make sure browser driver is running on that address. |
| 195 | If you use services like chromedriver see initialiseServices logs above or in wdio.log file as the service might had problems to start the driver. |
| 196 | [0-3] 2021-01-12T00:32:55.104Z ERROR @wdio/runner: Error: Some reporters are still unsynced: Video |
| 197 | at Timeout.setInterval (/mediawiki/node_modules/@wdio/runner/build/reporter.js:86:25) |
| 198 | at ontimeout (timers.js:436:11) |
| 199 | at tryOnTimeout (timers.js:300:5) |
| 200 | at listOnTimeout (timers.js:263:5) |
| 201 | at Timer.processTimers (timers.js:223:10) |
| 202 | [0-3] FAILED in chrome - /tests/selenium/specs/specialrecentchanges.js |
| 203 | [0-4] (node:146) ExperimentalWarning: The dns.promises API is experimental |
| 204 | [0-4] (node:146) ExperimentalWarning: The fs.promises API is experimental |
| 205 | [0-4] RUNNING in chrome - /tests/selenium/specs/specialwatchlist.js |
| 206 | [0-4] (node:146) DeprecationWarning: Got: "options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized" |
| 207 | [0-4] 2021-01-12T00:32:56.846Z ERROR webdriver: RequestError: connect ECONNREFUSED 127.0.0.1:4444 |
| 208 | at ClientRequest.request.once (/mediawiki/node_modules/got/dist/source/core/index.js:940:25) |
| 209 | at Object.onceWrapper (events.js:277:13) |
| 210 | at ClientRequest.emit (events.js:194:15) |
| 211 | at ClientRequest.EventEmitter.emit (domain.js:441:20) |
| 212 | at ClientRequest.origin.emit.args (/mediawiki/node_modules/@szmarczak/http-timer/dist/source/index.js:39:20) |
| 213 | at Socket.socketErrorListener (_http_client.js:392:9) |
| 214 | at Socket.emit (events.js:189:13) |
| 215 | at Socket.EventEmitter.emit (domain.js:441:20) |
| 216 | at emitErrorNT (internal/streams/destroy.js:82:8) |
| 217 | at emitErrorAndCloseNT (internal/streams/destroy.js:50:3) |
| 218 | at process._tickCallback (internal/process/next_tick.js:63:19) |
| 219 | at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1104:14) |
| 220 | [0-4] 2021-01-12T00:32:56.849Z ERROR @wdio/runner: Error: Failed to create session. |
| 221 | Unable to connect to "http://127.0.0.1:4444/wd/hub", make sure browser driver is running on that address. |
| 222 | If you use services like chromedriver see initialiseServices logs above or in wdio.log file as the service might had problems to start the driver. |
| 223 | at startWebDriverSession (/mediawiki/node_modules/webdriver/build/utils.js:45:11) |
| 224 | at process._tickCallback (internal/process/next_tick.js:68:7) |
| 225 | [0-4] Error: Failed to create session. |
| 226 | Unable to connect to "http://127.0.0.1:4444/wd/hub", make sure browser driver is running on that address. |
| 227 | If you use services like chromedriver see initialiseServices logs above or in wdio.log file as the service might had problems to start the driver. |
| 228 | [0-4] 2021-01-12T00:33:01.866Z ERROR @wdio/runner: Error: Some reporters are still unsynced: Video |
| 229 | at Timeout.setInterval (/mediawiki/node_modules/@wdio/runner/build/reporter.js:86:25) |
| 230 | at ontimeout (timers.js:436:11) |
| 231 | at tryOnTimeout (timers.js:300:5) |
| 232 | at listOnTimeout (timers.js:263:5) |
| 233 | at Timer.processTimers (timers.js:223:10) |
| 234 | [0-4] FAILED in chrome - /tests/selenium/specs/specialwatchlist.js |
| 235 | [0-5] (node:159) ExperimentalWarning: The dns.promises API is experimental |
| 236 | [0-5] (node:159) ExperimentalWarning: The fs.promises API is experimental |
| 237 | [0-5] RUNNING in chrome - /tests/selenium/specs/user.js |
| 238 | [0-5] (node:159) DeprecationWarning: Got: "options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized" |
| 239 | [0-5] 2021-01-12T00:33:03.614Z ERROR webdriver: RequestError: connect ECONNREFUSED 127.0.0.1:4444 |
| 240 | at ClientRequest.request.once (/mediawiki/node_modules/got/dist/source/core/index.js:940:25) |
| 241 | at Object.onceWrapper (events.js:277:13) |
| 242 | at ClientRequest.emit (events.js:194:15) |
| 243 | at ClientRequest.EventEmitter.emit (domain.js:441:20) |
| 244 | at ClientRequest.origin.emit.args (/mediawiki/node_modules/@szmarczak/http-timer/dist/source/index.js:39:20) |
| 245 | at Socket.socketErrorListener (_http_client.js:392:9) |
| 246 | at Socket.emit (events.js:189:13) |
| 247 | at Socket.EventEmitter.emit (domain.js:441:20) |
| 248 | at emitErrorNT (internal/streams/destroy.js:82:8) |
| 249 | at emitErrorAndCloseNT (internal/streams/destroy.js:50:3) |
| 250 | at process._tickCallback (internal/process/next_tick.js:63:19) |
| 251 | at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1104:14) |
| 252 | [0-5] 2021-01-12T00:33:03.616Z ERROR @wdio/runner: Error: Failed to create session. |
| 253 | Unable to connect to "http://127.0.0.1:4444/wd/hub", make sure browser driver is running on that address. |
| 254 | If you use services like chromedriver see initialiseServices logs above or in wdio.log file as the service might had problems to start the driver. |
| 255 | at startWebDriverSession (/mediawiki/node_modules/webdriver/build/utils.js:45:11) |
| 256 | at process._tickCallback (internal/process/next_tick.js:68:7) |
| 257 | [0-5] Error: Failed to create session. |
| 258 | Unable to connect to "http://127.0.0.1:4444/wd/hub", make sure browser driver is running on that address. |
| 259 | If you use services like chromedriver see initialiseServices logs above or in wdio.log file as the service might had problems to start the driver. |
| 260 | [0-5] 2021-01-12T00:33:08.632Z ERROR @wdio/runner: Error: Some reporters are still unsynced: Video |
| 261 | at Timeout.setInterval (/mediawiki/node_modules/@wdio/runner/build/reporter.js:86:25) |
| 262 | at ontimeout (timers.js:436:11) |
| 263 | at tryOnTimeout (timers.js:300:5) |
| 264 | at listOnTimeout (timers.js:263:5) |
| 265 | at Timer.processTimers (timers.js:223:10) |
| 266 | [0-5] FAILED in chrome - /tests/selenium/specs/user.js |
| 267 | |
| 268 | Spec Files: 0 passed, 6 failed, 6 total (100% completed) in 00:00:40 |
| 269 | |
| 270 | npm ERR! code ELIFECYCLE |
| 271 | npm ERR! errno 1 |
| 272 | npm ERR! @ selenium-test: `wdio ./tests/selenium/wdio.conf.js` |
| 273 | npm ERR! Exit status 1 |
| 274 | npm ERR! |
| 275 | npm ERR! Failed at the @ selenium-test script. |
| 276 | npm ERR! This is probably not a problem with npm. There is likely additional logging output above. |
| 277 | |
| 278 | npm ERR! A complete log of this run can be found in: |
| 279 | npm ERR! /cache/_logs/2021-01-12T00_33_08_916Z-debug.log |