Skip to content

error Navigation timeout of 30000 ms exceeded #1

@bixia

Description

@bixia

hi, i encounter a problem. when i try to run the demo, it returns me with the error:

(Use `node --trace-deprecation ...` to show where the warning was created)
[2023-03-05T08:11:39.029Z] TimeoutError: Navigation timeout of 30000 ms exceeded
    at LifecycleWatcher._LifecycleWatcher_createTimeoutPromise (/node_modules/puppeteer-core/src/common/LifecycleWatcher.ts:257:12)

when i tried to increase the wait timestamp by adding:

exporconst parseQuery = async (url: string, headless: boolean = false) => {
    const browser = await puppeteer.launch({ headless: headless });

    const page = await browser.newPage();
+  await page.setDefaultNavigationTimeout(0);

    await page.goto(url);
    await page.waitForNetworkIdle({ timeout: 50000 });

it doesnt complain the timeout, but it get stuck here. and i dont know how to fix it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions