7

I am trying to launch Chrome in CentOS using puppeteer but got errors like this:

[8012:8039:1220/204633.586208:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[8012:8039:1220/204633.586325:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[8012:8039:1220/204633.595443:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[8012:8039:1220/204633.595473:ERROR:bus.cc(393)] 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:48513/devtools/browser/ede9735a-7c4d-49db-a5c7-a1da0240b889
[8012:8039:1220/204633.619981:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[8012:8039:1220/204633.620005:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[8053:8053:1220/204633.631524:ERROR:sandbox_linux.cc(376)] InitializeSandbox() called with multiple threads in process gpu-process.
[8012:8105:1220/204633.665302:ERROR:object_proxy.cc(642)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
[8012:8105:1220/204633.665437:ERROR:object_proxy.cc(642)] Failed to call method: org.freedesktop.UPower.GetDisplayDevice: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
[8012:8105:1220/204633.665551:ERROR:object_proxy.cc(642)] Failed to call method: org.freedesktop.UPower.EnumerateDevices: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
[8012:8031:1220/204636.666514:ERROR:chrome_browser_main_extra_parts_metrics.cc(226)] crbug.com/1216328: Checking Bluetooth availability started. Please report if there is no report that this ends.
[8012:8031:1220/204636.666536:ERROR:chrome_browser_main_extra_parts_metrics.cc(229)] crbug.com/1216328: Checking Bluetooth availability ended.
[8012:8031:1220/204636.666544:ERROR:chrome_browser_main_extra_parts_metrics.cc(232)] crbug.com/1216328: Checking default browser status started. Please report if there is no report that this ends.
[8012:8031:1220/204636.680997:ERROR:chrome_browser_main_extra_parts_metrics.cc(236)] crbug.com/1216328: Checking default browser status ended.

The code I launch Chrome is as below:

const options = {
  headless: false,
  executablePath: '/usr/bin/google-chrome-stable',
  dumpio: true,
  args: [
    '--autoplay-policy=no-user-gesture-required',
    '--enable-usermedia-screen-capturing',
    '--allow-http-screen-capture',
    '--disable-infobars',
    '--disable-dev-shm-usage',
    '--disable-background-timer-throttling',
    '--window-size=1344,1080',
    '--unsafely-treat-insecure-origin-as-secure=http://127.0.0.1:3000',
    '--no-sandbox',
    '--disable-setuid-sandbox',
  ],
  userDataDir: '/tmp/user-data-dir-instance-1'
}

const browser = await puppeteer.launch(options);

I have started Xvfb:

Xvfb :1 -screen 0 1344x1080x24 +extension RANDR &

and run index.ts which the code above in it to launch Chrome using the user root:

export DISPLAY=1 MODE=development && ts-node -T -P tsconfig.json src/service/video/index.ts

I am using puppeteer 13.0.0 and Chrome 96.0.4664.93. Although Chrome has been launched successfully, those errors make me worried and I want to know what happened. Anyone have some idea about this? Thanks very much!

lakerchen
  • 71
  • 1
  • 1
  • 3
  • 1
    Have you managed to sort it? I encounter the same message on GHA pipelines. – sorin Jan 18 '22 at 09:47
  • 1
    you need to export one more env `DBUS_SESSION_BUS_ADDRESS`. In my case it was `DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus` – Scalway Feb 25 '22 at 15:50
  • @Scalway where did you export that, in the GH actions env variables or in a bashrc file or an image config? sorin, I'm also experiencing this using a self-hosted runner on GH actions pipelines with Cypress chrome tests running in parallel (and I usually only see this on cold-start) – josh803316 May 12 '22 at 21:00

0 Answers0