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:
- [BUG] Firefox doesnt open #2061
- [BUG] playwright._impl._api_types.Error: NS_BINDING_ABORTED; maybe frame was detached? #13640
- [BUG] NS_BINDING_ABORTED when '#' in url (Firefox) #12912
- [Question] Firefox Error: NS_BINDING_ABORTED [Question] #5775
- [BUG] Firefox networkIdle gets stuck on NS_BINDING_ABORTED requests #11677
- [Question]: What does the err means? #8437
- https://github.com/microsoft/playwright/discussions/14063