toeverything / AFFiNE

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
https://affine.pro
Other
35.82k stars 2.37k forks source link

​Blank page in a local notebook workspace after rebooting my PC #7108

Open adam2am opened 1 month ago

adam2am commented 1 month ago

What happened?

Hello, I don't really know what happened, but today I opened AFFiNE and can only see a blank page in a specific local workspace instead of my notes. My guess is that something damaged the format/db file. Is it possible to restore previous db file or fix smth? Tried to synch, but its the same blank page in the web version as well (again this lesson, guys, do the backups)

So, basically what I did was: Reboot PC. Open AFFiNE. Navigate to the local notebook workspace. Observe the blank page.

Expected Behavior: The notebook workspace should display my notes and content or some notification about damaged database file or the issue, but I see just a blank page instead of it.

Additional Information: I initially thought something was wrong with my local software version. So I used the synchronize button for my workspace to check if its gonna be ok on a cloud (unfortunately, I haven't backed up files before (oof that hurts)). After synchronizing, the same blank page appears even on the cloud version at app.affine.pro/workspace. My guess is that something damaged the original database file or formatting, but affine did let it slide (synched the blank broken format) 2024-05-30 11_15_18-AFFiNE

Environment: Operating System: (Windows 11) Browser: Firefox 126.0 AFFiNE Version: 14.0

Additional Questions: Is it possible to restore the previous db file so I can see my notes again and not just a blank page? Is there any way to diagnose what might have gone wrong with the original file and why it got damaged?

Distribution version

Windows x64

What browsers are you seeing the problem on if you're using web version?

Firefox

Are you self-hosting?

Relevant log output

No response

Anything else?

No response

affine-issue-bot[bot] commented 1 month ago

Issue Status: 🆕 *Untriaged

*🆕 Untriaged**

The team has not yet reviewed the issue. We usually do it within one business day. Docs: https://github.com/toeverything/AFFiNE/blob/canary/docs/issue-triaging.md

This is an automatic reply by the bot.

adam2am commented 1 month ago

Ok, so I found the original storage.db file (600mb) in a C:\Users\user\AppData\Roaming\AFFiNE\workspaces So my notes are not gone 100%, just a scuffed format, thats a good news But it still can't be imporded back in affine, saying its a "wrong file for a database", even when this .db improted from outside of the C:\Users\user\AppData\Roaming folder.

Is the format the issue? Or the size of it? Or smth else

adam2am commented 1 month ago

So I checked the db file and found that the last notes are damaged, but the previous versions of notes inside of the .db are fine. The problem occurred during the process of saving/updating the database file. When Affine tried to save the file, I had 0 MB left on my disk storage, which resulted in a corrupted note and a blank page scuffed format. I hope this information is helpful to you

Do the backups, free up space so you have more than 0mb available, have a nice day :)

kindadeadish commented 1 month ago

Hi, I'm having the same problem. I'm a bit new to Affine and databases and whatnot, so I'm not really sure what to do. I've found the db file, but how did you roll back to a previous version of the notes? I tried checking the properties of the file, but it showed that there were no previous versions available. I've had these notes for a few days now and updated them a few times, so there should be a previous update of them in there, but I don't know how to check or how to go back to it to restore them.

adam2am commented 1 month ago

Hi, I'm having the same problem. I'm a bit new to Affine and databases and whatnot, so I'm not really sure what to do. I've found the db file, but how did you roll back to a previous version of the notes? I tried checking the properties of the file, but it showed that there were no previous versions available. I've had these notes for a few days now and updated them a few times, so there should be a previous update of them in there, but I don't know how to check or how to go back to it to restore them.

Hey, I didnt roll back the database, but instead opened the old scuffed .db file using both VSCode and Notepad++, then used Ctrl+F in both editors in order to search for my notes based on what I had written before.

And to clean up the large chunks of data and extract just the text without the format, I pasted it into Google Gemini 1.5 and asked it to extract the text without the formatting. It works nicely cuz of the large ammount of context. But in the end, had to recreate it all from scratch.

Yeah, it was a harsh lesson. Now, I'm backing it up regularly to restore it just in case. 😌

kindadeadish commented 1 month ago

https://github.com/toeverything/AFFiNE/assets/172167234/d75e41c9-0e6f-44a9-bbf0-671c888d08e5

Guess we've both learned our lessons. 😭 Thank you so much either way, though. At least now I can scrape out some stuff I forgot, even if I can't perfectly restore it. Better than trying to force my poor goldfish brain to remember what the hell I wrote, at least. Hope you have a great day, and may we both remember to back our notes up!