-
-
Notifications
You must be signed in to change notification settings - Fork 893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enteauth deleting the entire ~/.cache folder on linux #4536
Comments
Will be fixed in next release. |
Wow, thank you for opening this issue as well as for the upcoming fix! I have been going nuts trying to track down why my ~/.cache folder contents are being periodically wiped out. It is killing the ibus socket files stored there that eventually causes the keyboard input not to work, among many other issues. I have been searching through system logs and putting scripts in place on cron jobs that backup my ~/.cache directory and then restore it has been wiped. The timestamps of this logging I put in place of this happening matches my times using and closing out enteauth. I was also able to just recreate the issue, confirming it is wiping out all contents under ~/.cache/*. Thank you for finding and diagnosing this issue and for the upcoming fix. Will check for an update now. Was on 4.1.6 when adding this comment and testing the issue. |
Unfortunately, it looks like the fix for this issue did not make it into the 4.2.3 release that I updated to earlier today. Just had the contents of my ~/.cache/ folder wiped again when I opened EnteAuth. In case it helps anyone else, here is a script that I have come up with to periodically backup, restore the ~/.cache directory along with restarting IBus so that my keyboard does not quit working when it erases the IBus unix socket file that is for some now placed under the ~/.cache/ directory in Ubuntu 24.04. Hopefully this may help bring someone some sanity and save them some time in triaging the issue in a roundabout way until this issue can be included in an upcoming release. I created a script called restore-cache.sh with the below contents and then put it on a cron job to run every five minutes. After several revisions, this version seems to be working well. Please feel free to use and/or modify it in any way that suits your needs.
Hope this helps in the meantime or that the fix is included for this issue in the next release. |
@prateekmedia any updates on this? It's causing issues for more and more people and I'd say it's a pretty high priority issue. For people who use ente-auth = pkgs.ente-auth.overrideAttrs (o: {
prePatch = ''
substituteInPlace lib/utils/directory_utils.dart \
--replace-fail "return cacheHome" "return Directory(p.join(cacheHome.path, 'enteauthinit'));"
'';
}); I'll look into submitting a proper PR tomorrow if there still won't be any. |
Description
A few minutes after running enteauth, I noticed other programs misbehaving, failing to read files in ~/.cache, and I was surprised to see my cache directory being pretty much empty (~300KB) when it's usually hundreds of MB. This happened for the 3rd time.
Unfortunately I can't consistently reproduce this by opening and closing enteauth (maybe it does it only after a specific amount of time has passed?).
By peeking at the code, looks like it's deleting
tempDirectory
that is being set tocacheHome
which resolves to $XDG_CACHE_HOME that is~/.cache
.It should only delete enteauth's data, something like
~/.cache/enteauth
.Looks like this bug was introduced in 2e01a96 (#3334), cc @prateekmedia
Related: #2563
Version
4.1.6
What product are you using?
Ente Auth
What platform are you using?
Desktop - Linux
The text was updated successfully, but these errors were encountered: