[Bug]: Memory and node threads continue to increase after the test finished
Version
1.46.1
Steps to reproduce
- Create new folder and init Playwright:
npm init playwright@latest
- Open the folder in VSCode, run the example test by clicking the run button.
Expected behavior
After test run, node process stopped.
Actual behavior
node process threads continue to increase and never stop.
Additional context
- I tested on my friends's computer on Windows, and she faced the same problem. When I start debugging, the number of workers continues to increase, never stopping.
- I tried using terminal to run, and sometimes the node process stopped, sometimes it did not stop.
Environment
System:
OS: macOS 14.5
CPU: (8) arm64 Apple M3
Memory: 57.19 MB / 24.00 GB
Binaries:
Node: 20.0.0 - ~/.nvm/versions/node/v20.0.0/bin/node
npm: 9.6.4 - ~/.nvm/versions/node/v20.0.0/bin/npm
IDEs:
VSCode: 1.92.2 - /usr/local/bin/code
Languages:
Bash: 3.2.57 - /bin/bash
npmPackages:
@playwright/test: ^1.46.1 => 1.46.1
It's likely something specific to your environment, I was not able to reproduce it neither on Mac nor on Windows. Does it also happen when you run the tests from command line?
@yury-s I tried with the terminal, but it happened sometimes.
I saw that some of my friends got this issue too.
Can you update Node to the latest active LTS (v20.17.0) and see if the problem persists? Unfortunately, there is not much we can do without a repro.
Hi @yury-s, I tried with v20.17.0 and see that the error still happened.
I just init new project without any modification. npm init playwright@latest
Unable to reproduce as well. As much as we'd like to, we can't do anything about this if we can't repro.
It's interesting to me that your top node process uses 9gb of memory. Could you maybe check what files and ports the process it has opened? (⌘+i -> Open Files and Ports)
Hi @Skn0tt, Here is the output: https://gist.github.com/minhphong306/714554a97c38950133afed9b4acd7ccf
Thanks! Can't really spot any smoking gun in there, but it was worth a try. Is there a chance that both you and your friend are using a special kind of antivirus software or anything of the sorts that might be messing up with the processes?
I don't think so @Skn0tt. I didn't use any antivirus software. Let me check with my friends and I will update here.
If you have any suggestions, please tell me. Thank you so much.
Closing because we lack the information and unable to repro. If you figure out something useful, please file a new issue by filling the "Bug Report" template, and link to this one.
Update: Not sure why, but it seems happened with Node version 20.0.0 You need to remove nodejs completely, restart your computer and install version 22.9.0 or higher.
In case you nvm, please change the default node version and restart VSCode. Hope this helps!