nextcloud / notes-android

✎ Android client for Nextcloud Notes app.
https://play.google.com/store/apps/details?id=it.niedermann.owncloud.notes
GNU General Public License v3.0
932 stars 135 forks source link

Synchronization error #2086

Closed DStRMe closed 1 month ago

DStRMe commented 6 months ago

while using the Notes-App on my Fairphone4 a synchronization error was raised with following log:

App Version: 4.1.0
App Version Code: 40010090
App Flavor: fdroid

Files App Version Code: 30280090 (PROD)

---

OS Version: 4.19.157-perf-g81c35c565a1b(eng.root.20231207.194549)
OS API Level: 32
Device: FP4
Manufacturer: Fairphone
Model (and Product): FP4 (FP4eea)

---

java.lang.IllegalStateException: Duplicate key 90
    at java.util.stream.Collectors.lambda$throwingMerger$0(Collectors.java:133)
    at java.util.stream.Collectors$$ExternalSyntheticLambda45.apply(Unknown Source:0)
    at java.util.HashMap.merge(HashMap.java:1256)
    at java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1320)
    at java.util.stream.Collectors$$ExternalSyntheticLambda4.accept(Unknown Source:8)
    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:462)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at java.lang.Thread.run(Thread.java:920)
Phaet commented 5 months ago

Same here on Samsung Galaxy S24/S24+

App Version: 4.2.0
App Version Code: 40020090
App Flavor: play

Files App Version Code: 30280290 (PROD)

---

OS Version: 6.1.43-android14-11-abS921BXXU1AXCA(S921BXXU1AXCA)
OS API Level: 34
Device: e1s
Manufacturer: samsung
Model (and Product): SM-S921B (e1sxeea)

---

java.lang.RuntimeException: com.nextcloud.android.sso.exceptions.TokenMismatchException: Der Authentifizierungs-Token stimmt nicht überein oder dem Paketnamen fehlt die Berechtigung für diese Aktion
    at io.reactivex.internal.util.ExceptionHelper.wrapOrThrow(ExceptionHelper.java:46)
    at io.reactivex.internal.observers.BlockingMultiObserver.blockingGet(BlockingMultiObserver.java:93)
    at io.reactivex.Maybe.blockingGet(Maybe.java:2321)
    at io.reactivex.Observable.blockingSingle(Observable.java:5381)
    at it.niedermann.owncloud.notes.persistence.NotesServerSyncTask.pullRemoteChanges(NotesServerSyncTask.java:219)
    at it.niedermann.owncloud.notes.persistence.NotesServerSyncTask.run(NotesServerSyncTask.java:96)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:487)
    at java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
    at java.lang.Thread.run(Thread.java:1012)
Caused by: com.nextcloud.android.sso.exceptions.TokenMismatchException: Der Authentifizierungs-Token stimmt nicht überein oder dem Paketnamen fehlt die Berechtigung für diese Aktion
    at com.nextcloud.android.sso.api.AidlNetworkRequest.performNetworkRequestV2(AidlNetworkRequest.java:189)
    at com.nextcloud.android.sso.api.NextcloudAPI.performNetworkRequestV2(NextcloudAPI.java:165)
    at com.nextcloud.android.sso.api.NextcloudAPI.lambda$performRequestObservableV2$0(NextcloudAPI.java:105)
    at com.nextcloud.android.sso.api.NextcloudAPI.$r8$lambda$2CK7Y9lXWWrtN8jgT_iNTMeTrHU(Unknown Source:0)
    at com.nextcloud.android.sso.api.NextcloudAPI$$ExternalSyntheticLambda0.subscribe(Unknown Source:6)
    at io.reactivex.internal.operators.observable.ObservableFromPublisher.subscribeActual(ObservableFromPublisher.java:31)
    at io.reactivex.Observable.subscribe(Observable.java:12284)
    at io.reactivex.internal.operators.observable.ObservableSingleMaybe.subscribeActual(ObservableSingleMaybe.java:31)
    at io.reactivex.Maybe.subscribe(Maybe.java:4290)
    at io.reactivex.Maybe.blockingGet(Maybe.java:2320)
    ... 8 more
ChibiYuzu commented 4 months ago

Maybe similar problem for me? But I'm not sure if the content below points to the same issue. I have no idea what is happening, but it's been happening for a while now.

App Version: 4.2.1
App Version Code: 40020190
App Flavor: fdroid

Files App Version Code: 30290090 (PROD)

---

OS Version: 5.4.242-27760517-abG991BXXSAFXCL(G991BXXSAFXCL)
OS API Level: 34
Device: o1s
Manufacturer: samsung
Model (and Product): SM-G991B (o1sxxx)

---

java.lang.Exception: android.os.DeadObjectException
    at it.niedermann.owncloud.notes.persistence.NotesServerSyncTask.pushLocalChanges(NotesServerSyncTask.java:174)
    at it.niedermann.owncloud.notes.persistence.NotesServerSyncTask.run(NotesServerSyncTask.java:94)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:487)
    at java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
    at java.lang.Thread.run(Thread.java:1012)
Zepfanman commented 2 months ago

Anyone have any solution? I upgraded from 29.0.2 to 29.0.4 a couple days ago and now I'm getting this error on the Android Notes app:

`App Version: 4.3.1 App Version Code: 40030192 App Flavor: play

Files App Version Code: 30290190 (PROD)


OS Version: 4.14.190-25741239-abG970U1UEU9IXE1(G970U1UEU9IXE1) OS API Level: 31 Device: beyond0q Manufacturer: samsung Model (and Product): SM-G970U1 (beyond0qlteue)


java.lang.Exception: {"errorType":"RuntimeException"}

at it.niedermann.owncloud.notes.persistence.NotesServerSyncTask.pushLocalChanges(NotesServerSyncTask.java:151)
at it.niedermann.owncloud.notes.persistence.NotesServerSyncTask.run(NotesServerSyncTask.java:100)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:920)

java.lang.Exception: {"errorType":"RuntimeException"}

at it.niedermann.owncloud.notes.persistence.NotesServerSyncTask.pushLocalChanges(NotesServerSyncTask.java:151)
at it.niedermann.owncloud.notes.persistence.NotesServerSyncTask.run(NotesServerSyncTask.java:100)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:920)`
joshtrichards commented 1 month ago

@DStRMe https://github.com/nextcloud/notes-android/blob/main/FAQ.md#illegalstateexception-duplicate-key

@Phaet https://github.com/nextcloud/notes-android/blob/main/FAQ.md#tokenmismatchexception (and your report has nothing to do with the original reporter's)

@ChibiYuzu Yours looks like #2308

@Zepfanman Yours also looks like #2308