question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TimeoutError: Navigation Timeout Exceeded: 30000ms exceeded

See original GitHub issue

I found out that busy build machines running conversion experience puppeteer error: TimeoutError: Navigation Timeout Exceeded: 30000ms exceeded

It originates from this line: await this[_page].goto(fileUrl(tempFile.path));

As this is this uses browser just for rendering, not networking, it seems appropriate fix would be to configure page timeouts (as only page objects allow that):

    if (!this[_browser]) {
      this[_browser] = await puppeteer.launch(this[_options].puppeteer);
      this[_page] = await this[_browser].newPage();
    }

->

    if (!this[_browser]) {
      this[_browser] = await puppeteer.launch(this[_options].puppeteer);
      this[_page] = await this[_browser].newPage();
      this[_page].setDefaultTimeout(0); // Disabled timeout
    }

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
neocoticcommented, Jan 14, 2020

Ah sorry, I didn’t see the distinction between browser instance startup timeout and page navigation timeout. You’re right that this isn’t currently supported via puppeteer options, however, I’m still a bit curious as to why it should ever timeout after 30 seconds. Are the SVGs you’re rendering containing remotely hosted resources (e.g. images, fonts)?

If we were to disable the page navigation timeout, I think it would need to be done on a opt-in basis as I feel like this is implementation detail for puppeteer itself which I’d like to keep out as much as possible.

What I might consider is splitting the existing puppeteer options to be passed down as follows:

This should be able to offer greater control for those like yourself that need it and then you could simply do the following:

const { createConverter } = require('convert-svg-to-png');
await this.converter.convertFile(sourcePath, { puppeteerPageGoto: { timeout: 0 }});
0reactions
lietusmecommented, Jan 15, 2020

For now I worked around this by catching exception and retrying few times before failing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to solve Puppeteer TimeoutError: Navigation timeout of ...
How to solve Puppeteer TimeoutError: Navigation timeout of 30000 ms exceeded ... (specifically the TimeoutError) after a page takes more than 30000ms (30 ......
Read more >
Webscraping TimeoutError: Navigation timeout of 30000 ms ...
the timeout is exceeded during navigation. the remote server does not respond or is unreachable. the main resource failed to load. By default, ......
Read more >
Navigation timeout of 30000 ms exceeded with Puppeteer ...
Works fine in emulator, as soon as I deploy to the cloud it gives "Navigation timeout of 30000 ms exceeded" error 90% of...
Read more >
Fix: navigation timeout of 30000 ms exceeded in puppeteer?
In this video, I am going to show you how we can fix navigation timeout of 30000 ms exceeded in puppeteer.You will generally...
Read more >
Dealing with timeouts in Puppeteer 🐢️
The Problem: "TimeoutError: Navigation Timeout Exceeded: 30000ms exceeded" # · Solution 1: Set or disable the timeout for a navigation/request #.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found