Firefox: wait for a tab still on about:blank (e2e 'no access to null') #16

Closed
akib wants to merge 0 commits from akib/fix-ff-blank-tab into main AGit
Owner

CI failure: e2e-firefox on main (run 43000795213) failed "Read Element with a URL" with BlockFlow has no access to null. The step's new tab was still about:blank when the page agent was first injected. Firefox refuses that with "Missing host permission for the tab", and the driver treated the refusal as final. about:blank's origin is the string null. The failure is timing-dependent; earlier runs passed.

Fix (src/browser/pageDriver.ts)

  • A refusal is retried like a loading page in two cases: the tab has not reached its page (about:blank or no URL), or permissions.contains says BlockFlow does have access to the tab's site. The second case covers a URL that changed after the refusal, which the new unit test reproduces.
  • A real refusal on a site without access still fails at once with permission.missing, naming the site.
  • An error never names null; it says "this site".
  • Trade-off: on a page Firefox never lets extensions script, even with access, the step now waits for its timeout and reports Firefox's message, instead of failing immediately.

Verified

  • npm run check: 1145 tests, including the new tests/browser/blankTab.test.ts with the race.
  • npm run e2e:firefox: all checks pass locally, including this one.
  • npm run e2e: all Chromium checks pass.

🤖 Generated with Claude Code

**CI failure:** e2e-firefox on `main` (run 43000795213) failed "Read Element with a URL" with `BlockFlow has no access to null`. The step's new tab was still `about:blank` when the page agent was first injected. Firefox refuses that with "Missing host permission for the tab", and the driver treated the refusal as final. `about:blank`'s origin is the string `null`. The failure is timing-dependent; earlier runs passed. **Fix (`src/browser/pageDriver.ts`)** - A refusal is retried like a loading page in two cases: the tab has not reached its page (`about:blank` or no URL), or `permissions.contains` says BlockFlow does have access to the tab's site. The second case covers a URL that changed after the refusal, which the new unit test reproduces. - A real refusal on a site without access still fails at once with `permission.missing`, naming the site. - An error never names `null`; it says "this site". - Trade-off: on a page Firefox never lets extensions script, even with access, the step now waits for its timeout and reports Firefox's message, instead of failing immediately. **Verified** - `npm run check`: 1145 tests, including the new `tests/browser/blankTab.test.ts` with the race. - `npm run e2e:firefox`: all checks pass locally, including this one. - `npm run e2e`: all Chromium checks pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Firefox CI: Read Element with a URL injected while its new tab was still
about:blank; Firefox answered 'Missing host permission for the tab' and the step
failed at once naming the site 'null'. A refusal is now retried like a loading
page when the tab has not reached its page, or when BlockFlow does have access to
the site (the URL changed after the refusal). A real refusal still fails at once
with permission.missing; a null origin is never named.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
akib closed this pull request 2026-11-11 10:37:33 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
akib/blockflow!16
No description provided.