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