TimeoutError: Navigation timeout, stuck after login
loia5tqd001 opened this issue · 2 comments
loia5tqd001 commented
Description
The page's stuck after login on github, here's the error message after 30 seconds of waiting for nothing happens:
(node:24805) UnhandledPromiseRejectionWarning: TimeoutError: Navigation timeout of 30000 ms exceeded
at Promise.then (/home/loia5tqd001/Desktop/thal/node_modules/puppeteer/lib/LifecycleWatcher.js:142:21)
-- ASYNC --
at Frame.<anonymous> (/home/loia5tqd001/Desktop/thal/node_modules/puppeteer/lib/helper.js:111:15)
at Page.waitForNavigation (/home/loia5tqd001/Desktop/thal/node_modules/puppeteer/lib/Page.js:690:49)
at Page.<anonymous> (/home/loia5tqd001/Desktop/thal/node_modules/puppeteer/lib/helper.js:112:23)
at run (/home/loia5tqd001/Desktop/thal/index.js:30:14)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:24805) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:24805) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
How Has This Been Tested?
I cloned the repository, ran npm install
, and then ran index.js
with Code Runner (it's similar to run node index.js
)
Screenshots
loia5tqd001 commented
Reference
See the usage of waitForNavigation
from the document:
const [response] = await Promise.all([
page.waitForNavigation(), // The promise resolves after navigation has finished
page.click('a.my-link'), // Clicking the link will indirectly cause a navigation
]);
emadehsan commented
Hey @loia5tqd001 , thanks for making this pull request :) . I'm sorry it this long to review & merge