-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
App has failed to run initial sync due to 403 (issue started occurring long ago) #1560
Comments
I noticed that when I try to connect with Deck using the app, the server logs this error:
The |
@xarinatan Hi! Can you please try if this dev build performs any better? This APK will install along with your current version. In your app drawer you'll find two deck apps, while the one above will have a "DEV" label on its icon. Please report back if you still run into issues with this version. |
@desperateCoder Thanks for the dev build! I appreciate you taking the time. It appears to have gotten a little further, but after board 3 out of 19 it crashed with the same 403 SSO error again:
also serverside it shows the same userid error: let me know if I can do anything else! I'm also the server admin so I can access any logs from either point of view (also the raw logs on the server itself) |
actually there are several different clientside errors, the above one is a 500 variety (but generates that error on the serverside) find it hard to currently reproduce the 403, but I think it may just be one of the other errors that appear at the same time on the client. here's a 303 variety (http "See Other" redirect)
|
I just checked on this, I have strong indications that the server is having a bug here... I'll dig a little more, since you're not the only one experiencing this. (see #1447 (comment)) |
I have been affected by this issue for a long time as well. And I think I might have some insight. What I noticed is that server 403s or 500s on specific boards, for example:
But, that board is deleted, I don't even see it in Nextcloud's UI! So, I checked, and yes, Nextcloud is listing it the list of the boards, but pay attention, it has
And true, if I try it myself, I get 403 too:
So, I think, if you simply delete a board and then try to do clean sync you will easily reproduce this issue. And also, to ignore deleted boards would solve this issue. |
Hi @kotnik, that's actually an awesome hint, thanks! I'll try it as soon as I get to find some free time! |
Possibly related: nextcloud/deck#2198 |
@kotnik I hacked a filter for deleted boards in a quick-and-dirty manner, so we can test if this fixes anything for you. Lets see... Can you please try the following DEV-build: It will install beside your actual deck app. It'll have a "DEV" label on the app icon. Please use this version, connect it to your account and tell me, if it manages to sync properly. If it does, you sir, deserve a damn medal. |
@desperateCoder I figured I'd also give this a try, but unfortunately I'm getting a Java crash due to referencing an interface/method it can't find:
|
@xarinatan thanks for testing! Gosh, apparently Android doesn't like javas stream-feature. Ok, lets do it the classic way then, here you go: |
it didn't crash on java, and it got all the way to the 4th board before crashing with another 503, but only one this time before it halted (no error spam like in the initial case):
I fetched the mentioned card with the curl request from the other bug, it doesn't appear the specific card is deleted or causes errors when fetching the contents with the curl request though:
|
@xarinatan thanks for testing again! At least we're not getting Let's see if it changes something for @kotnik. |
@desperateCoder Thanks for providing the debug builds! I'm happy to try to help resolve this issue and do further debugging. honestly initially there were a whole bunch of errors so I just picked the one I managed to copy, but it wasn't consistent, sometimes 5xx, sometimes 4xx (like the 403 mentioned), sometimes even 3xx, but it's definitely gotten less random with these more recent debug builds, and I do suspect that filtering out deleted cards is part of the issue! As for the backend, I don't think I have anything weird installed honestly, and my server is running a full ECC memory/CPU stack and checksumming storage that should let me know if there are any hardware issues happening, plus I always keep up to date with the latest Nextcloud (currently 28.0.2).. Checking the serverside logs there are a few items that stand out to me:
Let me know if I can try anything else, I would really love to be able to use the honestly excellent application again some day :) I much share the frustration of this bug being so pervasive and hard to root cause. I also hope it gets fixed for @kotnik specifically , if so that would be a big step forward. |
did some further testing with the debug apk, I found these results interesting:
|
@xarinatan thanks for your research!
For now, if you could check on the max-connections of your apache, that would help to complete the image a little more. As soon as I find time to play around with the thread pool size, I'll post an APK for you. Thanks for your help! |
@xarinatan ok, here's a version with a core pool size of 1, while it will grow to 2 when it hat much to do. Imho this should be low enough. Here you go, lets see if it changes anything. I'd bet it doesn't 😓 |
@desperateCoder Thank you for the kind words, and the new debug build! I'll be sure to test it. I'm struggling to get past the 'connection rejected' part now for some reason even with this new debug build. It should be noted that I'm using nginx and it should allow for 512 connections per worker, which I'd say is plenty for something like this.. and if I check the frontend loadbalancer's logs, I can't see anything weird there either, only a few requests happen at the same time, and the requests actually seem to be met with 2xx responses, at least for nextcloud's subdomain. I'll try to dig a bit more into it, will let you know if I figure it out. |
@xarinatan thanks for the feedback! just note that your nginx (i assume you're using it as a reverse proxy?) might not be the bottleneck here. Nextcloud is PHP based and most likely runs on an apache webserver. if your apache is configured to eg. 5 connections only (bullshit number obviously), your nginx can allow as many as it wants, the apache still won't. After the connection is rejected by apache, its a implementation detail of the proxy deciding what kind of response the client actually gets. But yeah, take your time analyzing what is actually happening there, we get closer and closer, although we don't know the missing distance yet 😅 |
@desperateCoder I just tried the latest APK you posted, and success! The boards load and I can use them. It's been a while since I saw them on my phone 😊 |
@kotnik awesome! Congratulations for "fixing" it all by yourself, and big thanks again for your hint! Could you please test the version of following comment as well? #1560 (comment) I just want to make sure the connection pooling isn't the problem here. If this works, I'll use the fix for the next upcoming version, since it doesn't seem to break anything and fixes a good portion of the problem. |
Just tried that one as well. At first run it failed with:
There were no issues server side. I've run it again just after that, and it loaded all the boards properly and I was able to use them. I hope this helps. |
Thanks everybody for your valuable help! We merged the changes @desperateCoder made together with you and we will release these changes in Leaving up to @desperateCoder how to proceed: Either keeping this as a general collecting issue or to close it and taking care about further issue in seperate topics to be more focused and not spamming subscribers with (for them) unrelated conversations. |
Thank you for incorporating that fix! it definitely is part of my issues as well even if it didn't completely fix it. If it helps, we can close this bug for now, and I'll open a new one if I manage to get more details about what's going wrong with my specific setup. I still don't have it working (still gives me a 503 with a serverside "Error in application Index" in the logs), but I haven't had the time and energy to dig further into it as of currently, and technically speaking it's no longer a 403 or a flurry of errors, so we definitely made some progress here :) |
I also have the
|
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
When running the initial sync, after a fresh install from either the Fdroid store on my FOSS phone, or the Play store on my stock Pixel, the application crashes with a whole load of errors. The initial error seems to be related to a 403, but I can't really tell why:
After the above crash, it spams various other errors, including SQLite Constraints errors, and illegal state exceptions:
Steps to reproduce the behavior:
Expected behavior
Logging in, seeing my boards, being able to use the app.
Screenshots
Here's a screen recording of it happening: https://nextcloud.dragonhive.net/s/QjB6PBgGm5MqLXT (had to upload to my own Nextcloud because Github doesn't accept more than 10MB)
Versions
Unfortunately I don't know the exact version where this started happening, but it's been a problem for somewhere around half a year to a year. I always keep my Nextcloud Server and the applications running on it religiously up to date with automated means, so it's hard to track when it really started.
Smartphone (please complete the following information):
additional notes and thoughts
My Nextcloud server/account uses 2FA, maybe that's related? though it used to work in the past.
The app was really nice when it worked, I'd be happy to try specific things to debug the issue if you want me to test things.
The text was updated successfully, but these errors were encountered: