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
Crashes on Apple Silicon #152
Comments
Hi @jackHedaya 👋 Thanks for the feedback. 👍 Can you share information about your Thanks! |
Thank you for reaching out and sure! Dockerfile
docker-compose.yml
Puppeteer Initializer protected async createBrowser(
args?: import('puppeteer').LaunchOptions
): Promise<import('puppeteer').Browser> {
return puppeteer.launch({
headless: true,
args: ['--no-sandbox', '--disable-setuid-sandbox'],
...args,
})
} |
Hi @jackHedaya Thanks for the example! 👍 |
I've never encountered this problem before while using an Intel Mac |
I have the same issue on apple silicon. Any news on this? |
Hi @jackHedaya @Joebayld 👋 Sorry but I didn't have a Apple Silicon. 😊 Have you seen this issue from the Puppeteer side? Please notice that I don't know how Docker is working on Apple Silicon. It's a ARM based computer. Perhaps you could make some tests to discover where is the problem...
|
I only have Apple Silicon so that's all I can test at the moment! Lol The issue doesn't exist when running outside the docker image (npm start), and it doesn't exist when deploying to a Google Cloud Run server. So it seems to only be Docker on macOS AS. I can run that example container just fine. And I can also run the alpine-chrome container as well - I just get an error when making calls to puppeteer in the container. I'll poke the puppeteer folks as it might be an issue with the library - I'm not sure! |
Hi @Joebayld 👋 Thanks for the update! 🙌 |
Hi @Joebayld @jackHedaya 👋 Does it work now on Apple Silicon? 😊 |
Any news @Joebayld @jackHedaya ? 😊 |
Hi! As of now it is not working, I believe it may be a puppeteer problem though. It seems to be attached to this issue |
Hi @jackHedaya Thanks for the update! 👍 |
puppeteer/puppeteer#1947 (comment) helped me solve this issue |
Hi @jlandure, are there any plans to publish a multi-arch image on Docker Hub for |
I was running into crashes using my new MacBook M1 Air whereas my previous Intel MacBook had no issues. Ended up building my own version of this with an arm64v8 alpine image and my crash issue was resolved. You can find the image at avidtraveler/alpine-chrome. |
That's great, @ssoper! Could you please publish your customized Dockerfile and its context files if possible? |
Hi @jlandure, what's the image build process that you use? I'd love to contribute to making this repo multi-arch as well :) |
Hi @drpayyne Thanks for your motivation 💪 Very simple: the build process is done using Docker Hub AutoBuild. 💬 If you're interested, please create a PR and we will discuss about making the repo multi-arch! |
Is there a reason we need to use that specific image? I've been working on rebuilding existing images for both architectures so all that we need to do is rebuild our images for both platforms. We have to maybe customize the images a little, but I'll need to look into the specifics for this repository. Let me get back on this with a PR. |
@drpayyne when I specified the platform in the docker command to retrieve and run the image, it claimed there was no such platform. docker: Error response from daemon: image with reference zenika/alpine-chrome was found but does not match the specified platform: wanted linux/arm64/v8, actual: linux/amd64. |
Yes, you're right. This repository's images (
So we can continue using So effectively we just need to rebuild the same Dockerfile for ARM. Note: Some Dockerfiles here like puppeteer need some customization which I'll be looking into once I fix my PHP rebuild :) |
@ssoper - I've just rebuilt the base image of this repository for both architecture at https://github.com/drpayyne/chrome/pkgs/container/chrome. All users can pull this tag and it'll download the appropriate architecture. |
@drpayyne did it resolve your crash issue? |
I'm not sure as to what exactly is causing the crash reported here, but you could test it out by running |
the crashes I was seeing locally were related to being unable to parse |
Any specific commands that I need to test? @ssoper |
I'm publishing the multi-arch packages at https://github.com/drpayyne?tab=packages&repo_name=chrome. Please test anything you can |
@drpayyne ran your image against my complex series of browser interactions (primarily with the E*TRADE website) and it worked perfect 💯 |
That's awesome! Let me check if all the Dockerfiles in this repo build, and then I'll create a PR cc/ @jlandure |
@ssoper, I'm getting the below error if I run the base chrome image. Any idea what's causing this in my machine since it seems to work for you? I'm seeing a few answers online, but not sure which is the best approach to fix this. docker run -it --rm ghcr.io/drpayyne/chrome bash
Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted
[0907/154002.918286:FATAL:zygote_host_impl_linux.cc(191)] Check failed: ReceiveFixedMessage(fds[0], kZygoteBootMessage, sizeof(kZygoteBootMessage), &boot_pid).
Received signal 6
[end of stack trace] |
might come down to what arguments you are launching with, here is my run command. could also depend on what version of Docker you’re running (I noted in a prev comment what I’m running) docker container run -d -p 9222:9222 ghcr.io/drpayyne/chrome --no-sandbox --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222 --user-agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36" about:blank |
Ah! Thank you. Just found #33 too. My bad, apologies. My multi-arch image builds work good in that case. |
Discussion PR opened at #182. |
Describe the bug
On Apple Silicon, Chromium will crash on launch with the following message:
To Reproduce
$ docker-compose up --build -d
What is the expected behavior?
Chrome not to crash
What is the actual behavior?
Chrome crashes
Possible solution
Not sure –– hoping someone here might know what's going on
Logs
If applicable, add logs to help explain your problem.
Versions
Docker Engine: 20.10.1
Additional context
This happens very rarely when running the program locally. When running through the image, this happens every time.
The text was updated successfully, but these errors were encountered: