You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FROM satantime/puppeteer-node:23-bookworm-slim
WORKDIR /root
# Skipping this line will cause `wdio repl firefox` to fail with "spawn xz ENOENT"# RUN apt-get update && apt-get install -y xz-utilsRUN npm init --yes wdio@latest . -- --yes
RUN npx wdio repl firefox
Running with xz-utils results in this error (as expected):
9.030 WebDriverError: Failed to start browser /tmp/firefox/linux-nightly_135.0a1/firefox/firefox: IO Error: Exec format error (os error 8) when running "http://localhost:40997/session" with method "POST"...
Running without xz-utils results in this error (the full traceback is immaterial):
Error: spawn xz ENOENT
This is because webdriverIO attempts to download the firefox tar.xz and fails to unpack it.
Firefox recently switched their nightly builds to .tar.xz compression: https://blog.nightly.mozilla.org/2024/11/28/announcing-faster-lighter-firefox-downloads-for-linux-with-tar-xz-packaging/
Newer versions of puppeteer-browsers (specifically >2.6.1) support unpacking tar.xz. However, it works by streaming contents through the
xz
process.I was therefore able to fix puppeteer builds off of satantime/puppeteer-node by installing xz into the docker container before use:
apt-get update && apt-get install -y xz-utils
The text was updated successfully, but these errors were encountered: