SimplePhotos
SimplePhotos

Reputation: 47

Navigation failed because page crashed! JavaScript Playwright

I am trying to go to a secondary URL after an action is completed on the first page on playwright, everytime I go to the secondary page the error

UnhandledPromiseRejectionWarning: page.goto: Navigation failed because page crashed
=========================== logs ===========================
navigating to "https://google.com", waiting until "load"
============================================================

my code is

await page.goto('https://youtube.com');
await sleep(10000);
await page.goto('https://google.com');
console.log("Passed this!");

Upvotes: 3

Views: 6343

Answers (2)

Tim Stewart
Tim Stewart

Reputation: 165

The "Navigation failed because page crashed" error can also be produced if the system Playwright is running on runs out of available RAM.

Upvotes: 3

SimplePhotos
SimplePhotos

Reputation: 47

its just the page timeout. Just do await page.setDefaultTimeout(55555) or something

Upvotes: 0

Related Questions