nextcloud / nextcloud/notes-android

android notes app can't sync `NextcloudApiNotRespondingException`

Open
#1,894 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
1.1k
Forks
168
Avg merge
1d 17h
Merged PRs (30d)
31

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the stack trace in NotesServerSyncTask.java, especially pullRemoteChanges at line 219, and review how the app calls the Nextcloud Files app API during sync. Reproduce the Android 12 sync failure with the listed environment and determine whether the API responds; done means syncing completes without NextcloudApiNotRespondingException.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.