check:studio-all: print the top of the stack for a page error
Some checks are pending
build-gate / build (push) Waiting to run

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.
This commit is contained in:
doxa-maps-88655c70 2026-09-25 04:42:33 +00:00
parent eea85340d3
commit 32700c538d

View file

@ -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 = ''