Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include xz as a dependency for extracting firefox builds #26

Open
albertyw opened this issue Dec 17, 2024 · 2 comments · May be fixed by #27
Open

Include xz as a dependency for extracting firefox builds #26

albertyw opened this issue Dec 17, 2024 · 2 comments · May be fixed by #27

Comments

@albertyw
Copy link

albertyw commented Dec 17, 2024

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

@albertyw albertyw linked a pull request Dec 17, 2024 that will close this issue
@satanTime
Copy link
Owner

Hi @albertyw, thanks for reporting.

Cold you give me an example of Dockerfile you use to install firefox and which throws the error?

The thing is that there are quite a few builds which will be affected, and I would like to investigate a possible fix with lower impact.

@albertyw
Copy link
Author

I'm using webdriverIO so I can give:

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-utils
RUN 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants