dineug / erd-editor

Entity-Relationship Diagram Editor
https://erd-editor.io
MIT License
874 stars 90 forks source link

Unable open file.erd.json -166... #374

Closed insidesecurity-yhojann-aguilera closed 1 month ago

insidesecurity-yhojann-aguilera commented 1 month ago

Describe the bug When try open my diagram created by this plugin for visual studio code says Error no surch file or directory, open /home/user/.var/app/com.visualstudio.code/config/Code/User/workspaceStorage/9568.../dineug.vuerd-vscode/-1668366....

What is -1668366... file name?, attach a screenshot:

Screenshot from 2024-07-19 15-21-43

To Reproduce

I don't know exactly how to reproduce this error, I have a private diagram of a project and until I saved it there was no problem but now it doesn't want to load. I have no problems creating a new diagram, the problem is when it tries to open the existing one. I have not made any manual changes to this file, the computer where it is located is mine alone so no one else or any software could have made additional changes to it.

I try reinstall the plugin but does not work.

If you need any specific information from the diagram file, please let me know, I cannot publish it openly in this place as it contains confidential information.

Browser:

VSCode:

insidesecurity-yhojann-aguilera commented 1 month ago

I try delete parts of .erd.json file and try load again in visual studio but I ended up deleting almost all the content without even being able to open it, I realized that the problem is not the file with its content but a problem with the file path, I have changed the name and it has loaded correctly, but why does it happen? This is not a problem with access to the json file, it is not a permissions problem or anything, could it be a problem in the webcache of the webkit engine in visual studio?

Maybe there is some configuration of the plugin that is corrupting access to the diagram, if I rename the file to the original name it cannot open it again, throwing the same error again. Please review how the configurations related to the open diagram files are being saved.

dineug commented 1 month ago

VSCode has a backup process for cases when files are closed without saving. The path in question appears to be the backup path managed by VSCode, and it seems it was deleted by an external factor.

It seems that the integrity of the backup information managed by VSCode has been compromised. It looks necessary to cleanly delete all VSCode caches and perform a fresh reinstallation.

https://github.com/dineug/erd-editor/blob/e1c685ea5d72b509174461b2f03039cef3070dde/packages/erd-editor-vscode/src/erd-editor-provider.ts#L44