gildas-lormeau / single-file-cli

CLI tool for saving a faithful copy of a complete web page in a single HTML file (based on SingleFile)
GNU Affero General Public License v3.0
602 stars 63 forks source link

Failed to launch the browser process! (Apple Silicon) #33

Closed turian closed 2 days ago

turian commented 1 year ago

Running from the README:

joseph@Josephs-MacBook-Air ~/d/easypin (fastapi2)> docker pull capsulecode/singlefile                                                                                                                                                                  (base)

Using default tag: latest
latest: Pulling from capsulecode/singlefile
8921db27df28: Pull complete
7acbef36938e: Pull complete
d8066cda4048: Pull complete
04686419c3aa: Pull complete
4f4fb700ef54: Pull complete
198871f01b71: Pull complete
7eac83a8531f: Pull complete
Digest: sha256:f307b2b87df68835c5397b7f7e77a55af8e1abfea140cbc15c49d6d89e1b4b52
Status: Downloaded newer image for capsulecode/singlefile:latest
docker.io/capsulecode/singlefile:latest
joseph@Josephs-MacBook-Air ~/d/easypin (fastapi2)> docker tag capsulecode/singlefile singlefile                                                                                                                                                        (base)

joseph@Josephs-MacBook-Air ~/d/easypin (fastapi2)> docker run singlefile "https://www.wikipedia.org"                                                                                                                                                   (base)
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Failed to launch the browser process!
qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
qemu: uncaught target signal 11 (Segmentation fault) - core dumped

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

This is on OSX.

gildas-lormeau commented 1 year ago

Is your CPU an Apple Silicon (M1 or M2) or an Intel CPU?

viranribic commented 1 year ago

Encountered the same problem on M1 Apple Silicon. Solutions was to follow "Manual installation" Docker build steps described in README.md:

git clone --depth 1 --recursive https://github.com/gildas-lormeau/single-file-cli.git

cd single-file-cli

docker build --no-cache -t singlefile .

Running commands like docker run singlefile "https://www.wikipedia.org" then worked without issue.

turian commented 1 year ago

Is your CPU an Apple Silicon (M1 or M2) or an Intel CPU?

Apple Silicon

gildas-lormeau commented 2 days ago

This issue should be fixed in the latest version on Docker Hub which is now available for arm64.