notes-android
notes-android copied to clipboard
android notes app can't sync `NextcloudApiNotRespondingException`
Environment:
- Ubuntu 22 LTS upgraded to the latest possible version
- apache2
- php 8.1
- mariadb
- Nextcloud Hub 5 (27.0.2)
- Notes app: v4.8.1
- Android 12
- notes app for android: latest version just installed from google play (v4.0.0 March 21st, 2023)
- battery optimization is off
App Version: 4.0.0
App Version Code: 40000090
App Flavor: play
Files App Version Code: 30250090
---
OS Version: 4.14.186(1685598849)
OS API Level: 31
Device: Power_Armor14_Pro
Manufacturer: Ulefone
Model (and Product): Power Armor14 Pro (Power_Armor14_Pro)
---
java.lang.RuntimeException: com.nextcloud.android.sso.exceptions.NextcloudApiNotRespondingException: Nextcloud Files app API is not responding. This is most likely due to battery optimizations on your phone. Try to disable the battery optimization for both apps (Nextcloud Android and this app). In all other cases please try to clear the storage of both apps.
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: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)
Caused by: com.nextcloud.android.sso.exceptions.NextcloudApiNotRespondingException: Nextcloud Files app API is not responding. This is most likely due to battery optimizations on your phone. Try to disable the battery optimization for both apps (Nextcloud Android and this app). In all other cases please try to clear the storage of both apps.
at com.nextcloud.android.sso.api.AidlNetworkRequest.waitForApi(AidlNetworkRequest.java:162)
at com.nextcloud.android.sso.api.AidlNetworkRequest.performAidlNetworkRequestV2(AidlNetworkRequest.java:298)
at com.nextcloud.android.sso.api.AidlNetworkRequest.performNetworkRequestV2(AidlNetworkRequest.java:180)
at com.nextcloud.android.sso.api.NextcloudAPI.performNetworkRequestV2(NextcloudAPI.java:199)
at com.nextcloud.android.sso.api.NextcloudAPI.lambda$performRequestObservableV2$1$com-nextcloud-android-sso-api-NextcloudAPI(NextcloudAPI.java:129)
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
Did you already perform the steps mentioned in the FAQ?
I have to force stop the Notes app, delete all the data and the cahce. Then it will be sync from the server, but only once.
Interestingly the sync works from iphone so it can't be a server/user issue.
battery optimization is off
@MacsKavana: It's off for the Nextcloud Android Client app as well (i.e. not just the Noted app)?
I have a similar or identical issue with the Notes app (4.1.0) for Android. The initial sync works and then subsequent syncs appear to fail with a timeout. The front-end interface says "synchronization failed" but this doesn't appear to be accurate because the notes are updated when I check the server. I have tried to remove and redeploy the entire NC stack on the Android device to resolve this but had no luck.
battery optimization is off
@MacsKavana: It's off for the Nextcloud Android Client app as well (i.e. not just the Noted app)?
yes it is off for all NC apps.
Also this happens on a recently bought, different kind of Android device.
4.2.1 also not working with 29 server. Old Dev version is working fine.
App Version: 4.2.1
App Version Code: 40020190
App Flavor: fdroid
Files App Version Code: 30290090 (PROD)
---
OS Version: 4.14.116(10.1.0.152C10)
OS API Level: 29
Device: HWELE
Manufacturer: HUAWEI
Model (and Product): ELE-L29 (ELE-L29RU)
---
java.lang.Exception: com.nextcloud.android.sso.exceptions.NextcloudApiNotRespondingException:
at it.niedermann.owncloud.notes.persistence.NotesServerSyncTask.pushLocalChanges(NotesServerSyncTask.java:158)
at it.niedermann.owncloud.notes.persistence.NotesServerSyncTask.run(NotesServerSyncTask.java:94)
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:929)
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getString(int)' on a null object reference
at com.nextcloud.android.sso.api.AidlNetworkRequest.waitForApi(AidlNetworkRequest.java:163)
at com.nextcloud.android.sso.api.AidlNetworkRequest.performAidlNetworkRequestV2(AidlNetworkRequest.java:219)
at com.nextcloud.android.sso.api.AidlNetworkRequest.performNetworkRequestV2(AidlNetworkRequest.java:181)
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)
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: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:929)