bitovi / bitovi/testee

Getting browser timed out within 120 seconds despite chrome running in background.

Open
#207 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
119
Forks
23
PR merge metrics
No merged PRs in 30d

Description

### Issue

Getting browser timed out within 120 seconds despite chrome running in background.

### Version
Ubuntu: 20.04.5 LTS
testee : 0.9.1 & 0.10.2
npm: 6.14.4
node: 10.19.0
Chrome: 108.0.5359.124

### testee.json

```
{
"port": 3621,
"root": ".",
"reporter": "Spec",
"timeout": 120,
"delay": 1000,
"tunnel": {
"type": "local"
},
"launch": {
"type": "local"
},
"browsers": [{
"browser": "chromium",
"args": [
"--headless",
"--disable-gpu",
"--no-sandbox",
"--remote-debugging-port=9222"
]
}]
}
```

### test.html

```


Menuboard Manager Studio tests




localStorage.setItem('environment', 'test');
FuncUnit = {
frameMode: true
};

QUnit.config.testTimeout = 30000; // Qunit global timeout






```

### Executing the testee

```
./node_modules/testee/bin/testee test.html --config=testee.json
```

While running the testee, the chromium-browser is running in background

```
# ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 4248 3464 pts/0 Ss 05:09 0:00 bash
root 1403 0.0 0.0 2616 528 pts/1 Ss 05:18 0:00 sh
root 1415 39.0 0.2 729804 85672 pts/0 Sl+ 05:20 0:01 node ./node_modules/testee/bin/testee test.html --config=testee.json
root 1435 11.6 0.3 33948260 106240 pts/0 Sl+ 05:20 0:00 /usr/bin/chromium-browser --headless --disable-gpu --no-sandbox --remote-debugging-port=9222 ht
root 1440 0.0 0.0 2660 580 pts/0 S+ 05:20 0:00 cat
root 1441 0.0 0.0 2660 512 pts/0 S+ 05:20 0:00 cat
root 1443 2.0 0.0 33600964 12320 ? Sl 05:20 0:00 /opt/google/chrome/chrome_crashpad_handler --monitor-self-annotation=ptype=crashpad-handler --d
root 1447 0.6 0.1 33822564 56208 pts/0 S+ 05:20 0:00 /opt/google/chrome/chrome --type=zygote --no-zygote-sandbox --no-sandbox --headless --headless
root 1448 0.6 0.1 33822564 56260 pts/0 S+ 05:20 0:00 /opt/google/chrome/chrome --type=zygote --no-sandbox --headless --headless --crashpad-handler-p
root 1462 1.0 0.1 33951608 62892 pts/0 Sl+ 05:20 0:00 /opt/google/chrome/chrome --type=gpu-process --no-sandbox --headless --ozone-platform=headless
root 1463 5.0 0.2 33888376 86212 pts/0 Sl+ 05:20 0:00 /opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang
r
```

The netstat shows the 9222 port is listening

```
# netstat -anlp | grep -i listen
tcp 0 0 127.0.0.1:9222 0.0.0.0:* LISTEN 1435/chromium-brows
tcp6 0 0 :::3621 :::* LISTEN 1415/node
```

After few minutes, i get this

```
# ./node_modules/testee/bin/testee test.html --config=testee.json

General error
1) http://localhost:3621/test.html?__token=jklg23 on {"browser":"chromium","args":["--headless","--disable-gpu","--no-sandbox","--remote-debugging-port=9222"]}

0 passing (2m)
1 failing

1) General error
http://localhost:3621/test.html?__token=jklg23 on {"browser":"chromium","args":["--headless","--disable-gpu","--no-sandbox","--remote-debugging-port=9222"]}:
Error: Browser timed out within 120 seconds
at Timeout.testTimedOut [as _onTimeout] (/usr/src/app/node_modules/testee/lib/runner.js:47:27)
at ontimeout (timers.js:436:11)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
at Timer.processTimers (timers.js:223:10)
```

## Chrome logs

```
[0108/054726.757342:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[0108/054726.757503:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory

DevTools listening on ws://127.0.0.1:9222/devtools/browser/544b342c-00af-4a52-943c-4321c033f62e
[0108/054726.762641:WARNING:bluez_dbus_manager.cc(247)] Floss manager not present, cannot set Floss enable/disable.
[0108/054726.781717:WARNING:sandbox_linux.cc(380)] InitializeSandbox() called with multiple threads in process gpu-process.
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with test.html, testee.json, and the shown ./node_modules/testee/bin/testee command. Read node_modules/testee/lib/runner.js around the timeout reported at line 47 and inspect how the Chromium launch and remote-debugging settings are handled. Done means the supplied test run completes instead of timing out within 120 seconds.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
cli, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.