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

After quitting the app unexpectedly, not permitted, rename 'xxx/config.json.tmp-929aed' -> 'xxx/config.json' #254

Closed liees closed 1 year ago

liees commented 1 year ago

image

It can only be started normally after deleting the entire appdata/app

liees commented 1 year ago
"electron-store": {
      "version": "8.1.0",
      "resolved": "https://registry.npmmirror.com/electron-store/-/electron-store-8.1.0.tgz",
      "integrity": "sha512-2clHg/juMjOH0GT9cQ6qtmIvK183B39ZXR0bUoPwKwYHJsEF3quqyDzMFUAu+0OP8ijmN2CbPRAelhNbWUbzwA==",
      "requires": {
        "conf": "^10.2.0",
        "type-fest": "^2.17.0"
      }
    },
liees commented 1 year ago

electron: 13.6.9

partap commented 1 year ago

Just started seeing this as well... SCR-20230329-m59

running... electron-store: 8.1.0 Electron: 22.3.2 Windows 7

I'm using it to (among other things) save window positions for my app in handlers for "move" and "resize". The handlers are debounced...but it does seem like it might be triggered by simultanous writes to the store file.

e.g. I have seen it happen when toggling my window fullscreen back and forth...or sometimes I get "lucky" and it is triggered immediately. The app crashes to desktop after displaying that message, which is no bueno.

It wouldn't be a problem if I could just trap that error and abort the file write instead. Not sure how to go about that though...I'm already using electron-unhandled to just log uncaught exceptions and continue, but it doesn't catch this.

liees commented 1 year ago

Looks like the author of this library is busy with other things~

liees commented 1 year ago

I am using rxdb now