Failed to create a WebGL2 context - bindToCurrentThread

Hello,
We’re running three.js (+r3f +drei) on the server using puppeteer + chrome (119)
on AWS ECS container with GPU (nvidia/cuda:12.2.2-base-ubuntu22.04)

With these args: [“–no-sandbox”, “–ignore-gpu-blocklist”, “–use-gl=angle”, “–use-angle=vulkan”]

Whenever we load the page on the server, we see these errors from the page:

THREE.WebGLRenderer: A WebGL context could not be created. Reason: Could not create a WebGL context, VENDOR = 0xffff, DEVICE = 0xffff, GL_VENDOR = Google Inc. (Mesa), GL_RENDERER = ANGLE (Mesa, Vulkan 1.3.238 (llvmpipe (LLVM 15.0.7 256 bits) (0x00000000)), llvmpipe-0.0.1), GL_VERSION = 0.0.1, Sandboxed = no, Optimus = no, AMD switchable = no, Reset notification strategy = 0x8252, ErrorMessage = bindToCurrentThread failed

and:

THREE.WebGLRenderer: A WebGL context could not be created. Reason: Failed to create a WebGL2 context

The rendering works and we get the screenshot we want but Im wondering what these errors mean exactly. Are we losing something (quality/performance)? And is it possible to fix?

Havent been able to find concrete answers online.

If anyone has ideas on how to solve it will be greatly appreciated.

1 Like