[BUG] XVFB error when running docker compose multiple times
fukouda opened this issue · comments
nas commented
Describe the bug
After running docker compose up
consecutively, we get this error from Xvfb and the browser API fails to launch:
Attaching to api-1, ui-1
api-1 | Starting nginx...
api-1 | Starting dbus...
api-1 | dbus-daemon[14]: Failed to start message bus: The pid file "/run/dbus/pid" exists, if the message bus is not running, remove this file
api-1 | Starting Xvfb...
api-1 | (EE)
api-1 | Fatal server error:
api-1 | (EE) Server is already active for display 10
api-1 | If this server is no longer running, remove /tmp/.X10-lock
api-1 | and start again.
api-1 | (EE)
ui-1 |
ui-1 | > @steel/ui@0.0.0 start
ui-1 | > serve dist -l 5173
ui-1 |
ui-1 | INFO Accepting connections at http://localhost:5173
api-1 |
api-1 | > steel-browser@1.0.0 start
api-1 | > node ./build/index.js
api-1 |
api-1 | Launch args [
api-1 | '--remote-allow-origins=*',
api-1 | '--disable-dev-shm-usage',
api-1 | '--disable-gpu',
api-1 | '--start-maximized',
api-1 | '--remote-debugging-address=127.0.0.1',
api-1 | '--remote-debugging-port=9222',
api-1 | '--no-sandbox',
api-1 | '--disable-setuid-sandbox',
api-1 | '--use-angle=disabled',
api-1 | '--disable-blink-features=AutomationControlled',
api-1 | '--disable-software-rasterizer',
api-1 | '--unsafely-treat-insecure-origin-as-secure=http://0.0.0.0:3000,http://localhost:3000',
api-1 | '--window-size=1920,1080',
api-1 | '--timezone=America/New_York',
api-1 | '--load-extension=/app/extensions/recorder',
api-1 | '--disable-extensions-except=/app/extensions/recorder'
api-1 | ]
api-1 | /app/node_modules/@puppeteer/browsers/lib/cjs/launch.js:310
api-1 | reject(new Error([
api-1 | ^
api-1 |
api-1 | Error: Failed to launch the browser process! undefined
api-1 | [39:39:1205/015140.002759:ERROR:browser_dm_token_storage_linux.cc(105)] Error: /etc/machine-id contains 0 characters (32 were expected).
api-1 | [39:61:1205/015140.080574:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: Connection refused
api-1 | [39:39:1205/015140.092930:ERROR:ozone_platform_x11.cc(244)] Missing X server or $DISPLAY
api-1 | [39:39:1205/015140.092948:ERROR:env.cc(258)] The platform failed to initialize. Exiting.
api-1 |
api-1 |
api-1 | TROUBLESHOOTING: https://pptr.dev/troubleshooting
api-1 |
api-1 | at ChildProcess.onClose (/app/node_modules/@puppeteer/browsers/lib/cjs/launch.js:310:24)
api-1 | at ChildProcess.emit (node:events:530:35)
api-1 | at ChildProcess._handle.onexit (node:internal/child_process:294:12)
api-1 |
api-1 | Node.js v20.12.0
To Reproduce
Steps to reproduce the behavior:
- Clone repo and run
docker compose up
- Exit using CTRL+C
- Run
docker compose
again (repeat from 1 to 3 if need be) - See error
Expected behavior
The browser API should boot up correctly and receive requests.
Desktop (please complete the following information):
- OS: macOS 14.2.1 (23C71) M1 Pro
- Browser: chrome lol
Additional context
Might be related to entrypoint.sh
?
Darren commented