Skip to content

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

@rinogo

Description

@rinogo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions