[Bug] Duplicating a row with a relation field only writes the relation one way, and the client keeps retrying deleted databases forever
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 12/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Domain
- databases, distributed-systems
Research direction
The payload names no source files, only log messages to search for: "[RowOrder]: detached row detail batch incomplete", "local cache missing 1 rows", and "failed to remove relation references". Reproducing needs a self-hosted AppFlowy Cloud, so start by confirming the bug locally. Done would mean a duplicated row appears in the reverse relation, and deleted databases stop being retried. Expect this to need a maintainer's direction first.
Written by the indexing model from the issue text.
Description
Bug Description
I use AppFlowy desktop 0.15.0 on Arch Linux with my own self-hosted AppFlowy Cloud 0.20.6 (podman compose, http://localhost).
I have two databases, Tasks and Goals, with a relation field between them (Tasks -> Goals, plus the reverse relation shown inside Goals).
When I duplicate a row in Tasks that has a relation to a Goal, the new row appears in Tasks, but inside Goals the back-relation to the new row never appears. I have to open Goals and add it by hand every time.
I watched the client log while doing it. The log shows the new row order arriving (inserted:1) but the row details never resolve:
- "[Database]: local cache missing 1 rows; skipping fallback (auto_fetch=false)"
- "[RowOrder]: detached row detail batch incomplete while rehydrating view 087df55c...: missing=1"
- "published 23 provisional rows for view 087df55c...; 1 rows remain unresolved"
And I never see any write/update sent for the Goals database for the new row. When rows get deleted I also see: - "[RowOrder]: failed to remove relation references for terminal row deletions: The database for view id: 54bc3768... not found"
On top of that my client is now stuck in a permanent bad state. Every launch, the sync log repeats this every 5 seconds forever for 9 database IDs (including 82758330-3200-4aa2-afc8-f77e1d455aab):
- "Database restore verification failed for : code:NotEnoughPermissions msg: Database restore verification requires renewed access" (the first time it says "permission target belongs to a deleted database")
- "[Database] Initial upload for database 82758330... failed 512 time(s): Failed to recover the legacy Folder duplicate-upload claim"
- the outline outbox keeps retrying update_page for two views that don't exist on the server until the retry limit (outbox_id 94 and 274)
Restarting the app does not fix it. Deleting the log files does not fix it. The server log shows no errors for the same actions.
How to Reproduce
- Run self-hosted AppFlowy Cloud 0.20.6 and connect AppFlowy desktop 0.15.0 (Linux).
- Create two databases, Tasks and Goals.
- In Tasks add a relation field pointing to Goals, and keep the reverse relation field in Goals.
- Create a row in Tasks and set its relation to some Goal.
- Right click the row -> Duplicate.
- Open Goals and look at the back-relation column of that Goal.
What happens: the duplicated row exists in Tasks, but Goals never shows it. In the client log the row order insert arrives but the row stays "provisional / unresolved" and no update is ever sent for the Goals database.
In my workspace the bad state is now permanent: every launch the sync log loops "Database restore verification failed ... requires renewed access" for 9 deleted database IDs every 5 seconds, and the duplicate-upload claim for database 82758330-3200-4aa2-afc8-f77e1d455aab retries forever.
Expected Behavior
Duplicating a row should copy the relation in both directions: the new row should appear automatically in the back-relation of the referenced Goal, the same as when I set the relation by hand.
Also, if a database was deleted on the server, the client should stop retrying it at some point and clean its local state, instead of looping every 5 seconds forever and keeping a "duplicate-upload claim" that can never succeed.
Operating System
Linux (Arch Linux Kernel CachyOS) desktop app. Server side: self-hosted AppFlowy Cloud 0.19.10 in podman compose on the same machine (http://localhost).
AppFlowy Version(s)
Desktop 0.15.0, self-hosted AppFlowy Cloud server 0.19.10.
Screenshots
I don't have a UI screenshot that shows more than the missing back-relation, but I can add one if needed. My strongest evidence is the logs (see Additional Context).
Additional Context
IDs from my workspace, in case it helps:
- Workspace: ad28d34c-478c-4ab8-9570-39dd77ab021b
- Tasks database: 49b23775-ae0e-424c-8f1f-08d06a29325d (view 087df55c-8f69-552f-96c0-c10886640a08)
- Goals database: 149d139e-fc10-41d3-95c1-7c189c44085f (view 41e8fa24-edc8-58bb-9b76-1f69edfd7885)
- Relation fields: VCGB-f (Tasks side), UFWCZG (Goals side)
- Database stuck in duplicate-upload: 82758330-3200-4aa2-afc8-f77e1d455aab
- Views stuck in outline outbox: 1fdf0aaa-5e80-4103-ad59-bc7faa30baab, 7c2f4916-f362-5462-a64a-785e09183ff3
Full client log (flowy_core) and sync log around the duplication time are saved on my machine. I can upload them or paste more excerpts if you tell me which part you need. I did not clear my local cache folder yet, so I can also test with a fresh profile if you want.
log.sync.2026-11-13-01.md
log.sync.2026-11-12-23.md
log.sync.2026-11-12-22.md
log.2026-11-13.md
log.2026-11-12.md
- Dominant language
- Dart
- Stars
- 79.1k
- Forks
- 6.3k
- Avg merge
- 17h 29m
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AppFlowy-IO/AppFlowy
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
AppFlowy-IO/AppFlowy#9147 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
AppFlowy-IO/AppFlowy#9118 · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
AppFlowy-IO/AppFlowy#9094 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
AppFlowy-IO/AppFlowy#9075 · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
AppFlowy-IO/AppFlowy#9074 ·
Maintainers usually reply within 1 day
All issues in AppFlowy-IO/AppFlowy
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
ccch1mneyyy/dsh-Go#1682 ·
Maintainers usually reply within 1 day
-
help wanted
Difficulty 1/5 Under an hour Newbie friendliness 76/100
pesaclarity/ujumbe-parsers#64 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
patarapolw/lingua_srs#278 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
dreautall/waterfly-iii#890 · 1 comment ·
Maintainers usually reply within 1 day