Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chromium in Docker throws "Failed to create shared context for virtualization"

I have a debian-based Docker container (the host machine is on Windows 10). It has Chromium installed via apt-get install -y --no-install-recommends chromium. When I run a test command:

/usr/bin/chromium --headless --disable-gpu --no-sandbox --hide-scrollbars --window-size="1920,1080" --default-background-color=00000000 --hide-scrollbars --disable-features=NetworkService --virtual-time-budget=20000 --screenshot=/tmp/screenshot.png https://www.google.com

it complains saying:

[0916/202547.786718:ERROR:gpu_channel_manager.cc(398)] ContextResult::kFatalFailure: Failed to create shared context for virtualization.

I'm getting the correct screenshot despite the error, but I'd want to get rid of this alert anyway. Googling didn't help.

like image 622
MaratMS Avatar asked May 31 '26 07:05

MaratMS


1 Answers

I'm sorry, my answer isn't for chromium directly. But for cef (CefGlue), which based on it. I run on linux without gpu (server).

I got exactly same error on cef version 76.1.13.

Thanks to https://github.com/Zenika/alpine-chrome/issues/36#issuecomment-534392761

The reason is flag "--disable-software-rasterizer". I used it with old version of cef. But for now it cause error.

I see, that you doesn't use this flag, but may be you skip it when ask question?

like image 176
Sergei Avatar answered Jun 02 '26 22:06

Sergei