notes-android icon indicating copy to clipboard operation
notes-android copied to clipboard

Sync Error

Open nogolnogol opened this issue 5 months ago • 8 comments

This issue respects the following points:

Describe the bug

1 Open the app 2 Error message appears: "Sync failed" 3 notes which have been edited since this sync problem appeared, are not synched with nextcloud - the blue "snyc arrows" remain on these notes in the notes list.

Expected behavior

App opens and notes sync with Nextcloud

Notes Android version

4.4.2

Notes server version

4.12.3

Nextcloud Android version

3.33.0

Nextcloud version

31.0.8 (NC Hub 10)

Device

Google Pixel 8a

Android Version

16

App Store

  • [x] Google Play Store
  • [ ] F-Droid
  • [ ] Huawei App Gallery

Stacktrace

App Version: 4.4.2
App Version Code: 40040290
App Flavor: play

Files App Version Code: 30330090 (PROD)

---

OS Version: 6.1.148-android14-11-g131cabf4b449(2025090800)
OS API Level: 36
Device: akita
Manufacturer: Google
Model (and Product): Pixel 8a (akita)

---

java.lang.Exception: com.nextcloud.android.sso.exceptions.TokenMismatchException: Der Authentifizierungs-Token stimmt nicht überein oder dem Paketnamen fehlt die Berechtigung für diese Aktion
	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:524)
	at java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1156)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:651)
	at java.lang.Thread.run(Thread.java:1119)


java.lang.Exception: com.nextcloud.android.sso.exceptions.TokenMismatchException: Der Authentifizierungs-Token stimmt nicht überein oder dem Paketnamen fehlt die Berechtigung für diese Aktion
	at it.niedermann.owncloud.notes.persistence.NotesServerSyncTask.pushLocalChanges(NotesServerSyncTask.java:164)
	at it.niedermann.owncloud.notes.persistence.NotesServerSyncTask.run(NotesServerSyncTask.java:100)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:524)
	at java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1156)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:651)
	at java.lang.Thread.run(Thread.java:1119)


java.lang.Exception: com.nextcloud.android.sso.exceptions.TokenMismatchException: Der Authentifizierungs-Token stimmt nicht überein oder dem Paketnamen fehlt die Berechtigung für diese Aktion
	at it.niedermann.owncloud.notes.persistence.NotesServerSyncTask.pushLocalChanges(NotesServerSyncTask.java:164)
	at it.niedermann.owncloud.notes.persistence.NotesServerSyncTask.run(NotesServerSyncTask.java:100)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:524)
	at java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1156)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:651)
	at java.lang.Thread.run(Thread.java:1119)


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:225)
	at it.niedermann.owncloud.notes.persistence.NotesServerSyncTask.run(NotesServerSyncTask.java:102)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:524)
	at java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1156)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:651)
	at java.lang.Thread.run(Thread.java:1119)
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:179)
	at com.nextcloud.android.sso.api.NextcloudAPI.performNetworkRequestV2(NextcloudAPI.java:159)
	at com.nextcloud.android.sso.api.NextcloudAPI.lambda$performRequestObservableV2$0(NextcloudAPI.java:97)
	at com.nextcloud.android.sso.api.NextcloudAPI.$r8$lambda$af7W9mq2B0ZrhVJwZd-ibFp8T3Y(Unknown Source:0)
	at com.nextcloud.android.sso.api.NextcloudAPI$$ExternalSyntheticLambda1.subscribe(D8$$SyntheticClass:0)
	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

nogolnogol avatar Sep 11 '25 08:09 nogolnogol

java.lang.Exception: com.nextcloud.android.sso.exceptions.TokenMismatchException: Der Authentifizierungs-Token stimmt nicht überein oder dem Paketnamen fehlt die Berechtigung für diese Aktion

Have you re-installed Files app inbetween?

tobiasKaminsky avatar Sep 18 '25 07:09 tobiasKaminsky

java.lang.Exception: com.nextcloud.android.sso.exceptions.TokenMismatchException: Der Authentifizierungs-Token stimmt nicht überein oder dem Paketnamen fehlt die Berechtigung für diese Aktion

Have you re-installed Files app inbetween?

Perhaps. Meanwhile while trying different solutions I definitely reinstalled it.

nogolnogol avatar Sep 29 '25 11:09 nogolnogol

Did you see the relevant FAQ entry?

https://github.com/nextcloud/notes-android/blob/main/FAQ.md#tokenmismatchexception

joshtrichards avatar Sep 29 '25 20:09 joshtrichards

Same Issue here. Trying to Sync. "Syncronisation failed" and if I try to click on "more" the app just Crashes. Testet on Motorola Moto G13, Samsung Galaxy A54 5G, Xiaomi Redmi Note 11.

Nextcloud version was 31.0.5 but I upgraded to 32.0.0 in hopes this would fix it.

Edit: Downgrading Notes to 4.4.2 worked.

KnoxKnaks avatar Sep 30 '25 14:09 KnoxKnaks

Did you see the relevant FAQ entry?

https://github.com/nextcloud/notes-android/blob/main/FAQ.md#tokenmismatchexception

Yes, thank you. Deleting cache and app data of the nextcloud notes app solved the problem.

nogolnogol avatar Oct 02 '25 16:10 nogolnogol

Deleting cache and app data does not fix it for me unfortunately. Same behavior after the first edit of a note.

Downgrading to 4.4.2 fixes this issue.

ozzi- avatar Oct 07 '25 05:10 ozzi-

Same for me: I deleted app data and it was able to authenticate, then retrieve all the notes from scratch, but sync still fails. I haven't tried wiping both the Nextcloud files app and the Notes app. I may try downgrading first, or test on another device still on an earlier version.

myuseraccount avatar Oct 27 '25 17:10 myuseraccount

Update: I sideloaded the 4.5.1 release, and it fixed all the problems, including sync of editing existing notes, and creating new ones from the mobile app, as described in the linked issue #2850 .

To clarify, this issue was reported as happening in 4.4.2, but other commenters have stated downgrading to 4.4.2 as a fix. Like them, I had these problems after upgrading from 4.4.2 to 4.5.0, using F-Droid in my case. I had to uninstall 4.5.0 in order to install 4.5.1, but then I simply selected the Nextcloud account to use, acknowledged the prompt to allow use of that account, and all my notes populated. Then I was able to edit and sync notes normally again. I also tested creating a new note, and it worked correctly.

myuseraccount avatar Oct 27 '25 22:10 myuseraccount