Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Failure to run headed test after non-fatal Chromium error #614

@imiric

Description

@imiric

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

47bdfb0

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions