Closed MSIH closed 2 years ago
This works as expected. userDataDir
is meant to reuse an existing profile and will create a new one if it does not exist.
Ah, the issue is that it doesn't remove the directories. Reproducible by running the example from readme.
This happens on both playwright and puppeteer
It's generated here: https://github.com/apify/browser-pool/blob/2f89cb5273f9b8cfd04c25458bc435bbbc7fa67d/src/launch-context.ts#L80 but it doesn't exist so chrome creates it but doesn't clean it up since it was explicitly provided. Definitely an issue in browser-pool
.
https://github.com/microsoft/playwright/blob/c4eb2d4b1e17a0de1cea7220be45545c7c524614/src/server/browserType.ts#L146-L149 we don't have to provide userDataDir
My /tmp folder is filling up with 1000s of chrome browser session data like cookies and local storage.