-
Notifications
You must be signed in to change notification settings - Fork 5k
Closed
Description
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
Labels
No labels