playwright
playwright copied to clipboard
[Bug]: UI Mode Crashes Randomly with Out Of Memory Error
Version
1.53.0
Steps to reproduce
- Have a Global Setup created to Login
- Have a Describe block with Before Each and a Test
- In the Before Each run several steps which take around 10 mins
- Have a Test in the Describe block to run after Before Each
- Run it in UI Mode
Expected behavior
- It should run and pass successfully
Actual behavior
- UI mode crashes and shows out of memory error after completing before each and during running the test
Additional context
Dev Tools Heap Snapshots : Heap Snapshots
Memory Logs: Memory Logs
Environment
System:
OS: Windows 11 10.0.26100
CPU: (32) x64 Intel(R) Core(TM) i9-14900K
Memory: 74.67 GB / 127.77 GB
Binaries:
Node: 20.10.0 - D:\Projects\Tools\Nodist\bin\node.EXE
npm: 10.2.3 - D:\Projects\Tools\Nodist\bin\npm.EXE
pnpm: 10.8.1 - D:\Projects\Tools\Nodist\bin\pnpm.CMD
IDEs:
VSCode: 1.101.0 - F:\Project_Tools\Microsoft VS Code\bin\code.CMD
Languages:
Bash: 5.2.26 - C:\WINDOWS\system32\bash.EXE
npmPackages:
@playwright/test: 1.53.0 => 1.53.0
playwright-ci-reporter: 1.5.3 => 1.5.3
playwright-html-reporter: 0.1.11 => 0.1.11
Thanks for the report! Could you share a minimal reproducible example or more specific steps? The current description is too general for us to reproduce the issue reliably.
My pleasure @mxschmitt !
I will try to produce a minimal reproducible example. Currently found it happening in the framework I designed but its not minimal.
Thanks again for the response.
Hi.
Here's a repo containing minimal code to reproduce.
It breaks when going from hook to test.
This is the test : test("Should edit the employee using saved ID", async ({ page }) => {
https://ufile.io/cv7hajvq
@mxschmitt #33086 Still experience this issue.
Would also like to add - in UI mode - running long tests make PC quite unresponsive / laggy.
Also keeping the Codegen open in Record mode - via page.pause() - for a long time makes system quite laggy / unresponsive as well.
I am facing the exact same issue as well
Crashes when using this as well : npx playwright test --ui --ui-port=8888 --ui-host=127.0.0.1
A more detailed memory profile: https://ufile.io/af0viocz
same here, randomly consumes all them memory when only running 10 pages, with a max of 100 requests per page.
There might be a memory leak issue - code gen and ui mode gets quite unresponsive.
@ScarletMcLearn at what point specifically are you experiencing the OOM? Simply running your login test over and over does increase memory consumption, but it doesn't crash in any short amount of time on my machine (less than 10 minutes).
A more thorough reproduction would be appreciated.
It usually crashes for long tests which run for 10 mins with a lot of API calls and logs. Did you get a chance to go over the memory profile? It shows a spike in memory usage.
After studying a number of traces it's unclear if there's actually a leak here. There's definitely work we can do about loading only subsets of traces to prevent overloading Chrome, but that isn't the same as a leak, and has significantly less urgency for us given this is an unusual scenario.
Closing due to lack of concrete reproduction. Please open a new issue if you are able to reliably and minimally reproduce this issue.