[GH-ISSUE #7221] [Bug] [AppFlowy-Web] Record Not Found #3195

Closed
opened 2026-03-23 21:28:16 +00:00 by mirror · 15 comments
Owner

Originally created by @smartyhero on GitHub (Jan 15, 2025).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/7221

Bug Description

My self-hosted appflowy has many documents on the web page that say Record Not Found
image
image

How to Reproduce

I don't know how to reproduce

Expected Behavior

The page can be displayed normally

Operating System

mac,win

AppFlowy Version(s)

0.8.1, 0.1.2

Screenshots

No response

Additional Context

No response

Originally created by @smartyhero on GitHub (Jan 15, 2025). Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/7221 ### Bug Description My self-hosted appflowy has many documents on the web page that say Record Not Found ![image](https://github.com/user-attachments/assets/bc88fc8f-1025-44e5-9949-fa15556e1dbf) ![image](https://github.com/user-attachments/assets/0b9157bd-835a-4709-910e-951f0962da93) ### How to Reproduce I don't know how to reproduce ### Expected Behavior The page can be displayed normally ### Operating System mac,win ### AppFlowy Version(s) 0.8.1, 0.1.2 ### Screenshots _No response_ ### Additional Context _No response_
Author
Owner

@khorshuheng commented on GitHub (Jan 15, 2025):

Can you check if the collab id (last part of the URL) exists in the af_collab table? The id column is "oid".

EDIT: Just noticed that the AppFlowy Cloud version is 0.8.1 . The current version of AppFlowy Web (0.1.2) requires minimum AppFlowy Cloud version 0.9.9. I have not verified if it will work with AppFlowy Cloud version 0.8.1, but even if it does, some functionality will not work properly.

<!-- gh-comment-id:2593001300 --> @khorshuheng commented on GitHub (Jan 15, 2025): Can you check if the collab id (last part of the URL) exists in the af_collab table? The id column is "oid". EDIT: Just noticed that the AppFlowy Cloud version is 0.8.1 . The current version of AppFlowy Web (0.1.2) requires minimum AppFlowy Cloud version 0.9.9. I have not verified if it will work with AppFlowy Cloud version 0.8.1, but even if it does, some functionality will not work properly.
Author
Owner

@smartyhero commented on GitHub (Jan 15, 2025):

The data exists
image
The version of appflowy-cloud is the latest, version 0.9.11

<!-- gh-comment-id:2593097726 --> @smartyhero commented on GitHub (Jan 15, 2025): The data exists ![image](https://github.com/user-attachments/assets/c43229a7-4544-400c-a742-c928ebf4bc66) The version of appflowy-cloud is the latest, version 0.9.11
Author
Owner

@smartyhero commented on GitHub (Jan 15, 2025):

image
This is the log of appflowy-cloud I found

<!-- gh-comment-id:2593123420 --> @smartyhero commented on GitHub (Jan 15, 2025): ![image](https://github.com/user-attachments/assets/e8792a07-8693-4bb6-892c-f651ee1eafa3) This is the log of appflowy-cloud I found
Author
Owner

@khorshuheng commented on GitHub (Jan 15, 2025):

On the developer console - the API request that returns the error about RecordNotFound, is it the get page view API?

<!-- gh-comment-id:2593141054 --> @khorshuheng commented on GitHub (Jan 15, 2025): On the developer console - the API request that returns the error about RecordNotFound, is it the get page view API?
Author
Owner

@smartyhero commented on GitHub (Jan 15, 2025):

image
/api/workspace/4aea66a2-406a-4ebb-bb83-26646234398e/page-view/44c0521d-a514-48e1-92e1-ba489e9f5fe2

<!-- gh-comment-id:2593152805 --> @smartyhero commented on GitHub (Jan 15, 2025): ![image](https://github.com/user-attachments/assets/2fdf84e2-2a40-4d52-9fe1-df8ec9a38f2b) /api/workspace/4aea66a2-406a-4ebb-bb83-26646234398e/page-view/44c0521d-a514-48e1-92e1-ba489e9f5fe2
Author
Owner

@khorshuheng commented on GitHub (Jan 15, 2025):

Noted. I think i might need to add more descriptive error message on AppFlowy Cloud in order to find out the root cause. Do you remember if this page is a database, or a document?

<!-- gh-comment-id:2593164901 --> @khorshuheng commented on GitHub (Jan 15, 2025): Noted. I think i might need to add more descriptive error message on AppFlowy Cloud in order to find out the root cause. Do you remember if this page is a database, or a document?
Author
Owner

@smartyhero commented on GitHub (Jan 15, 2025):

It is a document

<!-- gh-comment-id:2593174647 --> @smartyhero commented on GitHub (Jan 15, 2025): It is a document
Author
Owner

@khorshuheng commented on GitHub (Jan 15, 2025):

Could you use this appflowy cloud image: appflowyinc/appflowy_cloud:4831ce7e65babaf4c36db0c80d03d18c29d62c0a ? This is built from https://github.com/AppFlowy-IO/AppFlowy-Cloud/pull/1166 , which hasn't been merged yet. This does not fix the issue, but it may show error messages which are more useful to troubleshoot the issue.

<!-- gh-comment-id:2593384530 --> @khorshuheng commented on GitHub (Jan 15, 2025): Could you use this appflowy cloud image: `appflowyinc/appflowy_cloud:4831ce7e65babaf4c36db0c80d03d18c29d62c0a` ? This is built from https://github.com/AppFlowy-IO/AppFlowy-Cloud/pull/1166 , which hasn't been merged yet. This does not fix the issue, but it may show error messages which are more useful to troubleshoot the issue.
Author
Owner

@smartyhero commented on GitHub (Jan 16, 2025):

This is the error returned by the api now

{
    "code": 1017,
    "message": "Unable to get user detail for 1: no rows returned by a query that expected to return at least one row"
}

image
Below is the log of appflowy-cloud
image

<!-- gh-comment-id:2594365283 --> @smartyhero commented on GitHub (Jan 16, 2025): This is the error returned by the api now ```json { "code": 1017, "message": "Unable to get user detail for 1: no rows returned by a query that expected to return at least one row" } ``` ![image](https://github.com/user-attachments/assets/c22e7b9b-2e24-4fd1-8d3d-3a7b46b23de4) Below is the log of appflowy-cloud <img width="1468" alt="image" src="https://github.com/user-attachments/assets/b553eeee-aeda-47e3-ac7b-0e9eef01afb4" />
Author
Owner

@khorshuheng commented on GitHub (Jan 16, 2025):

Have you ever deleted/removed some users, who may have edited the document in the past?

Nevertheless, I think we can handle such case, such that it doesn't result in a complete failure of page rendering

<!-- gh-comment-id:2594545931 --> @khorshuheng commented on GitHub (Jan 16, 2025): Have you ever deleted/removed some users, who may have edited the document in the past? Nevertheless, I think we can handle such case, such that it doesn't result in a complete failure of page rendering
Author
Owner

@smartyhero commented on GitHub (Jan 16, 2025):

I may have deleted a user, but I don't remember clearly

I checked my database, and there is no user with uid 1

It seems that 1 is a special uid, and the uids of my existing users are all very long strings of numbers

<!-- gh-comment-id:2594562264 --> @smartyhero commented on GitHub (Jan 16, 2025): I may have deleted a user, but I don't remember clearly I checked my database, and there is no user with uid 1 It seems that 1 is a special uid, and the uids of my existing users are all very long strings of numbers
Author
Owner

@khorshuheng commented on GitHub (Jan 16, 2025):

Yes, you are correct. We only use uid = 1 for integration test, so it's strange that it appears here. But in any case, this scenario (last editor/owner not found) is something that we should have handled on the backend. We will fix this.

<!-- gh-comment-id:2594614518 --> @khorshuheng commented on GitHub (Jan 16, 2025): Yes, you are correct. We only use uid = 1 for integration test, so it's strange that it appears here. But in any case, this scenario (last editor/owner not found) is something that we should have handled on the backend. We will fix this.
Author
Owner

@smartyhero commented on GitHub (Jan 16, 2025):

Thank you for your contribution

<!-- gh-comment-id:2594618004 --> @smartyhero commented on GitHub (Jan 16, 2025): Thank you for your contribution
Author
Owner

@khorshuheng commented on GitHub (Jan 18, 2025):

Will be fixed by https://github.com/AppFlowy-IO/AppFlowy-Cloud/pull/1171 .

<!-- gh-comment-id:2599536425 --> @khorshuheng commented on GitHub (Jan 18, 2025): Will be fixed by https://github.com/AppFlowy-IO/AppFlowy-Cloud/pull/1171 .
Author
Owner

@khorshuheng commented on GitHub (Jan 20, 2025):

Fixed in 0.9.13.

<!-- gh-comment-id:2602191539 --> @khorshuheng commented on GitHub (Jan 20, 2025): Fixed in 0.9.13.
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#3195
No description provided.