notes-android
notes-android copied to clipboard
Synchronization failed
Please use GitHub reactions 👍 to show that you are affected by the same issue. Please don't comment if you have no relevant information to add!
Describe the bug
Synchronization works initially, but then repeatedly fails. Rich text formatting seemed to initiate the issue, but I'm not sure.
My Nextcloud instance is up and running normally. I can access it via Android or a web browser.
To Reproduce Steps to reproduce the behavior:
- Attempt any sync
- Receive 'Synchronization failed' message.
Expected behavior Sync as any other app would.
App Version: 4.1.0
App Version Code: 40010090
App Flavor: play
Files App Version Code: 30260090 (PROD)
---
OS Version: 4.19.269-g7763b0d7bb61(2023100300)
OS API Level: 33
Device: barbet
Manufacturer: Google
Model (and Product): Pixel 5a (barbet)
---
java.lang.IllegalStateException: Duplicate key 590093 (attempted merging values 1 and 2)
at java.util.stream.Collectors.duplicateKeyException(Collectors.java:133)
at java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Collectors.java:180)
at java.util.stream.Collectors$$ExternalSyntheticLambda39.accept(Unknown Source:6)
at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1390)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:475)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:236)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:517)
at it.niedermann.owncloud.notes.persistence.NotesRepository.getIdMap(NotesRepository.java:463)
at it.niedermann.owncloud.notes.persistence.NotesServerSyncTask.pullRemoteChanges(NotesServerSyncTask.java:208)
at it.niedermann.owncloud.notes.persistence.NotesServerSyncTask.run(NotesServerSyncTask.java:96)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:463)
at java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
at java.lang.Thread.run(Thread.java:1012)
Workaround for people who have a hard time finding the FAQ (I'm not trying to be passive aggressive; just trying to be helpful): https://github.com/nextcloud/notes-android/blob/main/FAQ.md#illegalstateexception-duplicate-key
Workaround for people who have a hard time finding the FAQ
However, note that the FAQ is discussing an issue that happened and then read fixed under version 3.x.
Whereas this issue is occurring under 4.1.0.
Not wanting to disparage a helpful reply, but I'm having the same error, also under 4.1.0, so evidently the bug that was fixed in 3.x, as described in the FAQ, has recurred in 4.1.0. Or, perhaps, a new but very similar bug has occurred.
Did anyone know a workaround other than revert to a 3.x version?
@bhugh you are absolutely completely sure that your had the exact very same issue in version 4.x.x? Your error message contains Duplicate key
?
Yes.
On Sun, Jan 14, 2024 at 11:43 AM Niedermann IT-Dienstleistungen < @.***> wrote:
@bhugh https://github.com/bhugh you are absolutely completely sure that your had the exact very same issue in version 4.x.x? Your error message contains Duplicate key?
— Reply to this email directly, view it on GitHub https://github.com/nextcloud/notes-android/issues/1914#issuecomment-1891015652, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARW2BAGZYMCGG2ISWIT6GDYOQKMFAVCNFSM6AAAAAA5YBLGYOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJRGAYTKNRVGI . You are receiving this because you were mentioned.Message ID: @.***>
--
Brent Hugh Executive Director Missouri Bicycle & Pedestrian Federation http://MoBikeFed.org @.*** Fax: 210-579-2265 Phone: 816-695-6736
The workaround worked for me in version 4.1.0. I did not have to revert to a previous version. The error occurred for me about three weeks ago, so I might get the error again. It might as such be prudent to revert to 3.4.11 to check if it has really been fixed there. However, it's unclear to me how to reproduce this issue. Looking at the OP this issue occurs in version 4.1.0. I've just tried playing with the rich text editor and it isn't perfect*, but hasn't caused the corruption error so far. *
- it doesn't immediately sync and I get the diff view when editing a note, going back to the list view, and opening my note again.
- The diff view doesn't display properly on my phone: text is overlapping.
- sometimes it doesn't recognize my keystrokes, I have to hit the same key multiple times for it to register.
- sometimes a cursor shows up elsewhere, as if multiple users are editing the note.
- I seem to have lost some text entered in rich text mode when switching backcase and plain text mode quickly after entering the text. It might be interesting to see what happens when editing multiple notes and swapping between edit modes, and editing with multiple users and platforms. I'm happy with how the app works in plain text mode.
Thanks.
I lost the original error message unfortunately but it's definitely 4.1.0 and had the same error as this one, Duplicate Key
.
Here is the version # etc from the app I have installed:
App Version: 4.1.0 App Version Code: 40010090 App Flavor: play
Files App Version Code: 30270090 (PROD)
OS Version: 4.19.191+(ecd44) OS API Level: 31 Device: milan Manufacturer: motorola Model (and Product): moto g stylus (2022) (milan_g)
@bhugh And did you update from an older Notes Android version or did you clear the storage of the Notes Android app as described in the FAQ (or installed the app for the very first time with 4.x?)