[GH-ISSUE #7947] [Bug] Some documents are missing #3473

Open
opened 2026-03-23 21:30:33 +00:00 by mirror · 3 comments
Owner

Originally created by @cubecup on GitHub (May 18, 2025).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/7947

Originally assigned to: @khorshuheng on GitHub.

Bug Description

I recently upgraded from v0.8.x to v0.9.1 on my Windows 11 machine.
I managed to fix the issue that my original local folder wouldn't show and AppFlowy would keep creating new user folders and open those. (https://github.com/AppFlowy-IO/AppFlowy/issues/7872)

So I now generally see the data I used to see before the upgrade when I open AppFlowy.

Problem is that some documents are now missing. Restarting AppFlowy doesn't help. When I search for the pages I'm missing, I can see that the search function does indeed find them but when I click the corresponding search result, the document doesn't open up. For the documents that are indeed visible to me, if I search for those and click the result, the page does actually open up.
It seems some documents are hidden for some reason.

Update: updated from 0.9.1 to 0.9.2. When I search for the documents that I'm missing (with the neat new search function), I see they're still there along with their content. Some documents were nested under others, these "in-between" documents cannot be found anymore, e.g. in the screenshot below, I search for "ultimate" and the document "Home / Hobbies / Ultimate Frisbee" still exists and I can click it but the document "Setting up a NAS + VM / Power consumption" doesn't open up when I click it. I also remember "Setting up a NAS + VM" used to be nested under "Computer Architecture" but that document I cannot even find via the search function anymore.

I checked log files:
Within my C:\Users<user>\AppData\Roaming\io.appflowy\AppFlowy\data folder there's a file called log.2025-05-11. The most recent error message I'm pasting below.


{"msg":"[REFRESH_USER_PROFILE - END]","time":"05-11 08:04:20","target":"flowy_user::user_manager::manager","elapsed_milliseconds":0}
{"msg":"[Search] perform search: archi","time":"05-11 08:04:40","target":"flowy_search::services::manager"}
{"msg":"Can't find the view with id: b83ea629-969a-4976-b7af-ea7e3bc5a1fd","time":"05-11 08:04:41","target":"flowy_folder::manager"}
{"msg":"flowy_folder::event_handler","time":"05-11 08:04:41","target":"flowy_folder::event_handler","error":"code:Record not found, message:Record not found"}

A few lines above that it says

{"msg":"[BACKUP_COLLAB_DB - EVENT] flowy_user::services::db","time":"05-11 07:23:39","target":"flowy_user::services::db","error":"The process cannot access the file because it is being used by another process. (os error 32)"}

How to Reproduce

Not sure...

Expected Behavior

I want to see all my documents in their original structure with all their content.

Operating System

Window 11

AppFlowy Version(s)

0.9.2 (happens regardless of which version I use, even when I revert back to 0.8.x, where I didn't encounter this problem yet)

Screenshots

Image

Additional Context

When I tried fixing the user session problem, I went back and forth between appflowy versions in hope of fixing the problem. I hope that didn't corrupt my data.

Originally created by @cubecup on GitHub (May 18, 2025). Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/7947 Originally assigned to: @khorshuheng on GitHub. ### Bug Description I recently upgraded from v0.8.x to v0.9.1 on my Windows 11 machine. I managed to fix the issue that my original local folder wouldn't show and AppFlowy would keep creating new user folders and open those. (https://github.com/AppFlowy-IO/AppFlowy/issues/7872) So I now generally see the data I used to see before the upgrade when I open AppFlowy. Problem is that some documents are now missing. Restarting AppFlowy doesn't help. When I search for the pages I'm missing, I can see that the search function does indeed find them but when I click the corresponding search result, the document doesn't open up. For the documents that are indeed visible to me, if I search for those and click the result, the page does actually open up. It seems some documents are hidden for some reason. Update: updated from 0.9.1 to 0.9.2. When I search for the documents that I'm missing (with the neat new search function), I see they're still there along with their content. Some documents were nested under others, these "in-between" documents cannot be found anymore, e.g. in the screenshot below, I search for "ultimate" and the document "Home / Hobbies / Ultimate Frisbee" still exists and I can click it but the document "Setting up a NAS + VM / Power consumption" doesn't open up when I click it. I also remember "Setting up a NAS + VM" used to be nested under "Computer Architecture" but that document I cannot even find via the search function anymore. I checked log files: Within my C:\Users\<user>\AppData\Roaming\io.appflowy\AppFlowy\data folder there's a file called log.2025-05-11. The most recent error message I'm pasting below. ``` {"msg":"[REFRESH_USER_PROFILE - END]","time":"05-11 08:04:20","target":"flowy_user::user_manager::manager","elapsed_milliseconds":0} {"msg":"[Search] perform search: archi","time":"05-11 08:04:40","target":"flowy_search::services::manager"} {"msg":"Can't find the view with id: b83ea629-969a-4976-b7af-ea7e3bc5a1fd","time":"05-11 08:04:41","target":"flowy_folder::manager"} {"msg":"flowy_folder::event_handler","time":"05-11 08:04:41","target":"flowy_folder::event_handler","error":"code:Record not found, message:Record not found"} ``` A few lines above that it says ``` {"msg":"[BACKUP_COLLAB_DB - EVENT] flowy_user::services::db","time":"05-11 07:23:39","target":"flowy_user::services::db","error":"The process cannot access the file because it is being used by another process. (os error 32)"} ``` ### How to Reproduce Not sure... ### Expected Behavior I want to see all my documents in their original structure with all their content. ### Operating System Window 11 ### AppFlowy Version(s) 0.9.2 (happens regardless of which version I use, even when I revert back to 0.8.x, where I didn't encounter this problem yet) ### Screenshots ![Image](https://github.com/user-attachments/assets/6d26722c-4f9c-439a-aee1-65664bc241ff) ### Additional Context When I tried fixing the user session problem, I went back and forth between appflowy versions in hope of fixing the problem. I hope that didn't corrupt my data.
Author
Owner

@khorshuheng commented on GitHub (May 19, 2025):

AppFlowy store the document data locally in RocksDB database, which is folder directory named collab_db . The folder directory structure and the actual content itself are stored under different keys. If a document is found in the directory structure but not the actual document, then you will get the record not found issue.

Without having the full access to the data, it is hard to tell whether the missing documents are indeed missing forever, or is present somewhere in the data directory, just that the application is not looking at the right path.

However, there might still be some other things that we can try. How does your file storage path looks like at the moment? Were you using a custom path in the past, or have you been using the default path all the while?

<!-- gh-comment-id:2889456130 --> @khorshuheng commented on GitHub (May 19, 2025): AppFlowy store the document data locally in RocksDB database, which is folder directory named `collab_db` . The folder directory structure and the actual content itself are stored under different keys. If a document is found in the directory structure but not the actual document, then you will get the record not found issue. Without having the full access to the data, it is hard to tell whether the missing documents are indeed missing forever, or is present somewhere in the data directory, just that the application is not looking at the right path. However, there might still be some other things that we can try. How does your file storage path looks like at the moment? Were you using a custom path in the past, or have you been using the default path all the while?
Author
Owner

@cubecup commented on GitHub (May 24, 2025):

Thanks a lot for picking this up so quickly, it's very much appreciated!
I hope I understood you correctly.
I'll split my answer into two parts.

1. What the currently defined path is and what the content looks like

The File storage location is currently set to a path that was automatically created by appflowy when I installed for the first time. I guess it must be the default path then.

Image

That path looks like this:

Image

Image

The collab_db folder has a bunch of log files (text documents and "File" filetypes).
The collab_db_history folder has a bunch of zipped collab_db files. This gives me hope because it looks like snapshots so if my data was indeed lost, I could maybe restore some of it?

2. Regarding whether I've been using the default path all the while

I had the same problem that was reported here https://github.com/AppFlowy-IO/AppFlowy/issues/7872. I applied your fix (thanks a lot for that!) https://github.com/AppFlowy-IO/AppFlowy/issues/7872#issuecomment-2847238877.

But before that, I

  1. upgraded from v0.8.x to v0.9.1,
  2. kept opening and reopening appflowy,
  3. constantly tried to point the "File storage location" setting in appflowy to the correct user folder (didn't work, it would just create new folders within the path I set, which is above path, which I assume is the default one).
  4. Wildly switched between different v0.8.x versions to try to get back to the state I was in before the upgrade.

So I've definitely changed the "File storage location" setting quite a few times along the way. It should be back to the default setting now though. At least when I start appflowy and switch to local, it immediately opens the data in the correct path.

<!-- gh-comment-id:2906981524 --> @cubecup commented on GitHub (May 24, 2025): Thanks a lot for picking this up so quickly, it's very much appreciated! I hope I understood you correctly. I'll split my answer into two parts. ### 1. What the currently defined path is and what the content looks like The File storage location is currently set to a path that was automatically created by appflowy when I installed for the first time. I guess it must be the default path then. ![Image](https://github.com/user-attachments/assets/8ab29738-8eac-4ac2-857b-6518d6a27a59) That path looks like this: ![Image](https://github.com/user-attachments/assets/676edc2e-c685-4f8d-9247-a075abb43394) ![Image](https://github.com/user-attachments/assets/71d67179-c9b8-47b7-a171-84c944fa1ec6) The collab_db folder has a bunch of log files (text documents and "File" filetypes). The collab_db_history folder has a bunch of zipped collab_db files. This gives me hope because it looks like snapshots so if my data was indeed lost, I could maybe restore some of it? ### 2. Regarding whether I've been using the default path all the while I had the same problem that was reported here https://github.com/AppFlowy-IO/AppFlowy/issues/7872. I applied your fix (thanks a lot for that!) https://github.com/AppFlowy-IO/AppFlowy/issues/7872#issuecomment-2847238877. But before that, I 1. upgraded from v0.8.x to v0.9.1, 2. kept opening and reopening appflowy, 3. constantly tried to point the "File storage location" setting in appflowy to the correct user folder (didn't work, it would just create new folders within the path I set, which is above path, which I assume is the default one). 4. Wildly switched between different v0.8.x versions to try to get back to the state I was in before the upgrade. So I've definitely changed the "File storage location" setting quite a few times along the way. It should be back to the default setting now though. At least when I start appflowy and switch to local, it immediately opens the data in the correct path.
Author
Owner

@cubecup commented on GitHub (Aug 31, 2025):

Hi! @khorshuheng Would you still be available to help? :) If the info I provided wasn't helpful, I'm willing to share my data at this point. I'd be very thankful to hear from you again!

<!-- gh-comment-id:3240206763 --> @cubecup commented on GitHub (Aug 31, 2025): Hi! @khorshuheng Would you still be available to help? :) If the info I provided wasn't helpful, I'm willing to share my data at this point. I'd be very thankful to hear from you again!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#3473
No description provided.