puppeteer / examples

Use case-driven examples for using Puppeteer and headless chrome

Home Page:https://developers.google.com/web/tools/puppeteer/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lazyimages_without_scroll_events.js finishes with error TimeoutError: Navigation Timeout Exceeded

userlond opened this issue · comments

I try to check lazy loading for site using Google official guide.

I've inited project from git, installed all dependencies.

When I run

node lazyimages_without_scroll_events.js -h --url==https://dns-shop.ru

I get an error below:

(node:7280) UnhandledPromiseRejectionWarning: TimeoutError: Navigation Timeout Exceeded: 30000ms exceeded
at Promise.then (C:\Root\puppeteer\puppeteer-examples\node_modules\puppeteer\lib\LifecycleWatcher.js:142:21)
-- ASYNC --
at Frame. (C:\Root\puppeteer\puppeteer-examples\node_modules\puppeteer\lib\helper.js:110:27)
at Page.goto (C:\Root\puppeteer\puppeteer-examples\node_modules\puppeteer\lib\Page.js:629:49)
at Page. (C:\Root\puppeteer\puppeteer-examples\node_modules\puppeteer\lib\helper.js:111:23)
at screenshotPageAfterScroll (C:\Root\puppeteer\puppeteer-examples\lazyimages_without_scroll_events.js:143:14)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:7280) 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:7280) [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.

And process hangs forever.

Node version is v10.15.3, platform is Windows 7.

What are steps to check the site correctly?

This post helped me to solve the problem:
puppeteer/puppeteer#782 (comment)

What happens if you remove the -h flag?

On Mon, Jun 3, 2019, 9:41 PM userlond @.***> wrote: I try to check lazy loading for site using Google official guide https://developers.google.com/search/docs/guides/lazy-loading. I've inited project from git, installed all dependencies. When I run node lazyimages_without_scroll_events.js -h --url==https://dns-shop.ru I get an error below: (node:7280) UnhandledPromiseRejectionWarning: TimeoutError: Navigation Timeout Exceeded: 30000ms exceeded at Promise.then (C:\Root\puppeteer\puppeteer-examples\node_modules\puppeteer\lib\LifecycleWatcher.js:142:21) -- ASYNC -- at Frame. (C:\Root\puppeteer\puppeteer-examples\node_modules\puppeteer\lib\helper.js:110:27) at Page.goto (C:\Root\puppeteer\puppeteer-examples\node_modules\puppeteer\lib\Page.js:629:49) at Page. (C:\Root\puppeteer\puppeteer-examples\node_modules\puppeteer\lib\helper.js:111:23) at screenshotPageAfterScroll (C:\Root\puppeteer\puppeteer-examples\lazyimages_without_scroll_events.js:143:14) at process._tickCallback (internal/process/next_tick.js:68:7) (node:7280) 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:7280) [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. And process hangs forever. What are steps to check the site correctly? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#28?email_source=notifications&email_token=AAB2FAFZUHQPM4L2LYVKWV3PYXW67A5CNFSM4HSYW7LKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GXN3BBQ>, or mute the thread https://github.com/notifications/unsubscribe-auth/AAB2FAC4YL4EHXUWJ4MQRQLPYXW67ANCNFSM4HSYW7LA .

Same error:
Error