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

Fail to load project #5032

Open
dennist12 opened this issue Oct 3, 2024 · 5 comments
Open

Fail to load project #5032

dennist12 opened this issue Oct 3, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@dennist12
Copy link

When I open the app, the error message displays 'Failed to load projects.' I have already restarted my computer, but I still get the same error.

OS: Windows 10
Gitbutler Version: v.0.12.27

image

@Byron Byron added the bug Something isn't working label Oct 3, 2024
@Byron
Copy link
Collaborator

Byron commented Oct 3, 2024

It looks like the projects.json file is defective, so the initial app load fails without recurse.

Could you try renaming or removing it so it can start from scratch next time the application opens up?

As a fix for this, one could probably make the application-startup more resilient.

@Byron Byron added the feedback requested Feedback was requested to help resolve the issue label Oct 3, 2024
@dennist12
Copy link
Author

The content of the projects.json file was malformed, but it has been fixed after I removed the file.

image

@Byron Byron removed the feedback requested Feedback was requested to help resolve the issue label Oct 4, 2024
@Byron
Copy link
Collaborator

Byron commented Oct 4, 2024

I am glad it worked, and thanks for showing the contents - maybe it's a lot of zeros?

In any case, I think since the file is so critical, ideally there is a way to workaround read-failures like this to have some sort of 'auto-fix'.

Since there are thoughts about moving the additional data into a sqlite database, which should be more robust, maybe that would also be the time to protect against corruption of vital resources to never get stuck.

@dennist12
Copy link
Author

dennist12 commented Oct 4, 2024

In notepad it's a empty white text.

That's good, or back up the project.json data in SQLite. If the file gets corrupted, the app can restore it automatically.

@Caleb-T-Owens
Copy link
Contributor

@dennist12, we're planning to eventually transition over to storing the majority of the app data in SQLite so we can have referential integrity and eliminate potential corruption.

Before we do that, as you say, we ought to try and resolve corrupted files, by at the very least defaulting it to empty.

Sorry for the inconvenience.

I'll leave this issue open with two action points being:

  • Gracefully recover from situations where state files are missing
  • Transition over to a harder-to-corrupt data type/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants