I have a Node.JS automation which uses Puppeteer and loads some URLs as part of the process. My code is pretty basic and uses just the very basic functions as documented in the package documentation.
The automation is scheduled to run with crontab every 15 minutes, but for some reasons run after run I am facing a TimeoutError: Navigation Timeout Exceeded: 30000ms exceeded
Error and the page is not loaded successfully.
When I run the exact same code manually everything works well and the page load pretty fast.
Can someone think of anything that can the reason for this strange behavior?
Thanks
You can add an option page.setDefaultNavigationTimeout(0)
after puppeteer.launch()
.
const browser = await puppeteer.launch()
const page = await browser.newPage()
page.setDefaultNavigationTimeout(0)
Hope this works fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With