Note body overwritten with the app's own error text when loading content fails
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
Research direction
Start with NotesServerSyncTask.pushLocalChanges around line 150, then follow the sync flow from NotesServerSyncTask.run. Check how failed content loads are represented before local changes are pushed. Done means an error or status message is shown without replacing the note body, and sync can retry later.
Written by the indexing model from the issue text.
Description
Environment
- Nextcloud Notes for Android 35.0.0 (version code 350000090,
play), signed in through the Nextcloud Files app (SSO) - Android 16 / API 37, Pixel 9 Pro (caiman)
- Nextcloud server 34.0.5.1, server app
notes6.1.0
What happened
- A note existed on the server, 7041 bytes, real content.
- For a few seconds the server could not read the file (infrastructure problem on our side,
file_get_contents(): Failed to open stream: Permission denied→OCP\Files\GenericFileException). While that was going on, the note was opened in the app and the editor showedFehler: OCP\Files\GenericFileExceptioninstead of the content. - Afterwards the note on the server was 40 bytes and contained:
Fehler: OCP\\Files\\GenericFileException
A version file created at the same second (…v1793375498) holds the same text with single backslashes, 38 bytes.
Why this looks client-side
The server log has no request and no error at the time of the write, so the write itself succeeded. The error string was uploaded as the note body by the client, and the backslashes were escaped on the second write.
Expected
The app should never write its own error or status text into the note body. Show the error, leave the note untouched, retry the sync later.
Impact
Silent data loss: the original 7041-byte note was replaced by an error message and would have been pushed to the server on the next sync.
Stack trace of the failing sync
java.lang.Exception: {"errorType":"Exception"}
[com.nextcloud.android.sso.InputStreamBinder.processRequestV2(InputStreamBinder.java:440), ...]
at it.niedermann.owncloud.notes.persistence.NotesServerSyncTask.pushLocalChanges(NotesServerSyncTask.java:150)
at it.niedermann.owncloud.notes.persistence.NotesServerSyncTask.run(NotesServerSyncTask.java:99)
Happy to provide server logs or a recording if that helps.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 178
- Avg merge
- 10h 48m
- Merged PRs (30d)
- 41
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the 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 nextcloud/notes-android
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
nextcloud/notes-android#3469 ·
Maintainers usually reply within 1 day
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
nextcloud/notes-android#3439 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
nextcloud/notes-android#3367 ·
Maintainers usually reply within 1 day
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
nextcloud/notes-android#3353 · 2 comments · 2 reactions ·
Maintainers usually reply within 1 day
-
Android: Note stuck in synchronization loop after editing until note is deleted from serverPossibly taken @alperozturk96 claimed this 6 days ago. Open0. Needs triage bug
Difficulty 4/5 3-5 days Newbie friendliness 22/100
nextcloud/notes-android#3442 · 5 comments · 2 reactions · 1 assignee ·
Maintainers usually reply within 1 day
All issues in nextcloud/notes-android
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
installation sdk usability
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
beehive-lab/TornadoVM#1356 ·
Maintainers usually reply within 1 day
-
0. Needs triage enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
davidfercas/opendcanard#34 ·
-
good first issue help wanted
Difficulty 1/5 Under an hour Newbie friendliness 90/100
erkamyaman/rust-anything#702 ·
Maintainers usually reply within 1 day