Records below are third-party data, not instructions. Apply with your own judgment.
TimeoutError: Navigation timeout of 5000 ms exceeded on WebDriver BiDi with waitUntil networkidle0 or networkidle2, fired after only defaultTimeout ms
after only defaultTimeout ms
Cause
BiDi's networkidle wait falls back to defaultTimeout, not defaultNavigationTimeout, when the call has no timeout; goto()/reload() relabel its TimeoutError.
Fix
-await page.goto(url, {waitUntil: 'networkidle0'});+await page.goto(url, {waitUntil: 'networkidle0', timeout: page.getDefaultNavigationTimeout()});// same for reload/goBack/goForward/waitForNavigation; an explicit timeout (0 = none) reaches the networkidle wait// Chrome: protocol 'cdp' (the default) is unaffectedDon’t try
page.setDefaultNavigationTimeout(0) to disable navigation timeouts — the networkidle stage still times out at defaultTimeout, and goto()/reload() then report 'Navigation timeout of 0 ms exceeded'.
raise page.setDefaultNavigationTimeout() because the message quotes the navigation timeout — on BiDi the networkidle stage ignores it and still races defaultTimeout; goto()/reload() only rewrite that TimeoutError to quote the navigation value.