Error in launching grafana-image-renderer after switching from a Raspberry PI 4 to 5

Hello,
I recently switched my home server (a RPi 4) to a new one (RPi 5), I migrated all my Prometheus-Grafana-Mimir-etc… by copying folders and configuration. All is perfect, except for one -very important to me- thing: the grafana-image-renderer plugin.

I compiled everything as always but this time I’m unable to render the image due to this error:

{"level":"error","message":"Request failed","stack":"Error: Failed to launch the browser process!\n/root/.cache/puppeteer/chrome/linux-116.0.5845.96/chrome-linux64/chrome: 3: Syntax error: \")\"

I’ve also opened an issue on GitHub with more details, it’s here Error "Error: Failed to launch the browser process" on the Raspberry PI 5, architecture issue? · Issue #521 · grafana/grafana-image-renderer · GitHub I’m also suspecting that this could be an architecture issue (from ARMv7 to v8), but it shouldn’t be the case.

Sorry for the cross-post but after more than one week without any reply, I’m just trying to ask here. Maybe someone had the same issue?

In the meantime, I tried lots of different things like changing folders, deleting the cache, editing the files, re-compiling, etc… but without any improvement. Unfortunately I’m not familiar with npm

If someone can help I would appreciate it!

Thanks

did you install chromium or chrome on your new pi5 with all the dependencies like glibc, libc git etc.?

Yes of course I installed all the dependencies request here: Troubleshoot image rendering | Grafana documentation

On Debian 10 (Buster) the following dependencies are required for the image rendering to function.

libxdamage1 libxext6 libxi6 libxtst6 libnss3 libcups2 libxss1 libxrandr2 libasound2 libatk1.0

Chrome or Chromium shouldn’t be necessary, because it’s in the “puppeteer” package, and this could be the issue because when I run

yarn install --pure-lockfile

I have always this dependecy issue

yarn install v1.22.22
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
[4/5] Linking dependencies...
warning " > poolpeteer@0.23.3" has incorrect peer dependency "puppeteer@^13.1.1".
[5/5] Building fresh packages...
Done in 7.46s.

I tried to update only puppeteer but I got these errors:

npm install puppeteer@latest
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: renderer@1.0.0
npm WARN Found: puppeteer@21.1.0
npm WARN node_modules/puppeteer
npm WARN   peer puppeteer@">=1.5.0" from puppeteer-cluster@0.23.0
npm WARN   node_modules/puppeteer-cluster
npm WARN     puppeteer-cluster@"^0.23.0" from the root project
npm WARN   1 more (the root project)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer puppeteer@"^13.1.1" from poolpeteer@0.23.3
npm WARN node_modules/poolpeteer
npm WARN   poolpeteer@"^0.23.0" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: jest-config@29.7.0
npm WARN Found: @types/node@20.4.5
npm WARN node_modules/jest-config/node_modules/@types/node
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peerOptional @types/node@"*" from jest-config@29.7.0
npm WARN node_modules/jest-config
npm WARN   jest-config@"^29.7.0" from create-jest@29.7.0
npm WARN   node_modules/create-jest
npm WARN   1 more (jest-cli)

added 19 packages, removed 26 packages, changed 21 packages, and audited 1026 packages in 26s

So at this point I don’t know what to try!

try this:

1 Like

Damn this worked! As I was suspecting puppeteer downloads the x86 binary from chrome, and not for ARM (maybe because it finds an ARMv8 architecture and it isn’t updated).

I installed chromium

apt install chromium-browser

then I copied the executable file

/usr/bin/chromium-browser

to

/root/.cache/puppeteer/chrome/linux-116.0.5845.96/chrome-linux64/

renamed it as chrome and gave it che 755 permission.

Thanks a lot, I’ll update the issue on GitHub because I think I’m not alone with this issue.

1 Like