-
Notifications
You must be signed in to change notification settings - Fork 44
Failure to run headed test after non-fatal Chromium error #614
Description
Brief summary
After #598, and since a couple of days ago, possibly after a system update (Linux), I'm not able to launch headed tests on main
(47bdfb0). They fail with:
ERRO[0000] GoError: launching browser: Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
This is probably some dbus
misconfiguration on my machine that I don't care about fixing, but the interesting thing is that this is not a fatal error. I.e. if I ignore this and continue to parse stderr, Chromium will output the DevTools URL and start correctly, allowing me to run a headed test without issues.
Considering there might be other non-fatal errors, this introduces a needless abort of the test when it could actually continue.
This is my full stderr:
(chromium:23400): Gtk-WARNING **: 11:54:55.838: Theme parsing error: gtk.css:3611:22: 'none' is not a valid color name
[23400:23418:1028/115455.877614:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[23400:23418:1028/115455.877661:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[23400:23418:1028/115455.898207:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[23400:23418:1028/115455.898231:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
DevTools listening on ws://127.0.0.1:41315/devtools/browser/d1d3f8eb-b362-4f12-9370-bd25778d0da7
Suggested solution
We need to have a safer way of parsing stderr. Possibly introduce a timeout for getting the DevTools URL, and only if that is expired, then return the first error found on stderr.
xk6-browser version
OS
Linux
Chrome version
106.0.5249.103
Docker version and image (if applicable)
N/A
Steps to reproduce the problem
Start any script with headless: false
on a machine that launches Chromium with some non-fatal error (e.g. try stopping the dbus
service).
Expected behaviour
The test run should proceed without issues.
Actual behaviour
The test run is aborted.