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
927 stars 135 forks source link

Unable to resolve host error on first launch #2292

Open js-d-coder opened 2 months ago

js-d-coder commented 2 months ago

This issue respects the following points:

Describe the bug

Steps to reproduce the bug:

  1. Open Notes app on Android Phone.
  2. Notice 'Synchronization error' bar at the bottom of the app

Expected behavior

No 'Synchronization error'

Notes Android version

4.2.1

Notes server version

4.10.1

Nextcloud Android version

3.29.1

Nextcloud version

28.0.7

Device

Realme 6i and Realme P1 Pro 5G

Android Version

14 and 11

App Store

Stacktrace

App Version: 4.2.1

App Version Code: 40020190

App Flavor: fdroid

Files App Version Code: 30290190 (PROD)

---

OS Version: 5.10.198-android12-9-o-g31299f4e1e15(U.R4T2.189bc1a_40579_40578)

OS API Level: 34

Device: RE5C84L1

Manufacturer: realme

Model (and Product): RMX3844 (RMX3844IN)

---

java.lang.RuntimeException: com.nextcloud.android.sso.exceptions.UnknownErrorException: Unable to resolve host "<hostname>": No address associated with hostname

    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.UnknownErrorException: Unable to resolve host "<hostname>": No address associated with hostname

    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

Note: Nextcloud server is hosted on public cloud and is reachable via public domain name.

chris-tier commented 1 week ago

Experiencing the same issue here. Sometimes, after opening the app, I immediately get this error. The Nextcloud is working fine and the app usually is working fine as well. The error can also appear if opened a couple of minutes after having it open (and successfully syncing). So taking a complete shot in the dark: It seems like the timeout for the host resolving may be too short?

App Version: 4.3.1
App Version Code: 40030190
App Flavor: fdroid

Files App Version Code: 30290290 (PROD)

---

OS Version: 5.10.205-android12-9-00029-g3f12df86bfdb-ab11799032(34.0304.2004.145)
OS API Level: 34
Device: ASUS_AI2202
Manufacturer: asus
Model (and Product): ASUS_AI2202 (EU_AI2202)

---

java.lang.RuntimeException: com.nextcloud.android.sso.exceptions.UnknownErrorException: Unable to resolve host "correct hostname": No address associated with hostname
    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: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.UnknownErrorException: Unable to resolve host "correct hostname": No address associated with hostname
    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