We have been using conf with an electron* for a while with encryption enabled.
Somehow it's happening to something like 1 out of 100-300 users that the config.json file gets corrupted. We are noticing this happening more to Windows users with also Avast antivirus installed (maybe it's messing with the read/write, or maybe is just a coincidence)
The error we are getting is
SyntaxError: Unxpected Token in JSON at position 0
That is the classical error when JSON.parse fails.
Notes:
Did this ever happen to anybody?
Is there a way to prevent it?
Is it possible that if the app is killed/quitted while writing then the file is messed up? (I see that atomically
is being used, so this shouldn't the case).
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too