[BUG] page.goto: NS_ERROR_NET_TIMEOUT in Firefox
See original GitHub issueContext:
- Playwright Version: 1.2.0
- Operating System: Linux ubuntu-20.04
- Node.js version: 16
- Browser: Firefox
- Extra: Run via Github Action off the Docker image provided by Playwright
Code Snippet
It’s a full test suite that’s causing problems, and ONLY on CI, so it’s pretty difficult to provide a short code snippet here. This Github Action run however shows the bug happening! https://github.com/shopcanal/e2e-tests/runs/5673001933?check_suite_focus=true.
It’s from this (public) PR: https://github.com/shopcanal/e2e-tests/pull/46.
Basically, the PR is trying to fix flaky tests + reenable testing with Firefox, but fails because of NS_ERROR_NET_TIMEOUT from Firefox, among other issues.
Describe the bug
Randomly (differs every run of the tests), some portion of the tests will fail on Firefox with an error from page.goto, just stating NS_ERROR_NET_TIMEOUT. This appears to be an error internal to Firefox, and probably is a 408, from what I can gather from Google.
Locally on macOS, I can’t get Firefox tests to fail with this error. It seems to be only happening on the Linux device Github Actions uses to run their tests. I don’t know how to capture a trace remotely from Github Actions otherwise I would! This is what the output of the tests looks like.
The logIntoSupplier function is called from test.beforeEach and just awaits clearing cookies from context, then tries to open a login page with await page.goto and fill in username/password. These tests are hanging on the goto before it ever gets to a page. I’m really stumped as to why this would be happening only in Firefox, and very consistently
With test retries on, this problem is sorta fixed, since a rerun solves it, but that’s clearly just a bandaid for flaky behavior. This seems like a bug, and not user error, but I’d be happy to be proven wrong! Thanks!
1) [firefox] › tests/supplier/navigation.spec.ts:89:3 › Supplier Navigation › can navigate to Proposals from Overview
page.goto: NS_ERROR_NET_TIMEOUT
=========================== logs ===========================
navigating to "https://develop.shopcanal.com/login?next=/supplier", waiting until "load"
============================================================
15 | */
16 | test.beforeEach(async ({ page, context }) => {
> 17 | await logIntoSupplier(page, context);
| ^
18 | });
19 |
20 | test('renders the SUP Overview page', async ({ page }) => {
at logIn (/github/workspace/helpers/login.ts:31:16)
at /github/workspace/tests/supplier/navigation.spec.ts:17:5
2) [firefox] › tests/supplier/navigation.spec.ts:156:3 › Supplier Navigation › can navigate to external FAQs via dropdown
page.goto: NS_ERROR_NET_TIMEOUT
=========================== logs ===========================
navigating to "https://develop.shopcanal.com/login?next=/supplier", waiting until "load"
============================================================
15 | */
16 | test.beforeEach(async ({ page, context }) => {
> 17 | await logIntoSupplier(page, context);
| ^
18 | });
19 |
20 | test('renders the SUP Overview page', async ({ page }) => {
at logIn (/github/workspace/helpers/login.ts:31:16)
at /github/workspace/tests/supplier/navigation.spec.ts:17:5
Issue Analytics
- State:
- Created a year ago
- Comments:5 (1 by maintainers)

Top Related StackOverflow Question
Why was this issue closed?
We are prioritizing the bugs based on the upvotes, recency and our ability to act. It looks like this issue only has a handful of upvotes, has not been touched recently and/or we lack sufficient feedback to act on it. We are closing issues like this one to keep our bug database maintainable. Please feel free to open a new issue and link this one to it if you think this is a mistake.
Can someone reopen this? It’s been happening to us as well. Random timeouts on CI for no apparent reason.