-
-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TimeoutError: Navigation Timeout Exceeded: 30000ms exceeded #69
Comments
@lietusme Thanks for raising this issue. Is this solution not already achievable by simply using the I'm a bit reluctant to disable the timeout all together as I'm not sure that this would be desirable for all implementations. I can imagine most systems wouldn't want to wait more than that default maximum of 30 seconds. |
I could not find a way to globally set timeout for puppeteer and only timeout settings seem to be available on page objects only. I'm not sure how to pass/access puppeteer from converter using this as well:
Any hints? P.S. setting timeout to 1 ms is good way to test if it works, as it starts to fail randomly with same error. |
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 }}); |
Yes, such customization would work well for my case: Any estimate when new NPM package version would go out with puppeteer options added? Regarding SVG that times out - no external resources, 1.4KB size, so not sure what causes it. It is reproduced on remote build machines (MacOS) used by multiple teams so that may be just be result of their slowness or random lags. |
For now I worked around this by catching exception and retrying few times before failing. |
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):
->
The text was updated successfully, but these errors were encountered: