AppFlowy icon indicating copy to clipboard operation
AppFlowy copied to clipboard

[Bug] [AppFlowy-Web] Record Not Found

Open smartyhero opened this issue 11 months ago • 8 comments

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

smartyhero avatar Jan 15 '25 13:01 smartyhero

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.

khorshuheng avatar Jan 15 '25 14:01 khorshuheng

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

smartyhero avatar Jan 15 '25 15:01 smartyhero

image This is the log of appflowy-cloud I found

smartyhero avatar Jan 15 '25 15:01 smartyhero

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

khorshuheng avatar Jan 15 '25 15:01 khorshuheng

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

smartyhero avatar Jan 15 '25 15:01 smartyhero

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?

khorshuheng avatar Jan 15 '25 15:01 khorshuheng

It is a document

smartyhero avatar Jan 15 '25 15:01 smartyhero

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.

khorshuheng avatar Jan 15 '25 16:01 khorshuheng

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

smartyhero avatar Jan 16 '25 02:01 smartyhero

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

khorshuheng avatar Jan 16 '25 05:01 khorshuheng

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

smartyhero avatar Jan 16 '25 05:01 smartyhero

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.

khorshuheng avatar Jan 16 '25 06:01 khorshuheng

Thank you for your contribution

smartyhero avatar Jan 16 '25 06:01 smartyhero

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

khorshuheng avatar Jan 18 '25 05:01 khorshuheng

Fixed in 0.9.13.

khorshuheng avatar Jan 20 '25 11:01 khorshuheng