I have a problem I can't use Puppeteer. I even tried a basic example from the doc. But I'm getting this error :
UnhandledPromiseRejectionWarning: TimeoutError: Navigation timeout of 30000 ms exceeded
I have searched few solutions like disabling the timeout, but it's not working.
I am on Windows using WSL: Ubuntu
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({args: [
'--no-sandbox',
]});
const page = await browser.newPage();
await page.goto('https://news.ycombinator.com', {
waitUntil: 'networkidle2',
});
await page.pdf({ path: 'hn.pdf', format: 'a4' });
await browser.close();
})();
If you have some tips to help me ! Thank you !