playwright
playwright copied to clipboard
[Bug]: Playwright UI crashes with "Out of Memory"
Version
1.46.1
Steps to reproduce
- have a complex website to test
- have a testcase with 100+ test.step(...) inside and 100+ of expect and actions inside of these - in my current case, the metadata tab says: Counts - pages: 1, actions: 387, events: 223
- run the test
- after completion click and/or hover through the actions tree - it will switch through the numberous snapshots of the website on the right side
- eventually the whole Plawright UI window crashes with an "Out of Memory" Error Message.
With any test of this size it is 100% reproducible within 10 seconds of browsing through the snapshots.
Expected behavior
no crash
Actual behavior
crash!
Additional context
Is there a way to reduce the memory footprint of playwright? We want to use it on non-dev notebooks with only 16 GB RAM, but that seems to be impossible with our scenario.
Environment
System:
OS: Windows 10 10.0.19045
Memory: 5.09 GB / 31.69 GB
Binaries:
Node: 20.11.0 - ~\scoop\apps\nodejs-lts\current\node.EXE
Yarn: 4.3.1 - ~\scoop\apps\nodejs-lts\current\bin\yarn.CMD
npm: 10.2.4 - ~\scoop\apps\nodejs-lts\current\npm.CMD
This should reproduce with the tracing as well, can you try that? If it reproduces, would it be possible to share the trace file with us, so that we could debug it locally (I assume the codebase is private and you cannot share the test itself)?
Yes, it reproduces with the trace viewer as well. I can send you our trace.zip. Is there a way to do that non-public? The zip size is 55MB
Sure thing. Send it over to simonknott at microsoft com and i'll take a look. If it's too big for email, a download link is also fine.
Thanks, I received the trace and can repro the crash on my end. @yury-s i've forwarded it to so you can also take a look. I'll investigate what exactly is leading to the crash and what we can do to prevent it.
We found a memory leak in our code. Gonna work on a fix.
Its still occurring in : "@playwright/test": "1.49.1",
That's a pretty old version. If it's also occuring in 1.53.0, file another bug.
Thank you for your response. @Skn0tt I have reported another : https://github.com/microsoft/playwright/issues/36337