[BUG] page.goto: Navigation failed because page crashed!

See original GitHub issue

Context:

  • Playwright Version: 1.8.0-next (3eef2548e4d55db5970a81582bc0276d814c42da)
  • Operating System: macOS 10.15.7
  • Node.js version: Node v14.15.1
  • Browser: Chromium Version 89.0.4344.0 (Developer Build) (x86_64)

Info from npx:

  System:
    OS: macOS 10.15.7
    Memory: 436.29 MB / 32.00 GB
  Binaries:
    Node: 14.15.1 - /usr/local/bin/node
    Yarn: 1.3.2 - /usr/local/bin/yarn
    npm: 6.14.8 - /usr/local/bin/npm
  Languages:
    Bash: 3.2.57 - /bin/bash

Code Snippet

const { chromium } = require("playwright");
 
(async () => {
  const browser = await chromium.launch({ headless: false }); //Crashes
  //const browser = await chromium.launch({ headless: true }); //Doesn't crash
  const context = await browser.newContext();
  const page = await context.newPage();
  await page.goto("https://www.californiaorganics.com/");
  const dimensions = await page.evaluate(() => {
    return {
      width: document.documentElement.clientWidth,
      height: document.documentElement.clientHeight,
      deviceScaleFactor: window.devicePixelRatio
    }
  });
  console.log(dimensions);
 
  await browser.close();
})();

Output upon crashing:

(node:40976) UnhandledPromiseRejectionWarning: page.goto: Navigation failed because page crashed!
=========================== logs ===========================
navigating to "https://www.californiaorganics.com/", waiting until "load"
============================================================
Note: use DEBUG=pw:api environment variable and rerun to capture Playwright logs.

Describe the bug I get the aforementioned error message (page.goto: Navigation failed because page crashed!) when I simply try to load https://www.californiaorganics.com/. Actually, it looks like it crashes “randomly” at different times - sometimes while loading, other times once loading is complete and my script’s actions are underway.

I’ve written a script (above) that seems to consistently demonstrate the problem. Note that I get different behavior if headless: false is specified. Headless doesn’t crash whereas non-headless (headful) does crash.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
delimmycommented, Mar 7, 2021

It’s crashing for me as well. Same OS version. Node 14.15.4. On playwright 1.9 (latest)

0reactions
pavelfeldmancommented, Apr 5, 2021

Please file a new bug and link this one if this still is a case for you! Closing this bug as non-actionable for now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[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 >
Navigation failed because page crashed! JavaScript Playwright
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 >
page.goto: navigation failed because page crashed - You.com
Describe the bug I get the aforementioned error message ( page.goto: Navigation failed because page crashed! ) when I simply try to load ......
Read more >
Navigating & waiting - Checkly
Initial navigation to any page is pretty much the same for both frameworks and can happen in multiple ways. Whenever your code does...
Read more >
Puppeteer documentation - DevDocs
If there's no element matching selector , the method throws an error. Bear in mind that if click() triggers a navigation event and...
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