microsoft / microsoft/playwright

[BUG] "NS_BINDING_ABORTED" error in Firefox

Open
#20,749 40 comments 20 reactions 2 assignees View on GitHub

@dgozman is already working on this.

Since Apr 1, 2025.

browser-firefox
Dominant language
TypeScript
Stars
96.4k
Forks
6.5k
Avg merge
1d 6h
Merged PRs (30d)
180

Description

Context:

  • Playwright Version: 1.30.0
  • Operating System: Mac/Ubuntu
  • Node.js version: 18.12.1
  • Browser: Firefox

Code Snippet

See repository with minimal reproducible example: https://github.com/wentwrong/pw-firefox-ns-binding-aborted

Describe the bug

When you navigate to page A and then immediately navigate to page B (using page.goto), if page A asynchronously navigates itself to another URL then navigation to page B will fail in Firefox with the following error:

1) [firefox] › bug.spec.js:3:1 › goto should not fail with the "NS_BINDING_ABORTED" error ========

  page.goto: NS_BINDING_ABORTED; maybe frame was detached?
  =========================== logs ===========================
  navigating to "http://localhost:3000/b", waiting until "load"
  ============================================================

    3 | test('goto should not fail with the "NS_BINDING_ABORTED" error', async ({ page }) => {
    4 |     await page.goto('http://localhost:3000/a');
  > 5 |     await page.goto('http://localhost:3000/b');
      |                ^
    6 | });
    7 |

See detailed logs here: https://github.com/wentwrong/pw-firefox-ns-binding-aborted/actions/runs/4124609214/jobs/7124068636

Currently there are no ways to workaround it except adding explicit page.waitForTimeout() after first navigation which is a little hacky and unreliable.

I expect that the page.goto API will work uniformly across all browsers and page-initiated navigation can't affect subsequent navigations done by page.goto. At least it shouldn't crash.

Related issues:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.