[BUG] Error: page.goto: Navigation failed because page crashed!
See original GitHub issueContext:
- 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
- See the corresponding bug report for
@web/test-runner-playwright
at https://github.com/modernweb-dev/web/issues/1392 - Downgrading Playwright to 1.9.2 helped to get rid of the page crash: https://github.com/vaadin/web-components/commit/f6953a6bab15ec2c4f9b4403c9a7598e548819a4
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We update WebKit quite regularly. So it should be probably then included in v1.13 with the next roll.
Seems like it was already reported in their bug tracker: https://bugs.webkit.org/show_bug.cgi?id=224408