From 32700c538d696d3d2ae8aea1ff8d8670f1f36687 Mon Sep 17 00:00:00 2001 From: doxa-maps-88655c70 <88627970+doxa-maps-88655c70@users.noreply.github.com> Date: Fri, 25 Sep 2026 04:42:33 +0000 Subject: [PATCH] check:studio-all: print the top of the stack for a page error A failure read "Cannot read properties of null (reading 'getRootNode')", which names no caller, and the owner could not act on it without knowing which call site threw. The gate now keeps the first four stack frames with each page error. That output located the intermittent gospel-dashboard error: useMapInstance.js ensureEngineCSS, called from initializeMap after its pane had already been unmounted. --- internal/check-studio-every-plugin.mjs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/check-studio-every-plugin.mjs b/internal/check-studio-every-plugin.mjs index ef430417c..eccf2efd6 100644 --- a/internal/check-studio-every-plugin.mjs +++ b/internal/check-studio-every-plugin.mjs @@ -39,7 +39,12 @@ const page = await (await browser.newContext({ viewport: { width: 1280, height: let current = '(page load)' const seen = {} const note = (kind, v) => { const s = (seen[current] = seen[current] || { errors: [], failed: [] }); s[kind].push(v) } -page.on('pageerror', (e) => note('errors', String(e.message || e).slice(0, 160))) +// Keep the top of the STACK, not just the message: a message like "reading 'getRootNode'" names no +// caller, and the owner cannot fix it without knowing which call site threw (asked 2026-09-25). +page.on('pageerror', (e) => { + const frames = String(e.stack || '').split('\n').slice(1, 5).map((l) => l.trim().replace(/https?:\/\/[^/]+/, '').replace(/\?v=[0-9a-f]+/, '')).join(' <- ') + note('errors', String(e.message || e).slice(0, 160) + (frames ? ' [' + frames + ']' : '')) +}) page.on('response', (r) => { if (r.status() < 400) return let host = ''