-
-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't load decks into Android app #1657
Comments
Hi @erahhal, thanks for your report! As the message states, the server has rejected the connection. Sounds like an infrastructure-issue to me. Since i saw you're running Nextcloud on Docker: Did you check your configurations on this side? I mean something like maximum-parallel-connections, PHP maximum execution time and so on? As you stated in the original issue, you don't get logs from nextcloud, but maybe you can check the ones of the NixOS and the PHP running inside it. I'm not too familiar with the whole Docker universe, so there also might be logs or settings regarding the connections? And did you try it more than once (which i'd recommend, since there might be server- and infrastructure-hickups any time) All I can tell right now: We can't really do anything, if the server refuses to deliver the requested data. |
Yes, I've tried maybe 6-7 times. It always stops after about 3 decks. I can look into the things you mentioned, thanks. |
Is it possible that there is a bug in the Android client or the sync protocol that causes a lot of duplicate or otherwise unnecessary traffic? I'm hosting Nextcloud behind HAProxy, and bumped it to 8 threads and a 100,000 connection limit, and the sync actually went farther, making it to 6 decks before it failed this time. But - it was at 15 MB/s for over a minute before this happened. I only have a few small decks, so no idea what all this traffic is. Update: The 15 MB/s was a red herring, not caused by Decks. Also, it's making to 5-6 decks today with or without the HAProxy changes, so Just a coincidence. I am noticing that network traffic completely stops for several seconds repeatedly during the import though. |
I spent an hour last night again trying to figure this out. For all gateways in the pipeline, I upped the request limit to 5 minutes. This includes haproxy at the front, and the nginx reverse proxy bundled with the docker image. I also updated the php max exec time, and fastcgi times as well. I confirmed that docker itself does not have any timing limits on network calls itself. I don't think the timeout issue is coming from gateways. The failure happens in a minute or less after the last request to the backend. Looking at the nextcloud request log, each request takes a while, and the time between each subsequent request is longer. Before it fails, it's making like one request every few seconds, so something is getting clogged up. As mentioned before, Nextcloud is running perfectly fine, and none of the other dozens of apps have problems, including ones with Android clients, including the Nextcloud client itself, and the Nextcloud recipes app. Deck is doing something different. |
Also, after the error message on Android, requests to the deck API continue to come in when I tail the logs, so something is still happening. |
I think I found something. I cleaned up a lot of the stuff in the log, and found this around the time it was failing:
|
Well, looks like this might be it! Looks a lot like this one: nextcloud/deck#5938 Might be a similar root cause as the issue above. I'd recommend opening a issue in the server project as above. |
Added this issue, thank you! |
Is this the same issue as the one causing this error?
|
Nope, definitely not. Your server is actually responding, but not with the actual data in json format, but an HTML error page:
You should check your server logs:
The issue is definitely on the servers side |
I have the same error, "Connection rejected", but when I go see the logs in the Nextcloud administration settings, I see this error :
After some search, I've found that the solution given for that problem is to set the Anyway, the value for |
@watchinofoye thats a quite interesting catch!
Well, that's not the case. We don't have a single connection. We're communicating with the server via REST endpoints. We have to call the details of each and every card with a dedicated request against the server. Since doing so sequentially would take an eternity to sync a single board, we send multiple requests in parallel. BUT: We pool the calls and have a maximum parallel calls of the number of your CPU-Cores. At least that was, what I was convinced of. Now as I read your message and do some research: Yes, we queue the requests, but the waiting for a response is asynchronous, which means: as soon as the request is sent, we send the next one without waiting for the first one to complete... This can lead to more than 15 requests running in parallel. Holy cow, I think you pointed me to something that might also be the cause of many other problems we have! Thanks for the awesome research! I'll have a good look at this as soon as I have more time than my lunch break, I'll reach out to you as soon as I know more! |
I'm noticing that if I show decks in the Tasks view, they show up, then half of them disappear as the task count gets populated. Not sure if it's a related issue but I suspect it is. Edit: Probably unrelated? I went to the deck tab, and viewed each deck one at a time, then went back to the Tasks view, and they showed up fine. |
@erahhal Yep, probably unrelated. Might be a "database and UI out of sync" issue or something. If you have trouble with that, please file a new issue. @watchinofoye @schnillerman @erahhal and @NiksaVel (from #1703) Can you please try the following DEV version for the initial sync: ᕕ(╭ರ╭ ͟ʖ╮•́)⊃¤=(————- (zipped) APK see here How to use the DEV app In case you already have a DEV version installed: clear app data before trying. |
I'm able to load the decks with the dev build! |
I got this:
Than without changing absolutely anything I tried again and it worked with no errors. |
correct, no errors on this one |
Alright, this will be shipped in the next official update. If you run in trouble again, please let us know in a new issue. Thanks for testing! |
This issue respects the following points:
Describe the bug
See closed Deck Server issue for more details.
Expected behavior
All decks imported and the app loads
Deck Android version
1.24.1
Deck server version
1.13.1
Nextcloud Android version
3.29.1
Nextcloud version
Nextcloud Hub 8 (29.0.4)
Device
OnePlus 11 5G, Pixel 7 Pro
Android Version
14, LineageOS
App Store
Stacktrace
The text was updated successfully, but these errors were encountered: