garris / BackstopJS

Catch CSS curve balls.
http://backstopjs.org
MIT License
6.69k stars 604 forks source link

Sometimes: Fontconfig warning / Failed to connect to socket when running BackstopJS 6.0.4 in a docker container #1390

Open frankl7800 opened 2 years ago

frankl7800 commented 2 years ago

This error occurs sporadically, e.g. in two of 26 test runs

URL > ...
BROWSER: > HeadlessChrome/97.0.4691.0
COMMAND | Command "test" ended with an error after [46.821s]
COMMAND | Error: Failed to launch the browser process!
        Fontconfig warning: "/etc/fonts/fonts.conf", line 100: unknown element "blank"
        [0126/024642.946354:ERROR:bus.cc(397)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
        Inconsistency detected by ld.so: ../elf/dl-tls.c: 493: _dl_allocate_tls_init: Assertion `listp->slotinfo[cnt].gen <= GL(dl_tls_generation)' failed!

        TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md

            at onClose (/usr/local/lib/node_modules/backstopjs/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:229:20)
            at ChildProcess.<anonymous> (/usr/local/lib/node_modules/backstopjs/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:220:79)
            at ChildProcess.emit (events.js:387:35)
            at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)

Docker Version 20.10.12 Ubuntu Version 20.04.3 LTS

fuhlig commented 2 years ago

Had the same when running backstop with puppeteer & chrome in CI (linux) environment. https://github.com/puppeteer/puppeteer/issues/3504

This fixed it for us (conditionally for CI env):

// backstop.config
engineOptions: {
  executablePath: 'google-chrome-unstable'
}