From 98e70d5188976f634fa4cb13c8b6bc096514cd7c Mon Sep 17 00:00:00 2001 From: Philipp Otto Date: Wed, 17 Jul 2024 19:23:34 +0200 Subject: [PATCH] Filter webgl context loss / isTrusted errors (#7926) * filter webgl context loss / isTrusted errors * fix that WebGLContextLost error should be logged instead of serialized isTrusted msg --- frontend/javascripts/libs/error_handling.ts | 1 + frontend/javascripts/oxalis/view/tracing_view.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/javascripts/libs/error_handling.ts b/frontend/javascripts/libs/error_handling.ts index cd819d0c3e6..4805f5d35b3 100644 --- a/frontend/javascripts/libs/error_handling.ts +++ b/frontend/javascripts/libs/error_handling.ts @@ -18,6 +18,7 @@ const BLACKLISTED_ERROR_MESSAGES = [ "Invariant Violation: Cannot call hover while not dragging.", // Errors from the sortable-tree when dragging an element onto itself "Uncaught Invariant Violation: Expected to find a valid target.", "Uncaught TypeError: Cannot read property 'path' of null", + "WebGLContextLost", ]; type ErrorHandlingOptions = { throwAssertions: boolean; diff --git a/frontend/javascripts/oxalis/view/tracing_view.tsx b/frontend/javascripts/oxalis/view/tracing_view.tsx index 26cdd811671..c83e259ee66 100644 --- a/frontend/javascripts/oxalis/view/tracing_view.tsx +++ b/frontend/javascripts/oxalis/view/tracing_view.tsx @@ -23,7 +23,7 @@ const registerWebGlCrashHandler = (canvas) => { key: WEBGL_CONTEXT_LOST_KEY, }); console.error("Webgl context lost", e); - ErrorHandling.notify(e); + ErrorHandling.notify(new Error("WebGLContextLost")); }, false, );