Why does page.goto() throws a timeout error?
See original GitHub issueThe following code throws an error, why?
Navigation Timeout Exceeded: 60000ms exceeded
I’m using version 1.19.0
const puppeteer = require("puppeteer");
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.setCacheEnabled(false);
try {
const response = await page.goto("https://www.gatsbyjs.com", {
waitUntil: "networkidle0",
timeout: 60000
});
console.log("Status code:", response.status());
} catch (error) {
console.log(error.message);
}
await browser.close();
})();
Some other URLs work fine, so I wonder if there is anything special with this particular URL?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:5
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 >How to solve Puppeteer TimeoutError: Navigation timeout of ...
One of the most usual problems with pages that contain a lot of content, because of the ads, images etc. is the load...
Read more >Puppeteer documentation - DevDocs
TimeoutError <function> A class of TimeoutError. Puppeteer methods might throw errors if they are unable to fulfill a request. For example, page.
Read more >Dealing with timeouts in Puppeteer 🐢️
You are most likely using Puppeteer to interact with the web in some form. Either you are taking screenshots of a website using...
Read more >Page | Playwright - CukeTest
Ensure that the element is now checked. If not, this method throws. When all steps combined have not finished during the specified timeout...
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
Changing “networkidle0” to “networkidle2” solved the issue in my case. Appears as multiple networks were hitting the same URL that’s y networkidle0 wasn’t working in the first place.
We are closing this issue. If the issue still persists in the latest version of Puppeteer, please reopen the issue and update the description. We will try our best to accomodate it!