dotrun icon indicating copy to clipboard operation
dotrun copied to clipboard

Chromium error when using dotrun on ubuntu.com

Open mtruj013 opened this issue 3 years ago • 7 comments

I'm getting the following error when I try to use dotrun to run ubuntu.com:

Screenshot 2022-02-01 at 17 59 19

For context I'm on an M1 Mac.

mtruj013 avatar Feb 01 '22 17:02 mtruj013

@jkfran do you have any thoughts about this issue?

cristinadresch avatar Feb 03 '22 09:02 cristinadresch

Hi @mtruj013

Can you try:

export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
dotrun

Or to include this line:

PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true

In your .env.local?

jkfran avatar Feb 03 '22 10:02 jkfran

@jkfran that seems to have worked - do you think we should actually put this in .env so it automatically works? Or would that be harmful for people who could successfully download chromium? Do we need chromium downloads for some reason?

nottrobin avatar Feb 04 '22 09:02 nottrobin

I assumed this chromium dependency wasn't needed at all for regular working on the ubuntu.com project. That would be very weird haha. But I am not familiar enough with Puppeteer to know. I thought the chromium dependency is probably related to some Cypress testing.

As far as I know, we run cypress on CI here: https://github.com/canonical-web-and-design/ubuntu.com/blob/main/.github/workflows/cypress-pr.yaml

But if there are people running it locally we might cause and issue to them by including this line in the .env

jkfran avatar Feb 04 '22 10:02 jkfran

Getting the same error now with dotrun 2 on M1 Mac, when trying to install dependencies of ubuntu.com:

image

bartaz avatar Aug 02 '22 13:08 bartaz

So the issue here seems to be that Puppeteer can't download chrome for ARM64. The best solution is to provide chromium in the dotrun-image for both architectures. However, the official package is a snap, and snaps don't work on Docker.

There are many references on the internet to a third-party PPA repo: add-apt-repository ppa:saiarcot895/chromium-beta to avoid the snap package. Maybe we should install it from here.

jkfran avatar Aug 02 '22 13:08 jkfran

Sure sounds good

nottrobin avatar Aug 02 '22 17:08 nottrobin