wxt: Persist data not working (Windows11, Chrome)
Describe the bug
I’m reading through the new docs and am trying to implement persist-data
I have this in my web-ext.config.ts file (which is in my root):
// web-ext.config.ts
export default defineRunnerConfig({
chromiumArgs: ["--user-data-dir=./.wxt/chrome-data"],
});
I saved, restarted VSCode and ran pmpm dev. There was no new directory added to .wxt for /chrome-data/
I installed a plugin in the dev launched Chrome, cancelled the dev, restarted everything, and the plugin was not there.
Please see the discussion on https://discord.com/channels/1212416027611365476/1290064175791472670
This problem seems to be exclusive to Windows.
Reproduction
I also tried:
// wxt.config.ts
export default defineConfig({
runner: { chromiumArgs: ["--user-data-dir=./.wxt/chrome-data"] },
});
Still with no success.
Steps to reproduce
No response
System Info
System:
OS: Windows 11 10.0.22631
CPU: (16) x64 AMD Ryzen 7 5800H with Radeon Graphics
Memory: 2.78 GB / 15.33 GB
Binaries:
Node: 18.17.1 - C:\Program Files\nodejs\node.EXE
npm: 10.4.0 - C:\Program Files\nodejs\npm.CMD
pnpm: 9.11.0 - ~\AppData\Roaming\npm\pnpm.CMD
Browsers:
Edge: Chromium (127.0.2651.74)
Internet Explorer: 11.0.22621.3527
Chrome: Version 129.0.6668.71 (Official Build) (64-bit)
npmPackages:
wxt: ^0.19.1 => 0.19.10
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.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 24 (6 by maintainers)
Thanks for all your hard work!
So… Should I just update the docs to use
chromiumProfileinstead of--user-data-dir? Does just using a profile keep you logged into sites from previous sessions?On mac, I know it doesn’t work like that. Since it copies files into a temp dir, logins don’t persist, and you have to log in every time. That’s why
--user-data-dirworks, it doesn’t move or copy the files, so you stay logged in.Do we also need to recommend using
keepProfileChangesalongsidechromiumProfile?If so, I think it makes sense to create option that automatically applies the required config based on the current operating system.
Wait, hold on, so it did create a
chrome-datafolder at some point?