Skip to content
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

Uncaught Exception: Error: EPERM: operation not permitted, rename #204

Open
Niokx opened this issue Mar 25, 2023 · 1 comment
Open

Uncaught Exception: Error: EPERM: operation not permitted, rename #204

Niokx opened this issue Mar 25, 2023 · 1 comment

Comments

@Niokx
Copy link

Niokx commented Mar 25, 2023

I am getting this error, when changing a slider value "too" fast inside the GUI, the slider value gets written to a "config.json".
I am using the latest version for the json read/write, any idea how I can fix this issue or avoid it or just suppress the error message and try again?

With Electron I am getting the error "A JavaScript error occurred in the main process"

Uncaught Exception:
Error: EPERM: operation not permitted, rename
'C:\Users\user\AppData\Roaming\Electron\storage\config.json.1464805734' ->
'C:\Users\user\AppData\Roaming\Electron\storage\config.json'

Screenshot 2023-03-25 151244

@jviotti
Copy link
Member

jviotti commented Mar 27, 2023

Hi @Niokx,

These renames happen internally as a way to make atomic writes. On Windows, I have seen this happening often due to anti-virus software, etc (including Defender) locking files for analysis and preventing certain I/O operations altogether while they run.

Can you try to catch this error, check if it is EPERM and if so try the operation you were initially trying to do again? My understanding is that if AV software is getting in between, retrying enough will make it work.

Let me know how it goes. If it does fix the problem, I could try doing the try internally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants