nextcloud / nextcloud/notes-android

Unable to resolve host error on first launch: `UnknownErrorException: Unable to resolve host`

Open
#2,292 1 comment 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

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
  • Google Play Store
  • F-Droid
  • Huawei App Gallery
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.

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 NotesServerSyncTask.java, especially pullRemoteChanges at line 219 and run at line 96, then trace the reported Android SSO network exception. Reproduce the first-launch synchronization against the public server hostname and verify that synchronization completes without the error bar.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.