[BUG] Page.goto() flakiness - seeing TimeoutError sometimes
See original GitHub issueContext:
- Playwright Version: v1.2.1
- Operating System: Docker on Linux
- Node version: v12.18.2
- Browser: Chromium
Describe the bug
Hey team. I hope all is well. I’m seeing occasional timeouts during page.goto()
. I haven’t found a way to repro this constistently - it only happens about ~5%~ 20% of the time. The strange thing is that in these cases, the navigation actually did succeed. I can tell by looking at screenshots and videos. It’s just that Playwright doesn’t recognize the load
event.
TimeoutError: Timeout 30000ms exceeded during page.goto.
====================== page.goto logs ======================
[api] navigating to "https://portfolio.adobe.com", waiting until "load"
[api] navigated to "https://portfolio.adobe.com/"
[api] "domcontentloaded" event fired
============================================================
Note: use DEBUG=pw:api environment variable and rerun to capture Playwright logs.
147 | // we have an environment to insert the session into
148 | if (page.url().indexOf(CONFIG.baseUrl) === -1) {
> 149 | await page.goto(CONFIG.baseUrl);
| ^
150 | await page.waitForSelector(Home.CTAHeader);
151 | }
152 | }
at ProgressController.run (node_modules/playwright-chromium/lib/progress.js:73:30)
at runNavigationTask (node_modules/playwright-chromium/lib/frames.js:961:23)
at Frame.goto (node_modules/playwright-chromium/lib/frames.js:284:16)
at Frame.goto (node_modules/playwright-chromium/lib/helper.js:79:31)
at node_modules/playwright-chromium/lib/page.js:203:61
at Page._attributeToPage (node_modules/playwright-chromium/lib/page.js:356:20)
at Page.goto (node_modules/playwright-chromium/lib/page.js:203:21)
at Page.apply (node_modules/playwright-chromium/lib/helper.js:79:31)
-- ASYNC --
at Frame.goto (node_modules/playwright-chromium/lib/helper.js:78:23)
at node_modules/playwright-chromium/lib/page.js:203:61
at Page._attributeToPage (node_modules/playwright-chromium/lib/page.js:356:20)
at Page.goto (node_modules/playwright-chromium/lib/page.js:203:21)
at Page.apply (node_modules/playwright-chromium/lib/helper.js:79:31)
at _maybeGoToHomepage (helpers/authHelper.ts:149:16)
at command (helpers/authHelper.ts:206:24)
-- ASYNC --
at Page.apply (node_modules/playwright-chromium/lib/helper.js:78:23)
at _maybeGoToHomepage (helpers/authHelper.ts:149:16)
at command (helpers/authHelper.ts:206:24)
at signupAndLogin (helpers/authHelper.ts:210:10)
at Object.<anonymous> (specs/features/onboarding.critical.ts:26:11)
Have you seen this at all before? Do you have any idea what could be causing this or how I could repro this issue consistently? As a potential workaround, is there any way to change the default event to domcontentloaded
for all page.goto() calls?
Thank you for taking a look.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:8
- Comments:12 (11 by maintainers)
Top Results From Across the Web
Why does puppeteer page.goto() throw a timeout error?
Removing waitUntil: "networkidle0" works so I'm assuming the site is still holding a connection to the server.
Read more >Playwright - Quality Thoughts
I noticed in the example above there can be a race condition between Playwright clicking and waiting for the response, resulting in the...
Read more >Playwright/CHANGELOG and Playwright Releases (Page 3)
#3151 - [BUG] Page.goto() flakiness - seeing TimeoutError sometimes #3192 - [Question] Check if element is stable #3215 - [Feature] Roll Firefox to...
Read more >Debug BrowserStack Automate idle timeout error
If another command does not arrive at BrowserStack within the default timeout duration of 90 seconds, the session generates the BROWSERSTACK_IDLE_TIMEOUT error ......
Read more >Page | Playwright - CukeTest
Also emitted if the page throws an error or a warning. The arguments passed into console.log appear as arguments on the event handler....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The best way would be to run with
DEBUG=pw:protocol
and send the log to us. Note that it contains a lot of information like cookies, so make sure you are comfortable sharing that.Otherwise, perhaps logging all requests would help. Try adding the following and sharing the output.
Sorry, it was just a part of our test. Here is something I’d try: