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

Database Error: "Error: database disk image is malformed" #39

Open
distalx opened this issue May 21, 2024 · 3 comments
Open

Database Error: "Error: database disk image is malformed" #39

distalx opened this issue May 21, 2024 · 3 comments

Comments

@distalx
Copy link

distalx commented May 21, 2024

First of all, thank you for the fantastic work on this project! I've been really enjoying using it and appreciate all the effort that has gone into making it so robust and user-friendly.

However, I've encountered an issue that I hope you can help with. When I enter a prompt, it is successfully sent to the respective model APIs and I do receive a response. The response appears in the chat but unfortunately, it does not get stored in the database.

Additionally, I observe a popover message on the top right corner that says:

Error: database disk image is malformed

Upon checking the developer tools, I see the following error:

Error: database disk image is malformed
SQLiteError — sqlite-api.js:11
check — sqlite-api.js:866

I am currently on the latest commit d1f71cd2e48f0bd941d9c612cd4a57abb1fd6f6e.

I've tried to troubleshoot the issue by following the discussion in iansinnott/prompta#5 and vlcn-io/js#31, but unfortunately, I haven't found a solution yet.

I'm running the project locally, and before attempting more drastic measures, I'd like to know which files I should backup to ensure I don't lose any important data. could you please guide me on what specific files I should backup?

Thank you so much for your help and for maintaining such a great project!

@distalx
Copy link
Author

distalx commented May 24, 2024

I wanted to share an update on how to back up and restore current chats. Here are the steps I followed:

  1. To back up current chats:

    • Go to settings.
    • Scroll down and click on "Show Advanced."
    • Select "Export All."
  2. To reset the database:

    • Scroll down into options menu and click on Reset Database.
    • Confirm by clicking Yes twice.
    • Restart the app.
  3. To restore the backup:

    • Go to settings.
    • Scroll down and choose "Show Advanced."
    • Click on "Import."
    • Select backup file

However, I've noticed that when I restore the backup, I encounter the same error: database disk image is malformed. This issue might be related to corrupted data. When I start with a clean database, everything works perfectly.

I'll continue to investigate this issue and will post any new findings here.

@distalx distalx closed this as not planned Won't fix, can't repro, duplicate, stale May 24, 2024
@distalx
Copy link
Author

distalx commented Jun 1, 2024

It seems that the issue has resurfaced intermittently.
Unfortunately, I haven't been able to consistently reproduce it yet.

I am reopening this issue to keep track of any further occurrences and gather more information.

@distalx distalx reopened this Jun 1, 2024
@iansinnott
Copy link
Owner

Yeah, this one is hard to reproduce and thus hard to debug.

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