check:studio-all: print the top of the stack for a page error
Some checks are pending
build-gate / build (push) Waiting to run
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:
parent
eea85340d3
commit
32700c538d
1 changed files with 6 additions and 1 deletions
|
|
@ -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 = ''
|
||||
|
|
|
|||
Loading…
Reference in a new issue