sindresorhus / electron-store

Simple data persistence for your Electron app or module - Save and load user preferences, app state, cache, etc
MIT License
4.57k stars 148 forks source link

ENOENT: no such file or directory #258

Closed iamisti closed 1 year ago

iamisti commented 1 year ago

version: "electron-store": "7.0.3", "electron": "12.2.3",

We've been having an issue that only affects a small percentage of our users.

ENOENT: no such file or directory, open 'C:\Users\marti\Documents\MyFancyApp\userstate.json.tmp-4456844718a89bc9'

We dont understand why it happens. Upon debugging it with the user, the documents folder is there, the "MyFanceApp" folder is there as well. It seems to have problems creating the tmp file, because even if we create the 'userstate.json' file manually, we still get the same error. We've tried to run the applicaation with admission privileges, didnt help solving the issue. So the issue most likely not a permission issue.

Is there a way to avoid this or at least to handle the error? It brakes the whole application.

sindresorhus commented 1 year ago

The problem is with the https://github.com/fabiospampinato/atomically package (dependency of conf which is a dependency of electron-store). You should open an issue there instead.