← Back to context

Comment by ryandrake

20 hours ago

Yep, a bunch of warnings and then:

    Unhandled Promise Rejection: Error: StartGraph failed: $Service "kGpuService", required by node mediapipe_tasks_vision_face_detector_facedetectorgraph__mediapipe_tasks_components_processors_imagepreprocessinggraph__ImageCloneCalc...

Warnings prior to the error:

    [Warning] I0000 00:00:1729008143.963000       1 gl_context_webgl.cc:81] Couldn't create webGL 2 context. (vision_wasm_internal.js, line 1087)
    [Warning] W0000 00:00:1729008143.966000       1 gl_context_webgl.cc:106] Creating a context with WebGL 2 failed: UNKNOWN: emscripten_webgl_create_context() returned error 0 (vision_wasm_internal.js, line 1087)
    [Warning] === Source Location Trace: ===  (vision_wasm_internal.js, line 1087)
    [Warning] third_party/mediapipe/gpu/gl_context_webgl.cc:82 (vision_wasm_internal.js, line 1087)
    [Warning] W0000 00:00:1729008143.967000       1 gl_context_webgl.cc:107] Fall back on WebGL 1. (vision_wasm_internal.js, line 1087)
    [Warning] I0000 00:00:1729008143.968000       1 gl_context_webgl.cc:81] Couldn't create webGL 1 context. (vision_wasm_internal.js, line 1087)
    [Warning] W0000 00:00:1729008143.968000       1 gl_context.cc:1000] OpenGL error checking is disabled (vision_wasm_internal.js, line 1087)
    [Warning] E0000 00:00:1729008143.968000       1 gl_graph_runner_internal.cc:252] StartGraph failed: INTERNAL: Service "kGpuService", required by node mediapipe_tasks_vision_face_detector_facedetectorgraph__mediapipe_tasks_components_processors_imagepreprocessinggraph__ImageCloneCalculator, was not provided and cannot be created: emscripten_webgl_create_context() returned error 0; StartRun failed (vision_wasm_internal.js, line 1087)
    [Warning] === Source Location Trace: ===  (vision_wasm_internal.js, line 1087)
    [Warning] third_party/mediapipe/framework/calculator_graph.cc:651 (vision_wasm_internal.js, line 1087)
    [Warning] third_party/mediapipe/framework/calculator_graph.cc:682 (vision_wasm_internal.js, line 1087)
    [Warning] third_party/mediapipe/framework/calculator_graph.cc:551 (vision_wasm_internal.js, line 1087)
    [Warning] research/drishti/app/pursuit/wasm/graph_utils.cc:87 (vision_wasm_internal.js, line 1087)

Hope that helps!

Thank you! Yeah, that looks like the pipeline from mediapipe (used for ML face detection) has troubles initializing the WebGL context. I don't see immediately any settings for disabling WebGL in Safari, but I'm sure there's some feature flags for that. Do you remember touching any settings related to this? I'm wondering if it's related to some browser settings, an extension (?) or something else.

Edit: tested on M2 and Safari 18.0 and I cannot reproduce it. Updating now to 15.0.1 to see if that makes a difference.

  • I went into Safari Settings and, under Feature Flags, turned on "Allow WebGL in Web Workers" and the site now works. I don't recall ever turning that off or messing with any other feature flags, so I'm guessing that this necessary feature is off by default in at least some versions of Safari. Web development must be so fun, I feel for you.