playwright icon indicating copy to clipboard operation
playwright copied to clipboard

[Bug]: Playwright UI crashes with "Out of Memory"

Open chrispelzer76 opened this issue 1 year ago • 4 comments

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. image Anmerkung 2024-08-27 121156

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

chrispelzer76 avatar Aug 27 '24 10:08 chrispelzer76

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)?

yury-s avatar Aug 27 '24 16:08 yury-s

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

chrispelzer76 avatar Aug 28 '24 07:08 chrispelzer76

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.

Skn0tt avatar Aug 28 '24 08:08 Skn0tt

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.

Skn0tt avatar Aug 28 '24 09:08 Skn0tt

We found a memory leak in our code. Gonna work on a fix.

Skn0tt avatar Aug 28 '24 15:08 Skn0tt

Its still occurring in : "@playwright/test": "1.49.1",

ScarletMcLearn avatar Jun 17 '25 09:06 ScarletMcLearn

That's a pretty old version. If it's also occuring in 1.53.0, file another bug.

Skn0tt avatar Jun 17 '25 09:06 Skn0tt

Thank you for your response. @Skn0tt I have reported another : https://github.com/microsoft/playwright/issues/36337

ScarletMcLearn avatar Jun 17 '25 12:06 ScarletMcLearn