Chrome profile copy left unused
What happened?
An opt-in env var (WIGOLO_CHROME_PROFILE_PATH, meant for authenticated fetches) copies your entire actual Chrome profile - cookies, saved logins, history - to a temp folder, and that copy is never used by the code that's supposed to consume it (dead code path) and never cleaned up. privacy leak, but only if you deliberately set that specific variable since default install never touches it. WIGOLO_CDP_URL with self launched chrome works.
I didn't experience this bug, claude code found it while I had it check it before installing, just FYI.
Command / tool call
No response
wigolo version
0.1.43-beta.0
OS + Node version
win11
Output of npx wigolo doctor (if relevant)
Logs / error output
I reviewed the reported path and confirmed that WIGOLO_CHROME_PROFILE_PATH creates a temporary copy of the Chrome user-data directory, but the resulting userDataDir is not consumed by the browser-fetch path. The temporary copy is also not removed.
I can prepare a fix. My proposed approach is to preserve the opt-in profile-auth feature: launch a dedicated persistent Chromium context from the copied profile, use it for the authenticated request, then close the context and delete the temporary directory in finally, including failure and abort paths.
I would add regression coverage proving that the copied profile is used and always cleaned up.
Before I start, can a maintainer confirm whether this is the intended direction, or whether WIGOLO_CHROME_PROFILE_PATH should instead be removed in favor of CDP/storage-state authentication?
Thanks @evandariel for opening this issue, and @Faiyajz for the additional input.
We have some major improvements coming soon, and I'll update this thread as soon as I can confirm whether this will be covered as part of those changes.
I also noticed @josephkehan-prog is already working on a PR for this—thanks for jumping in! I'll review everything as soon as possible.
Really appreciate everyone's contributions and feedback.
Hi @evandariel — thank you for taking the time to open this, and sorry for the slow response.
I've been heads-down building some pretty big features and improvements for wigolo, and as a solo dev, shipping that while also triaging and maintaining every issue and PR has been genuinely hard. This isn't forgotten — it just hasn't had the attention it deserves yet.
I'd really appreciate your patience here. I'm going to go through the open issues and PRs properly over the next few weeks (sooner if I can free up), and I'll follow up right here.
In the meantime, the wigolo Discord is open if you'd like to follow what's being built, ask questions, or nudge me directly: https://discord.gg/BkUUgz2bNF
Thanks again for raising this, and for understanding — it genuinely means a lot. 🙏
Pickup notes (confirmed on main; this is also a privacy cleanup):
src/fetch/auth.tscopies the wholechromeProfilePathinto amkdtempSync('wigolo-chrome-')directory on every call and returns{ userDataDir }.src/fetch/browser-pool.tsonly usesuserDataDiras a gate (≈L624) and never launches with it. So the copy (cookies and all) is unused and never deleted.- Pick one:
- Make it work: launch a persistent context from the copy (
chromium.launchPersistentContext(userDataDir, …)) for that fetch, andrmSync(dir, { recursive: true, force: true })in afinally. Copy once per process, not once per fetch. - Remove it: drop
chromeProfilePathand point users atWIGOLO_AUTH_STATE_PATH(#526), which is lighter and safer.
- Make it work: launch a persistent context from the copy (
- Either way, add a test that no
wigolo-chrome-*directory survives a fetch.
Pairs naturally with #526.
Generated by Claude Code