`firefox-profile` cannot delete `profileDir`
Open
Nobody has claimed this yet.
upstream
- Dominant language
- TypeScript
- Stars
- 10.5k
- Forks
- 564
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
[firefox-profile] cannot delete profileDir on exit ***\AppData\Local\Temp\firefox-profileln8DEw/ Error: EPERM, Permission denied: \\?\***\AppData\Local\Temp\firefox-profileln8DEw '\\?\***\AppData\Local\Temp\firefox-profileln8DEw'
at Object.rmSync (node:fs:1205:18)
at FirefoxProfile ._ cleanOnExit (***\wxt\node_modules\.pnpm\firefox-profile@4.7.0\node_modules\firefox-profile\lib\firefox_profile. js:289:12)
at process. FirefoxProfile. onExit (***\wxt\node_modules\.pnpm\firefox-profile@4.7.0\node_modules\firefox-profile\lib\firefox_profile. js:172:12)
at process.emit (node:events:520:22)
at process.emit (node: domain: 489:12)
at process.exit (node:internal/process/per_thread:236:15)
at process. FirefoxProfile. onSigInt (***\wxt\node_modules\.pnpm\firefox-profile@4.7.0\node_modules\firefox-profile\lib\firefox_profile.js:177:13)
at process.emit (node: events: 508:20)
at process.emit (node: domain: 489:12)
at Signal. callbackTrampoline (node: internal/async_hooks:131:14) {
errno: 1,
code: 'EPERM'
path: '\\\\?\C:\\Users\\***\\AppData\\Local\\Temp\\firefox-profileln8DEw',
syscall: 'rm'
On *** - was a absolute path from my PC
It's happening on close wxt -b firefox
Reproduction
- Clone this repo
- Run
wxt -b firefoxonpackages/wxt-demo
Steps to reproduce
No response
System Info
System:
OS: Windows 11 10.0.26200
CPU: (12) x64 AMD Ryzen 5 3600 6-Core Processor
Memory: 16.52 GB / 31.91 GB
Binaries:
Node: 25.6.1 - C:\Program Files\nodejs\node.EXE
npm: 11.9.0 - C:\Program Files\nodejs\npm.CMD
pnpm: 10.29.2 - C:\Users\***\AppData\Local\pnpm\pnpm.CMD
bun: 1.3.3 - C:\Users\***\.bun\bin\bun.EXE
Browsers:
Chrome: 146.0.7680.178
Edge: Chromium (140.0.3485.54)
Firefox: 149.0 - C:\Program Files\Mozilla Firefox\firefox.exe
Internet Explorer: 11.0.26100.7309
npmPackages:
wxt: workspace:* => 0.20.20
Used Package Manager
pnpm
Validations
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue from packages/wxt-demo with wxt -b firefox on Windows 11, then inspect the shutdown path reported in node_modules/firefox-profile/lib/firefox_profile.js, especially cleanup at line 289. Determine how WXT's Firefox launch and exit flow relates to the EPERM failure, and verify that the temporary profile is removed without an error on exit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100