Skip to content

[BUG] "NS_BINDING_ABORTED" error in Firefox #20749

Open
@wentwrong

Description

@wentwrong

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:

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions