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

Sync issue from notes app to nextcloud server

Open zimmermannstefan opened this issue 1 year ago • 19 comments

I cannot sync my notes from my phone to my nextcloud server (version 26.0.1). I attached the error log from notes. I am unsure for how long I see the issue, at least some days probably some weeks.

App Version: 4.0.0
App Version Code: 40000090
App Flavor: play

Files App Version Code: 30240290

---

OS Version: 4.14.186+(R.GDPR.f1ba30-5fd8)
OS API Level: 31
Device: OP515BL1
Manufacturer: OnePlus
Model (and Product): DN2103 (DN2103EEA)

---

java.lang.RuntimeException: com.nextcloud.android.sso.exceptions.UnknownErrorException: failed to connect to <I REMOVED MY DOMAIN AND IP ADDRESS> (port 443) from /<I REMOVED THE IP ADDRESS> (port 44539) after 60000ms
	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.UnknownErrorException: failed to connect to  <I REMOVED MY DOMAIN AND IP ADDRESS> (port 443) from /<I REMOVED THE IP ADDRESS> (port 44539) after 60000ms
	at com.nextcloud.android.sso.api.AidlNetworkRequest.performNetworkRequestV2(AidlNetworkRequest.java:188)
	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

zimmermannstefan avatar May 30 '23 14:05 zimmermannstefan

And you are sure that

  • you are able to access your instance with the given domain or IP address on port 443 via browser?
  • The main nextcloud android app connects and works well with your instance?

stefan-niedermann avatar May 30 '23 16:05 stefan-niedermann

I worked perfect in the past. I only updated the notes app and on the server to the latest versions, of nextcloud and the installed apps.

zimmermannstefan avatar May 31 '23 02:05 zimmermannstefan

Well this does not answer the questions. Please check whether your Notes are accessibke via browser and whether your Nextcloud Android app (not Notes Android) works.

stefan-niedermann avatar May 31 '23 06:05 stefan-niedermann

~~Having the same issue~~, but I am new to the product and will have to investigate how to get logs.

It took a while but it finally synced

I am using Notes App 4.0.0 and Nextcloud Hub 4 (26.0.2)

and the nextcloud app works fine and can access notes via browser

Device: Samsung S23 Ultra Android Version: 13 App Source: F-Droid

adoreparler avatar Jun 01 '23 13:06 adoreparler

Sorry for the late answer. Yes, the Notes app in Nextcloud works without and issues, I used firefox on an Ubuntu system.

zimmermannstefan avatar Jun 08 '23 03:06 zimmermannstefan

Same Here since I Upgraded to nextcloud 26.02.

Notes in the Browser works Like usual.

App Version: 4.0.0
App Version Code: 40000090
App Flavor: play

Files App Version Code: 30240190

---

OS Version: 4.4.205-perf+(2010292059)
OS API Level: 29
Device: OnePlus5
Manufacturer: OnePlus
Model (and Product): ONEPLUS A5000 (OnePlus5)

---

com.nextcloud.android.sso.exceptions.UnknownErrorException: failed to connect to /10.16.1.1 (port 8080) from /192.168.178.40 (port 41602) after 60000ms: isConnected failed: ENETUNREACH (Network is unreachable)
	at com.nextcloud.android.sso.api.AidlNetworkRequest.performNetworkRequestV2(AidlNetworkRequest.java:188)
	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)
	at io.reactivex.Observable.blockingSingle(Observable.java:5381)
	at it.niedermann.owncloud.notes.persistence.CapabilitiesClient.getCapabilities(CapabilitiesClient.java:32)
	at it.niedermann.owncloud.notes.importaccount.ImportAccountActivity.lambda$onActivityResult$5$it-niedermann-owncloud-notes-importaccount-ImportAccountActivity(ImportAccountActivity.java:96)
	at it.niedermann.owncloud.notes.importaccount.ImportAccountActivity$$ExternalSyntheticLambda2.run(Unknown Source:4)
	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:919)

zickzackzuck avatar Jun 20 '23 17:06 zickzackzuck

Hi,

I have the Exact same issue then the others, it's very bad and important to fix i think. I had the same issue on a previous version too than the actual 26.02. Now I'm in 26.02 and same issue. The note app on a browser is OK, but the sync between my nextcloud note android app and the server doesn't work.

On the netxcloud notes app, its shows a "error of synchronisation" popup

The error log is :

App Version: 4.0.0
App Version Code: 40000090
App Flavor: fdroid

Files App Version Code: 30250090

---

OS Version: 4.19.152-perf+(R.fb7e8e-1-2)
OS API Level: 33
Device: OP4F11L1
Manufacturer: OPPO
Model (and Product): CPH2219 (CPH2219EEA)

---

java.lang.RuntimeException: com.nextcloud.android.sso.exceptions.NextcloudApiNotRespondingException: Pas de réponse de l'API de l'application Nextcloud Files. Cela est probablement dû à des optimalisations de la batterie de votre téléphone. Essayez de désactiver l'optimalisation de la batterie pour les 2 applications (Nextcloud Android et cette application). Sinon, essayez de remettre à zero le stockage de ces 2 applications
	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: Pas de réponse de l'API de l'application Nextcloud Files. Cela est probablement dû à des optimalisations de la batterie de votre téléphone. Essayez de désactiver l'optimalisation de la batterie pour les 2 applications (Nextcloud Android et cette application). Sinon, essayez de remettre à zero le stockage de ces 2 applications
	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

--> I desactived the optimization for all nextcloud apps installed on my phone, but it doesn't change anywthing, still error of synchro. -->> ALL my nextcloud app works without issue on android and a a pc browser. just this notes app i use a lot doesn't synchro :(

P.S: just an evol : is it possible to add an hour/min/date on each note?

tomhollandy avatar Jun 23 '23 15:06 tomhollandy

@tomhollandy your issue is unrelated. Please read the FAQ.

stefan-niedermann avatar Jun 23 '23 17:06 stefan-niedermann

@tomhollandy your issue is unrelated. Please read the FAQ.

No, you are wrong. if you read my post well, you can see i disabled the battery optimiz, like said, I clear the sotrage too, and the issue is really still here. so it's really the pretty same issue i have than the others here on that bug report.

tomhollandy avatar Jun 23 '23 20:06 tomhollandy

This does not change anything about the fact that your issue is not related to the originally reported UnknownErrorException (which indicates that the device can't reach the cloud via internet rather than the Notes Android app not being able to connect to the Nextcloud Android app locally on your phone via Single Sign On which the NextcloudApiNotRespondingException indicates).

stefan-niedermann avatar Jun 23 '23 21:06 stefan-niedermann

By the way, the syncronisation via the nexcloud app works without problems.

zimmermannstefan avatar Jun 23 '23 23:06 zimmermannstefan

no it's false, again the issue.

tomhollandy avatar Jun 27 '23 22:06 tomhollandy

I have the same issue, so I tried reinstalling the app, and now I get this after I select the account to use. I can access Notes in the browser, and the Nextcloud app works normally. I tried installing version 4.0.0 from F-Droid and from Google Play, but get the same result. My Nextcloud server version is 26.0.5.

App Version: 4.1.0 RC1
App Version Code: 40010051
App Flavor: fdroid

Files App Version Code: 30250090 (PROD)

---

OS Version: 5.10.157-ge0f319f857fa(8518cda834)
OS API Level: 33
Device: cheetah
Manufacturer: Google
Model (and Product): Pixel 7 Pro (cheetah)

---

java.lang.ClassNotFoundException: org.apache.commons.httpclient.ConnectTimeoutException
	at java.lang.Class.classForName(Native Method)
	at java.lang.Class.forName(Class.java:454)
	at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:683)
	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1731)
	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1622)
	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1900)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1440)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:428)
	at com.nextcloud.android.sso.api.AidlNetworkRequest.deserializeObjectV2(AidlNetworkRequest.java:245)
	at com.nextcloud.android.sso.api.AidlNetworkRequest.performNetworkRequestV2(AidlNetworkRequest.java:183)
	at com.nextcloud.android.sso.api.NextcloudAPI.performNetworkRequestV2(NextcloudAPI.java:171)
	at com.nextcloud.android.sso.api.NextcloudAPI.lambda$performRequestObservableV2$0$com-nextcloud-android-sso-api-NextcloudAPI(NextcloudAPI.java:113)
	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.CapabilitiesClient.getCapabilities(CapabilitiesClient.java:32)
	at it.niedermann.owncloud.notes.importaccount.ImportAccountActivity.lambda$onActivityResult$5$it-niedermann-owncloud-notes-importaccount-ImportAccountActivity(ImportAccountActivity.java:96)
	at it.niedermann.owncloud.notes.importaccount.ImportAccountActivity$$ExternalSyntheticLambda2.run(Unknown Source:4)
	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: java.lang.ClassNotFoundException: org.apache.commons.httpclient.ConnectTimeoutException
	... 27 more

mackenzie-1k4 avatar Aug 12 '23 08:08 mackenzie-1k4

I just updated my Nextcloud server from 26.0.5 to 27.0.2 and the problem was immediately resolved. I selected my account, and the notes were imported. This issue is resolved for me.

mackenzie-1k4 avatar Aug 19 '23 00:08 mackenzie-1k4

This really needs to be fixed. For me, this UnknownErrorException occurs consistently when I'm on mobile data. When I'm on Wifi, the synchronization works. This basically renders the app useless when I'm outside and need it the most.

As @zimmermannstefan mentioned, I also remember this suddenly getting a problem around a year ago. (After working completely fine until then.) There was no change to the server or anything else in my setup, so this has to be a regression introduced by changes to the app code.

Unfortunately I am not familiar with the code base, but could you investigate this, please?

jojosoft avatar May 26 '24 09:05 jojosoft

My debug message in case it helps:

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

Files App Version Code: 30290090 (PROD)

---

OS Version: 3.4.113-lineageos-ge57c88f(c81d913e25)
OS API Level: 28
Device: klte
Manufacturer: samsung
Model (and Product): SM-G900F (lineage_klte)

---

com.nextcloud.android.sso.exceptions.UnknownErrorException: failed to connect to <my server>/<my server's IP> (port 443) from /<mobile data IP> (port 52412) after 5000ms: isConnected failed: ECONNREFUSED (Connection refused)
	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)
	at io.reactivex.Observable.blockingSingle(Observable.java:5381)
	at it.niedermann.owncloud.notes.persistence.CapabilitiesClient.getCapabilities(CapabilitiesClient.java:32)
	at it.niedermann.owncloud.notes.main.MainViewModel.lambda$synchronizeCapabilities$13(MainViewModel.java:401)
	at it.niedermann.owncloud.notes.main.MainViewModel.$r8$lambda$yQXkPg93_HnlK4cvQrVOmNRWRc0(Unknown Source:0)
	at it.niedermann.owncloud.notes.main.MainViewModel$$ExternalSyntheticLambda26.run(Unknown Source:6)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
	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:764)

Note that the server doesn't even register any request while the app tries to connect. Of course, other apps work, and accessing the server directly via the web browser works fine, too.

jojosoft avatar May 26 '24 09:05 jojosoft

@jojosoft What happens when you open your web browser and try to connect to your instance (using the same URL) on the same device?

joshtrichards avatar Aug 08 '24 20:08 joshtrichards

@joshtrichards If I enter the main URL of the Nextcloud server into the inbuilt Android browser, I see the login page. If I log in, the dashboard loads, and then the message "Your browser is not supported. Please upgrade to a newer version or a supported one." covers the screen, but if I click "Continue with this unsupported browser" I can explore the Nextcloud normally, open notes and other files, and even play videos.

jojosoft avatar Aug 12 '24 02:08 jojosoft

By the way, recently the main Nextcloud app started showing me the message "Cannot use this server" (no sync is performed then) whenever I am on mobile data, but it still works fine on WiFi. Could it be that it's a side-effect of the old Android version I use? It's Android 9, LineageOS 16.0 for me.

jojosoft avatar Aug 12 '24 03:08 jojosoft