Nextcloud-deck: Continued loading-symbol and device is currently offline after already synced.

Created on 12 Dec 2020  ·  16Comments  ·  Source: stefan-niedermann/nextcloud-deck

Please use GitHub reactions 👍 to show that you are affected by the same issue. Please don't comment if you have no relevant information to add!

Describe the bug
Deck-App continues to load after already finishing the sync of the current deck and shows an error (see below) after waiting for about a minute for the sync-symbol to dissapear.

This error has been happening for some time but this is the first time I found an error-message (Might have overlooked that before now)

To reproduce
Issue is reproducible with an account from try.nextcloud.com:

  • [ ] Yes
  • [ ] No

Not tested as this is not my phone. But this only happens with this phone. Other phones with the same Server are ok.

Steps to reproduce the behavior:

  1. Open App
  2. Refresh by swiping down
  3. Current deck refreshes but continues showing the loading-symbol
  4. After waiting about a Minute the error is shown at the bottom of the screen

Expected behavior
Should sync properly and stop loading after finished

Versions

  • Nextcloud: 19.0.6
  • Nextcloud Deck: 1.2.2
  • Nextcloud Android: 3.14.1
  • Nextcloud Android Deck: 1.11.1

Smartphone:

  • Device: Galaxy M31
  • Android-Version: 10
  • App-Store:

    • [ ] Google Play Store

    • [ ] Google Play Store (Beta channel)

    • [x] F-Droid

    • [ ] Huawei AppGallery

Are you using LDAP?

  • [ ] Yes
  • [x] No

Stacktrace

App Version: 1.11.1
App Version Code: 1011001
App Flavor: fdroid

Deck Server Version: 1.2.2

Files App Version Code: 30140190

---

OS Version: 4.14.113-20009869(M315FXXU2ATJA)
OS API Level: 29
Device: m31
Manufacturer: samsung
Model (and Product): SM-M315F (m31nseea)

---

it.niedermann.nextcloud.deck.exceptions.OfflineException: Device is currently offline.
    at it.niedermann.nextcloud.deck.persistence.sync.adapters.ServerAdapter.ensureInternetConnection(ServerAdapter.java:98)
    at it.niedermann.nextcloud.deck.persistence.sync.adapters.ServerAdapter.searchGroupMembers(ServerAdapter.java:175)
    at it.niedermann.nextcloud.deck.persistence.sync.helpers.providers.AccessControlDataProvider.lambda$getAllFromServer$0$AccessControlDataProvider(AccessControlDataProvider.java:36)
    at it.niedermann.nextcloud.deck.persistence.sync.helpers.providers.-$$Lambda$AccessControlDataProvider$tocdbS84sgfe8EN9HbqkUjJJ2eM.doWork(Unknown Source:8)
    at it.niedermann.nextcloud.deck.persistence.sync.helpers.util.AsyncUtil.awaitAsyncWork(AsyncUtil.java:14)
    at it.niedermann.nextcloud.deck.persistence.sync.helpers.providers.AccessControlDataProvider.getAllFromServer(AccessControlDataProvider.java:33)
    at it.niedermann.nextcloud.deck.persistence.sync.helpers.SyncHelper.doSyncFor(SyncHelper.java:34)
    at it.niedermann.nextcloud.deck.persistence.sync.helpers.providers.BoardDataProvider.goDeeper(BoardDataProvider.java:120)
    at it.niedermann.nextcloud.deck.persistence.sync.helpers.providers.BoardDataProvider.goDeeper(BoardDataProvider.java:22)
    at it.niedermann.nextcloud.deck.persistence.sync.helpers.SyncHelper$1.onResponse(SyncHelper.java:63)
    at it.niedermann.nextcloud.deck.persistence.sync.helpers.SyncHelper$1.onResponse(SyncHelper.java:34)
    at it.niedermann.nextcloud.deck.api.RequestHelper$ResponseConsumer.accept(RequestHelper.java:62)
    at io.reactivex.internal.observers.LambdaObserver.onNext(LambdaObserver.java:63)
    at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeOnObserver.onNext(ObservableSubscribeOn.java:58)
    at io.reactivex.internal.operators.observable.ObservableMap$MapObserver.onNext(ObservableMap.java:62)
    at io.reactivex.internal.operators.observable.ObservableFromPublisher$PublisherSubscriber.onNext(ObservableFromPublisher.java:56)
    at com.nextcloud.android.sso.api.NextcloudAPI.lambda$performRequestObservableV2$1$NextcloudAPI(NextcloudAPI.java:111)
    at com.nextcloud.android.sso.api.-$$Lambda$NextcloudAPI$HPzOdi9LOc_f-wA9GNnhc9LKQSM.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.ObservableMap.subscribeActual(ObservableMap.java:32)
    at io.reactivex.Observable.subscribe(Observable.java:12284)
    at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
    at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:578)
    at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
    at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
    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)
🐞 bug

All 16 comments

Hi @lightlike, thanks for your report!

This is weird. The offline exception happens only if:

  • your device is actually offline
  • your device has WiFi disabled and you chose "only sync on WiFi" in the app-settings.

Do you remember if your WiFi was enabled at this time? Any chance you lost Internet connection at that time?

@stefan-niedermann what versions of the server and Android Deck are needed for ETag support? (@lightlike we have lately enhanced the sync-time massively)

what versions of the server and Android Deck are needed for ETag support?

Deck Server 1.2.2 & Deck Android 1.13.0

Deck Android 1.13.0 has already been released and is already available at F-Droid. You should update 🙂

However, the OfflineException should not occur. Maybe the connection has switched from wi-fi to mobile data during the sync and was offline for a very short time - this would explain the behavior.

I'd propose you update and when the issue does not occur again, we close it due to the lack of reproducibility. Since the sync should be much much quicker with Deck Android 1.13.0 the assumed scenario is way more unlikely to happen again 🤷‍♂️

I do not imagine that this has something to do with mobile data, as this is almost always disable on that phone.
There might be some wierd switching-stuff between modes in the background but I don't really see that.

I'll try the new version as soon as I can and write if that helps. (The sync is pretty quick as we see the cards change, but the loading continues even after syncing)

Update did not help and I found another Galaxy Phone (Galaxy A20e) that has the same problem.

Okay then, time to share a few more information with us (each hint will help to fix this problem):

  1. Does this happen on every sync (pull down to refresh)?

    • If not: Does the not-disappearing loading spinner and the OfflineException always occur together or does sometimes only one of the two issues occur?

  2. Please answer @desperateCoder question: Is the setting "Sync only on Wi-Fi" enabled or disabled?
  3. Tell us more about the environment

    • Are you connected to a stable Wi-Fi connections? Could a connection issue be the root cause, e. g. when you have a few walls between your phone and your access point?

    • Are you able to reproduce the issue when you are only on mobile data?

  4. Can you see any similar issues with the Notes app? (Requires this server app to work)

Please answer all questions for both smartphones

  1. Yes. This happens every sync. We do not always get the error (it takes quite some time for the error to show up), but this behaviour always happens.
  2. Should be Sync on Wi-fi and mobile data. I also see no options to change that.
    3.

    • connection should be stable enought for this and the server is on the same network

    • I testet this right next to the WLAN-AP and that did not help.

    • I will not try the only mobile data as that costs money on that phone. (and that is not my money)

  3. Notes works fine

Further information:

  • Updated to Nextcloud 20 and this still happens

Yes. This happens every sync.

Ok? Wow. Never heard of something similar, thats more than weird.

I also see no options to change that.

In the side menu, where you can also switch the boards, there is an entry for Settings. No need to change anything for resolving this bug, but maybe you'll find some useful settings there :wink:

I will not try the only mobile data as that costs money on that phone

Totally fine.

So, to sum this up: we have a strange behavior and no clue, where and why this stuff happens. If you are willing to help us resolving this issue, I have some further questions:

  • You stated, that you had updated the Android Deck app via F-Droid. The Line numbers in your initial stacktrace don't match the current code anymore. Could you just reproduce this error twice and post both stacktraces (i want to find out if it's always the same call)
  • How deep into Android are you? Would you know how to get logs out of the app? Or are even able to debug it? (if no: no problem! Would be the easyest way.)
  • If we can't get any further by this, would you mind installing a custom build for you parallel to your actual installation? I'd build some more verbose version printing out a bunch of more information to isolate the faulty code.

Really, big thanks so far! You are communicating well and I have the feeling, that you aren't just complaining, but trying to help us getting things solved. Unfortunately this isn't always the case. Thanks!

In the side menu, where you can also switch the boards, there is an entry for Settings. No need to change anything for resolving this bug, but maybe you'll find some useful settings there 😉

That makes sense. I only searched in the Android menues.
Wi-fi-only takes the same amount of time. Except once where it worked quite quick. (this is so inconsistent :confused:)

  • At the moment I can reproduce the long load times but I am unable to get any error-messages to show so this might take some time.
  • I did some Android Development (Xamarin) before and I might be able to find the logs (with some google-help :wink:).
  • I can install some custom-versions on the device but that might take some time as the device is still in use.

this is so inconsistent

If you are on Android Deck version >=1.13.0 the sync will selectively sync specific boards, which have changed. And since you stated that you host your Nextcloud instance in your own network, it may also depend on the performance of your server. So yes, it is inconsistent depending on various factors. Could you please verify, which version you are on right now? (side menu -> About)

  • I did some Android Development (Xamarin) before and I might be able to find the logs (with some google-help wink).
  • I can install some custom-versions on the device but that might take some time as the device is still in use.

I guess I'd go for the custom version. That way I can let the app just hard-die in case anything goes wrong, so we know where it really fails. If it takes some time, no problem at all! I'll start implementing your special version in a few minutes and post a link to it here.

Here you go: APK Download ( ͡° ͜ʖ ͡°)

So IF it dies, it will exactly state, what went wrong. It is safe to install it, it won't have any effect on your current installation, so no worries. You'll end up with two deck apps on your phone, the one labeled with "dev" is this one.

Seems that the device that I testet was still on 1.11.1. I'll get the new version tomorrow.
I'll also install the dev-Version then and try getting something from that. But from what I have gathered today, the error will be annoying to reproduce.

@lightlike do you have any new information for us with the latest version?

Nope. Sorry I didn't have the time. It is currently very busy with University. I'll try getting you something in the next fiew days.

Updates to Version 1.13:

  • Updates work faster but still takes more than 30 sec for one board (only one board for that entire account, fiew items moved/added).

    • saw the items updating in the first 2-3 seconds

  • I was unable to reproduce the exception at all (maybe that really was some network issue). I will try the dev-version over the next days.

Thank you for the update!

I was unable to reproduce the exception at all

Since you haven't been able to reproduce the issue, i will close this issue. Just feel free to reopen it or create a new one in case you notice this error again 🙂

Yea. Sorry I did not answer. :sweat_smile:
The new Update seems to be a lot better but some times it seems linke something forgot to disable the loading Symbol.
It works completely fine and as soon as you refresh the page (close and reopen) it seems to disappear. You do not even need to completely close the app.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

thenickname picture thenickname  ·  4Comments

ilippert picture ilippert  ·  7Comments

ghost picture ghost  ·  3Comments

riweckr picture riweckr  ·  6Comments

D-side picture D-side  ·  5Comments