question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

Context:

  • Playwright Version: 1.10.0
  • Operating System: Mac, Linux (GitHub Actions)
  • Node.js version: 12.x, 14.x
  • Browser: WebKit

Describe the bug

The problem occurs when running tests using @web/test-runner-playwright with Playwright 1.10.0

Here is the error message:

Error: page.goto: Navigation failed because page crashed!
=========================== logs ===========================
navigating to "about:blank", waiting until "load"
============================================================

Notably, only one of the test files in our project causes this failure. And it’s not the heaviest one among our 190+ test files.

It does not feel random as the error goes away when skipping the test suite placed in that file. But I could not pinpoint which parts of code and e.g. DOM API calls might be related.

Please see the full log with the DEBUG=pw:api flag enabled below:

Full log
$ yarn test:webkit --group vaadin-crud
yarn run v1.22.5
$ DEBUG=pw:api web-test-runner --config web-test-runner-webkit.config.js --group vaadin-crud
  pw:api => browserType.launch started +0ms

Webkit: |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ                    | 0/3 test files | 0 passed, 0 failed

Running tests...

  pw:api <= browserType.launch succeeded +510ms
  pw:api => browser.newContext started +1ms
  pw:api <= browser.newContext succeeded +122ms
  pw:api => browserContext.newPage started +33ms
  pw:api <= browserContext.newPage succeeded +511ms
  pw:api => page.setViewportSize started +0ms
  pw:api <= page.setViewportSize succeeded +6ms
  pw:api => page.goto started +0ms
  pw:api navigating to "http://localhost:8000/?wtr-session-id=dcd377ac-ede8-4fc1-8c2f-cbd32f8fb00c", waiting until "load" +3ms
  pw:api   navigated to "http://localhost:8000/?wtr-session-id=dcd377ac-ede8-4fc1-8c2f-cbd32f8fb00c" +81ms
  pw:api   "load" event fired +246ms
  pw:api   "domcontentloaded" event fired +1ms
  pw:api <= page.goto succeeded +36ms
Webkit: |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ                    | 1/3 test files | 16 passed, 0 failed

Running tests...

  pw:api => page.setViewportSize started +13ms
  pw:api <= page.setViewportSize succeeded +9ms
  pw:api => page.goto started +0ms
  pw:api navigating to "http://localhost:8000/?wtr-session-id=9ec4bd19-43ae-4bfc-ae73-0a85ea872ddf", waiting until "load" +10ms
  pw:api   navigated to "http://localhost:8000/?wtr-session-id=9ec4bd19-43ae-4bfc-ae73-0a85ea872ddf" +126ms
  pw:api   "domcontentloaded" event fired +5ms
  pw:api   "load" event fired +82ms
  pw:api <= page.goto succeeded +4ms
  pw:api   "networkidle" event fired +1s
Webkit: |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ          | 2/3 test files | 43 passed, 0 failed

Running tests...

  pw:api => page.setViewportSize started +2ms
  pw:api <= page.setViewportSize succeeded +4ms
  pw:api => page.goto started +0ms
  pw:api navigating to "http://localhost:8000/?wtr-session-id=e074862f-fd73-4451-b565-6f98f2bc5086", waiting until "load" +0ms
  pw:api   navigated to "http://localhost:8000/?wtr-session-id=e074862f-fd73-4451-b565-6f98f2bc5086" +80ms
  pw:api   "domcontentloaded" event fired +101ms
  pw:api   "load" event fired +5ms
Webkit: |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 3/3 test files | 43 passed, 0 failed
packages/vaadin-crud/test/crud.test.js:

 ❌ Tests were interrupted because the browser disconnected.

 ❌ Error: page.goto: Navigation failed because page crashed!
=========================== logs ===========================
navigating to "about:blank", waiting until "load"
============================================================
Note: use DEBUG=pw:api environment variable to capture Playwright logs.
    page.goto: Navigation failed because page crashed!
    =========================== logs ===========================
    navigating to "about:blank", waiting until "load"
    ============================================================
    Note: use DEBUG=pw:api environment variable to capture Playwright logs.
    Error
        at Object.captureStackTrace (/Users/sergey/vaadin/vaadin-web-components/node_modules/playwright/lib/utils/stackTrace.js:48:19)
        at Connection.sendMessageToServer (/Users/sergey/vaadin/vaadin-web-components/node_modules/playwright/lib/client/connection.js:69:48)
        at Proxy.<anonymous> (/Users/sergey/vaadin/vaadin-web-components/node_modules/playwright/lib/client/channelOwner.js:64:61)
        at /Users/sergey/vaadin/vaadin-web-components/node_modules/playwright/lib/client/frame.js:102:65
        at Frame._wrapApiCall (/Users/sergey/vaadin/vaadin-web-components/node_modules/playwright/lib/client/channelOwner.js:77:34)
        at Frame.goto (/Users/sergey/vaadin/vaadin-web-components/node_modules/playwright/lib/client/frame.js:100:21)
        at /Users/sergey/vaadin/vaadin-web-components/node_modules/playwright/lib/client/page.js:296:60
        at Page._attributeToPage (/Users/sergey/vaadin/vaadin-web-components/node_modules/playwright/lib/client/page.js:231:20)
        at Page.goto (/Users/sergey/vaadin/vaadin-web-components/node_modules/playwright/lib/client/page.js:296:21)
        at PlaywrightLauncherPage.stopSession (/Users/sergey/vaadin/vaadin-web-components/node_modules/@web/test-runner-playwright/dist/PlaywrightLauncherPage.js:32:35)

Webkit: |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 3/3 test files | 43 passed, 0 failed

Error while running tests.

  pw:api <= browser.close succeeded +55ms
error Command failed with exit code 1.

Note

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
mxschmittcommented, Jun 22, 2021

We update WebKit quite regularly. So it should be probably then included in v1.13 with the next roll.

1reaction
mxschmittcommented, Apr 15, 2021

Seems like it was already reported in their bug tracker: https://bugs.webkit.org/show_bug.cgi?id=224408

Read more comments on GitHub >

github_iconTop Results From Across the Web

[BUG] Navigation failed because page crashed! (Javascript ...
Steps that our test flows go thru,. Login. (lot of navigation happens in the background before page loads). Click the link -- ERROR...
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 >
Puppeteer documentation - DevDocs
Puppeteer 7.1.0 API documentation with instant search, offline support, keyboard shortcuts, mobile version, and more.
Read more >
Forcibly closed connection causing test to fail - xk6-browser
It's probably because the connection to the browser is gone. Then again, maybe you could try waiting for the function first usingΒ ...
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