Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
rinogo opened this issue Mar 2, 2021 · 9 comments
Closed

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

rinogo opened this issue Mar 2, 2021 · 9 comments

Comments

@rinogo
Copy link

rinogo commented Mar 2, 2021

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.

@pavelfeldman
Copy link
Member

It works for me on the same settings. Could you try latest Playwright? That would be 1.9.

@delimmy
Copy link

delimmy commented Mar 7, 2021

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

@aslushnikov
Copy link
Collaborator

@rinogo @delimmy Usually, pages are crashing when they run out of memory. If you just open the chromium browser regularly and navigate it manually to the webpage - does it crash for you?

@rinogo
Copy link
Author

rinogo commented Mar 18, 2021

@aslushnikov Nope, it doesn't crash. And I should note that the crashing is inconsistent - it seems that the more that I use Playwright to control Chromium, the more likely it is to crash.

I've created a few videos demonstrating the presence and absence of the issue - what's the best way to privately send them to you?

@aslushnikov
Copy link
Collaborator

@rinogo the best way would be to e-mail them to anlushni [at] microsoft [dot] com

@aslushnikov
Copy link
Collaborator

@rinogo I received your crash video, but that's not actionable by itself, unfortunately. The only way to act upon this would be to have a good repro that we can reproduce locally - this way we can debug what's going on. Any chance you can give us this?

@rinogo
Copy link
Author

rinogo commented Mar 30, 2021

@aslushnikov The Code Snippet in this Issue is the best that I can do - it crashes for me. It doesn't crash for you? Maybe it's something specific to this version of OS X.

@pavelfeldman
Copy link
Member

@rinogo does not crash for me, could you try Playwright 1.10? It has newer Chromium...

@pavelfeldman
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants