Skip to content

fix: tolerate page errors without location#41302

Open
mturac wants to merge 1 commit into
microsoft:mainfrom
mturac:fix/issue-41169-pageerror-location
Open

fix: tolerate page errors without location#41302
mturac wants to merge 1 commit into
microsoft:mainfrom
mturac:fix/issue-41169-pageerror-location

Conversation

@mturac

@mturac mturac commented Jun 15, 2026

Copy link
Copy Markdown

Fixes #41169.

When a browser reports a page error without source location metadata, normalize it to an empty location before storing and dispatching the error. This keeps both pageerror and weberror events flowing instead of crashing the driver while preserving the existing event payload shape.

The Firefox protocol type now reflects that Page.uncaughtError.location can be omitted.

Validation:

  • npm run build
  • node packages/playwright-test/cli.js test --config=tests/library/playwright.config.ts browsercontext-events.spec.ts -g "weberror event should tolerate missing location"
  • npm run tsc -- --pretty false
  • npm run eslint -- packages/playwright-core/src/server/page.ts tests/library/browsercontext-events.spec.ts
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(firefox): Firefox Page.uncaughtError may omit location, crashing driver process

1 participant