Closed michael-eckhart-woellkart closed 2 months ago
It works if I use the google-chrome and not the chromium browser on linux
It's not the first time I've heard about that. Were you using a chromium version that you manually downloaded?
It seems that the new debian version has a different chromium version that has a bug. I installed the newst version manually and it works now again.
@michael-eckhart-woellkart What version of chromium or google chrome is working for your? I think I'm having the same issue. I've been installing chromium in dockerfile like this:
RUN apt update && \
apt install chromium -y --no-install-recommends && \
rm -rf /var/lib/apt/lists/*
And this week I started getting a timeout exception when calling browser.NewPageAsync()
.
Can you share what's working for you?
@kemmis I use now:
RUN echo 'deb http://deb.debian.org/debian bullseye main' > /etc/apt/sources.list RUN apt-get install -y --no-install-recommends chromium -t bullseye
So, for now i use the old version again. I also added "ConfigureAwait(false);" on the "Puppeteer.LaunchAsync" and "browser.NewPageAsync()" function.
@michael-eckhart-woellkart are you using bookworm or do you have a way to set your base docker image to bullseye?
I was finally able to downgrade chromium to the older version available to Debian 12 (bookworm).
I had to see what version was available using apt policy chromium
. Then install the older chromium-common package, and then the old chromium package:
RUN apt update && \
apt install chromium-common=121.0.6167.139-1~deb12u1 -y && \
apt install chromium=121.0.6167.139-1~deb12u1 -y --no-install-recommends
This fixed the NewPageAsync issue for me.
So chromium 121 went away on the debian package feed. And I've had no luck getting things working using newer chromium versions. So I ended up switching to using google chrome instead. And it seems to be working great now.
Installed it in my dockerfile like this:
RUN apt-get update
RUN apt-get install -y wget
RUN wget -q https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
RUN apt-get install -y ./google-chrome-stable_current_amd64.deb --fix-missing
Then set the executable path in my pup# code like this:
ExecutablePath = "/usr/bin/google-chrome-stable"
Description
We use puppeteer to generate PNG, which works quite good. But after updating from .NET 7 to .NET 8 it stopped working. The app runs in a linux docker container based on the "mcr.microsoft.com/dotnet/aspnet:8.0" image. I enabled the dump an see a endless loop in the log:
[152:187:0730/084147.843252:ERROR:gpu_channel.cc(823)] GpuChannel: Failed to create SharedImageStub [152:187:0730/084147.843310:ERROR:check.cc(376)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry! [152:187:0730/084147.843323:ERROR:gpu_channel_manager.cc(957)] Failed to create GLES3 context, fallback to GLES2. [152:187:0730/084147.843327:ERROR:check.cc(376)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry! [152:187:0730/084147.843332:ERROR:gpu_channel_manager.cc(968)] ContextResult::kFatalFailure: Failed to create shared context for virtualization. [152:187:0730/084147.843336:ERROR:shared_image_stub.cc(676)] SharedImageStub: unable to create context [152:187:0730/084147.843340:ERROR:gpu_channel.cc(823)] GpuChannel: Failed to create SharedImageStub [152:187:0730/084147.843362:ERROR:check.cc(376)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry! [152:187:0730/084147.843369:ERROR:gpu_channel_manager.cc(957)] Failed to create GLES3 context, fallback to GLES2. [152:187:0730/084147.843372:ERROR:check.cc(376)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry! [152:187:0730/084147.843377:ERROR:gpu_channel_manager.cc(968)] ContextResult::kFatalFailure: Failed to create shared context for virtualization. [152:187:0730/084147.843381:ERROR:shared_image_stub.cc(676)] SharedImageStub: unable to create context [152:187:0730/084147.843385:ERROR:gpu_channel.cc(823)] GpuChannel: Failed to create SharedImageStub [152:187:0730/084147.843445:ERROR:check.cc(376)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry! [152:187:0730/084147.843457:ERROR:gpu_channel_manager.cc(957)] Failed to create GLES3 context, fallback to GLES2. [152:187:0730/084147.843461:ERROR:check.cc(376)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry! [152:187:0730/084147.843466:ERROR:gpu_channel_manager.cc(968)] ContextResult::kFatalFailure: Failed to create shared context for virtualization. [152:187:0730/084147.843470:ERROR:shared_image_stub.cc(676)] SharedImageStub: unable to create context [152:187:0730/084147.843475:ERROR:gpu_channel.cc(823)] GpuChannel: Failed to create SharedImageStub [152:187:0730/084147.843503:ERROR:check.cc(376)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry! [152:187:0730/084147.843511:ERROR:gpu_channel_manager.cc(957)] Failed to create GLES3 context, fallback to GLES2. [152:187:0730/084147.843515:ERROR:check.cc(376)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry!
Complete minimal example reproducing the issue
The code just hangs up in the line "page = await browser.NewPageAsync().ConfigureAwait(false);" and never completes.
E.g.
Versions