illixion / vscode-vibrancy-continued

Enable Acrylic/Glass effect for your VS Code.
MIT License
544 stars 31 forks source link

[Bug]: EEXIST: file already exist #40

Closed mugeneous closed 1 year ago

mugeneous commented 1 year ago

Is there an existing issue for this?

Current Behavior

Something went wrong: Error: EEXIST: file already exists, mkdir 'c:\Users\mulya\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vscode-vibrancy-runtime-v6'

Expected Behavior

No response

Steps To Reproduce

No response

Environment

- OS:Windows 11
- VSCode:1.73.1
- Extension: 1.1.9

Anything else?

Screenshot 2022-11-11 185140 this happens when i reload vibrancy. Do you know how to solve this?

illixion commented 1 year ago

Hi. Haven't seen this error before, Vibrancy is supposed to delete the existing runtime folder before copying the newest version upon running the reload action, but in your case the folder wasn't deleted for some reason. Perhaps it's a permission issue, though it should've generated a different error if that's the case.

Could you please try going to c:\Users\mulya\AppData\Local\Programs\Microsoft VS Code\resources\app\out and deleting the vscode-vibrancy-runtime-v6 folder manually, then trying the Reload Vibrancy action again?

apreheim commented 1 year ago

I'm seeing this error as well. I tried deleting the folder manually and reloading results in the same error.

mugeneous commented 1 year ago

Hi. Haven't seen this error before, Vibrancy is supposed to delete the existing runtime folder before copying the newest version upon running the reload action, but in your case the folder wasn't deleted for some reason. Perhaps it's a permission issue, though it should've generated a different error if that's the case.

Could you please try going to c:\Users\mulya\AppData\Local\Programs\Microsoft VS Code\resources\app\out and deleting the vscode-vibrancy-runtime-v6 folder manually, then trying the Reload Vibrancy action again?

Thank you illixion. It worked

SuperManito commented 1 year ago

Hi. Haven't seen this error before, Vibrancy is supposed to delete the existing runtime folder before copying the newest version upon running the reload action, but in your case the folder wasn't deleted for some reason. Perhaps it's a permission issue, though it should've generated a different error if that's the case.

Could you please try going to c:\Users\mulya\AppData\Local\Programs\Microsoft VS Code\resources\app\out and deleting the vscode-vibrancy-runtime-v6 folder manually, then trying the Reload Vibrancy action again?

This is a bug of the new version. This bug will reappear every time the configuration is modified. My Environment is the same as the publisher of this issue.

illixion commented 1 year ago

Hi. Haven't seen this error before, Vibrancy is supposed to delete the existing runtime folder before copying the newest version upon running the reload action, but in your case the folder wasn't deleted for some reason. Perhaps it's a permission issue, though it should've generated a different error if that's the case. Could you please try going to c:\Users\mulya\AppData\Local\Programs\Microsoft VS Code\resources\app\out and deleting the vscode-vibrancy-runtime-v6 folder manually, then trying the Reload Vibrancy action again?

This is a bug of the new version. This bug will reappear every time the configuration is modified. My Environment is the same as the publisher of this issue.

Can confirm that this was a bug, for some reason the fs module on Windows can't remove folders that aren't empty, switched to a rimraf library that seems to work properly.

iHeadway commented 1 year ago

Can confirm that this was a bug, for some reason the fs module on Windows can't remove folders that aren't empty, switched to a rifraf library that seems to work properly.

Previous version (1.1.10) didn't work for me at all. 1.1.11 is working but after every successful change in settings next time I got "Apply changes failed, please run Visual Studio Code with administrator privileges, see description for more details: Error: EPERM: operation not permitted, unlink 'c:\Program Files\Microsoft VS Code\resources\app\out\vscode-vibrancy-runtime-v6\displayconfig.node'" in admin mode.

illixion commented 1 year ago

Can confirm that this was a bug, for some reason the fs module on Windows can't remove folders that aren't empty, switched to a rifraf library that seems to work properly.

Previous version (1.1.10) didn't work for me at all. 1.1.11 is working but after every successful change in settings next time I got "Apply changes failed, please run Visual Studio Code with administrator privileges, see description for more details: Error: EPERM: operation not permitted, unlink 'c:\Program Files\Microsoft VS Code\resources\app\out\vscode-vibrancy-runtime-v6\displayconfig.node'" in admin mode.

Weird, it’s supposed to work in your case if you’re running VSCode as an administator. I’ll test system-wide VSCode installations later, but as a workaround, you could try deleting this folder manually.

iHeadway commented 1 year ago

Weird, it’s supposed to work in your case if you’re running VSCode as an administator.

It's working but every second time. Like if I want to change the opacity from 0 to 1, if I'm close VSC, run it as admin and try to change the opacity, it gives me the error. But if I'll try that in the current window and then restart VSC as admin it will work.

illixion commented 1 year ago

Weird, it’s supposed to work in your case if you’re running VSCode as an administator.

It's working but every second time. Like if I want to change the opacity from 0 to 1, if I'm close VSC, run it as admin and try to change it to 1, it gives me the error. But if I'll try that in current window and then run it as admin it will work.

Oh okay, sounds like you’re still encountering this bug, but with a different error message. I’m not sure why the fix doesn’t work on your end, but I have an alternative solution to this, will look into that in a day or two.

illixion commented 1 year ago

Took a bit longer than expected, but I just pushed a fix in v1.1.12 that should resolve this, let me know if you still encounter any issues.