question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Navigation failed because page crashed!

See original GitHub issue

Context:

  • Playwright Version: 1.7.1
  • Operating System: Mac 11.1 and Ubuntu 20.04
  • Node.js version: 14.15.1
  • Browser: Chromium

Might relate to #4655 and #4549

Code Snippet

If you run this script a couple of times you will run into the crash.

const { chromium } = require("playwright");
(async () => {
  const browser = await chromium.launch({ headless: false });
  const context = await browser.newContext();
  const page = await context.newPage();
  await page.goto(
    "https://zadig-et-voltaire.com/eu/fr/p/sktr7402h_chlo/tunisien-homme-tunisien-monastir-chlorophyll-sktr7402h",
    { timeout: 0, waitUntil: "load" }
  );
  await page.close();
  await browser.close();
})();

Describe the bug

  pw:api <= page.goto failed +45ms
(node:48875) UnhandledPromiseRejectionWarning: page.goto: Navigation failed because page crashed!
=========================== logs ===========================
navigating to "https://zadig-et-voltaire.com/eu/fr/p/sktr7402h_chlo/tunisien-homme-tunisien-monastir-chlorophyll-sktr7402h", waiting until "load"
============================================================
Note: use DEBUG=pw:api environment variable and rerun to capture Playwright logs.
    at Connection.sendMessageToServer (/Users/jon/dev/examples/pw-core/node_modules/playwright/lib/client/connection.js:69:15)
    at Proxy.<anonymous> (/Users/jon/dev/examples/pw-core/node_modules/playwright/lib/client/channelOwner.js:44:61)
    at /Users/jon/dev/examples/pw-core/node_modules/playwright/lib/client/frame.js:80:71
    at Frame._wrapApiCall (/Users/jon/dev/examples/pw-core/node_modules/playwright/lib/client/channelOwner.js:72:34)
    at Frame.goto (/Users/jon/dev/examples/pw-core/node_modules/playwright/lib/client/frame.js:78:21)
    at /Users/jon/dev/examples/pw-core/node_modules/playwright/lib/client/page.js:267:60
    at Page._attributeToPage (/Users/jon/dev/examples/pw-core/node_modules/playwright/lib/client/page.js:202:20)
    at Page.goto (/Users/jon/dev/examples/pw-core/node_modules/playwright/lib/client/page.js:267:21)
    at /Users/jon/dev/examples/pw-core/crash.js:8:14
(Use `node --trace-warnings ...` to show where the warning was created)
(node:48875) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:48875) [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.
  pw:api   navigated to "about:blank" +7ms
  pw:api   "domcontentloaded" event fired +0ms
  pw:api   navigated to "about:blank" +70ms
  pw:api   "domcontentloaded" event fired +1ms
  pw:api   navigated to "https://www.google.com/recaptcha/api2/bframe?hl=en&v=qc5B-qjP0QEimFYUxcpWJy5B&k=6Ldwp5UUAAAAAMKfVEt1Gn92O7TSLWKA6icYG3Q_&cb=9a028ekocvr5" +48ms
  pw:api   "domcontentloaded" event fired +44ms
  pw:api   navigated to "https://hal9000.redintelligence.net/retarget?a=55861&version=1&event=view&cat=20457&segment=undefined&items=SKTR7402H&redirected=1" +341ms
  pw:api   "domcontentloaded" event fired +16ms
  pw:api   navigated to "about:blank" +123ms
  pw:api   "domcontentloaded" event fired +1ms
  pw:api   navigated to "https://5994599.fls.doubleclick.net/activityi;dc_pre=CPnqr5Pw8-0CFRTRYgodBZkEDw;src=5994599;type=invmedia;cat=ieqqbrka;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;ord=5372392975456.562?" +191ms
  pw:api   "domcontentloaded" event fired +8ms
  pw:api   navigated to "https://adservice.google.com/ddm/fls/i/dc_pre=CPnqr5Pw8-0CFRTRYgodBZkEDw;src=5994599;type=invmedia;cat=ieqqbrka;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;ord=5372392975456.562;~oref=https://hal9000.redintelligence.net/" +171ms
  pw:api   "domcontentloaded" event fired +7ms
  pw:api   navigated to "about:blank" +715ms
  pw:api   "domcontentloaded" event fired +1ms
  pw:api   "load" event fired +0ms
  pw:api   navigated to "about:blank" +80ms
  pw:api   "load" event fired +1ms
  pw:api   "domcontentloaded" event fired +1ms
  pw:api   navigated to "https://tr.snapchat.com/p" +161ms
  pw:api   "domcontentloaded" event fired +3ms
  pw:api   navigated to "https://zadig-et-voltaire-by.accengage.net/pushweb/assets/secure-bridge.html?__ua_secondary_origin=https%3A%2F%2Fzadig-et-voltaire.com" +252ms
  pw:api   "domcontentloaded" event fired +144ms
  pw:api   "load" event fired +61ms
  pw:api   navigated to "https://zadig-et-voltaire-by.accengage.net/pushweb/assets/secure-bridge.html?__ua_secondary_origin=https%3A%2F%2Fzadig-et-voltaire.com" +1ms
  pw:api   "load" event fired +8ms
  pw:api   "domcontentloaded" event fired +4ms

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
JoelEinbindercommented, Dec 30, 2020

Thanks for the report. It looks like this was already fixed upstream in Chromium, so the next roll should bring it in. You should be able to upgrade to playwright@next in a day or two to get the fix.

1reaction
jperlcommented, Jan 22, 2021

This is fixed in 1.8.0. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Navigation failed because page crashed! JavaScript ...
The "Navigation failed because page crashed" error can also be produced if the system Playwright is running on runs out of available RAM....
Read more >
[BUG] Navigation failed because page crashed! (Javascript ...
The Page Crash after Navigation. There are many API calls happens to load the heavy page. I use waitForNavigation=domcontentloaded and tried ...
Read more >
page.goto: navigation failed because page crashed
Describe the bug I get the aforementioned error message ( page.goto: Navigation failed because page crashed! ) when I simply try to load ......
Read more >
playwright提示:Navigation failed because page crashed!
背景今天运行playwright官网的实例,尽然报错了。上周相同的用例还是可以执行的啊提示信息如下: Navigation failed because page crashed!
Read more >
fix(connect): handle disconnect in various situations ... - Gitnet
Browser on the server side did exit (e.g. crashed). - Connection was dropped by ... Crash, new Error('Navigation failed because page crashed!'));. waiter....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found