-
Notifications
You must be signed in to change notification settings - Fork 96
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
bad file descriptor errors #27
Comments
No way! I've just rewritten my app because I thought it was my fault. 😢 Nice to see it being fixed though 👍 |
Actually, I've found the issue may actually be that both the main and renderer functions are trying to set the state on disk. I've managed to fix it by adding an if statement that checks that the process is the main one, before trying to commit the json to disk. Seems to have fixed everything for me. I'll create a new fork and see if this one can be merged in. |
I've been testing the new build of my app - and sometimes I get 10+ state updates within a second, so I think these be better off being queued and written every configurable-timeframe (eg 500ms) as I assume the debounce PR addresses. It would definitely increase performance once the process check fix is implemented. Yes, it may cut my writes by half, but I still think I may have the same issue without the debounce PR too What are your thoughts? |
I think that the error is caused by bug in write-file-atomic Easiest solution is to upgrade electron-store module to 3.3.0, which requires newer version of conf module, which requires version write-file-atomic where the bug was fixed |
I have tried upgrading electron/vuex-electron/write-file-atomic and tried the method by michaeljpeake, but useless. Finally I change to use ipMain = = |
I keep getting errors,
Uncaught Error: EBADF: bad file descriptor, close
, that point back to thesetState
function in PersistedState.I wonder if this happens when multiple mutations happen in quick succession. Is there a known limitation in this sense? Is so, might it be possible to implement some kind of debounce to prevent file issues?
The text was updated successfully, but these errors were encountered: