Skip to content
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

Android bug: E016: Request timed out #1708

Open
1 task done
ghost opened this issue Aug 27, 2024 · 7 comments
Open
1 task done

Android bug: E016: Request timed out #1708

ghost opened this issue Aug 27, 2024 · 7 comments

Comments

@ghost
Copy link

ghost commented Aug 27, 2024

Which version of floccus are you using?

5.26

How many bookmarks do you have, roughly?

6k

Are you using other means to sync bookmarks in parallel to floccus?

No

Sync method

Nextcloud Bookmarks

Which browser are you using? In case you are using the phone App, specify the Android or iOS version and device please.

LineageOS 20 (Android 13)

Which version of Nextcloud Bookmarks are you using? (if relevant)

14.2.4

Which version of Nextcloud? (if relevant)

28.0.8

What kind of WebDAV server are you using? (if relevant)

No response

Describe the Bug

When trying to sync, the app just hangs. The logs just have "Syncing failed with E016: Request timed out. Check your server configuration".

Complete debug logs

2024-07-14T07:09:00.592Z Starting sync process for account [email protected]
2024-07-14T07:09:00.609Z QUEUING POST https://nextcloud.internal/index.php/apps/bookmarks/public/rest/v2/lock
2024-07-14T07:09:00.611Z FETCHING POST https://nextcloud.internal/index.php/apps/bookmarks/public/rest/v2/lock
2024-07-14T07:09:02.064Z Receiving response for POST https://nextcloud.internal/index.php/apps/bookmarks/public/rest/v2/lock
2024-07-14T07:09:02.208Z Using "default" strategy
2024-07-14T07:09:02.210Z Retrieving local tree
2024-07-14T07:09:02.232Z Retrieving server tree
2024-07-14T07:09:02.233Z QUEUING GET https://nextcloud.internal/index.php/apps/bookmarks/public/rest/v2/bookmark?page=1&limit=1
2024-07-14T07:09:02.233Z FETCHING GET https://nextcloud.internal/index.php/apps/bookmarks/public/rest/v2/bookmark?page=1&limit=1
2024-07-14T07:09:03.712Z Receiving response for GET https://nextcloud.internal/index.php/apps/bookmarks/public/rest/v2/bookmark?page=1&limit=1
2024-07-14T07:09:03.714Z QUEUING GET https://nextcloud.internal/index.php/apps/bookmarks/public/rest/v2/folder/-1/hash
2024-07-14T07:09:03.714Z FETCHING GET https://nextcloud.internal/index.php/apps/bookmarks/public/rest/v2/folder/-1/hash
2024-07-14T07:09:03.849Z Receiving response for GET https://nextcloud.internal/index.php/apps/bookmarks/public/rest/v2/folder/-1/hash
2024-07-14T07:09:03.850Z Filtering out unaccepted local bookmarks
2024-07-14T07:09:03.895Z Filtering out invalid server bookmarks
2024-07-14T07:09:03.895Z Filtering out duplicate bookmarks
2024-07-14T07:09:03.912Z Loading sparse tree as necessary
2024-07-14T07:09:05.772Z LOADCHILDREN     + #-1[undefined] parentId: undefined, hash: 4858b415eb707cdd838a121773c65655b4444fe17d7a45541cbf2f25ab731346

2024-07-14T07:09:05.776Z QUEUING GET https://nextcloud.internal/index.php/apps/bookmarks/public/rest/v2/folder/-1/children?layers=1
2024-07-14T07:09:05.776Z FETCHING GET https://nextcloud.internal/index.php/apps/bookmarks/public/rest/v2/folder/-1/children?layers=1
2024-07-14T07:11:02.067Z QUEUING POST https://nextcloud.internal/index.php/apps/bookmarks/public/rest/v2/lock
2024-07-14T07:11:02.082Z FETCHING POST https://nextcloud.internal/index.php/apps/bookmarks/public/rest/v2/lock
2024-07-14T07:11:02.406Z Receiving response for POST https://nextcloud.internal/index.php/apps/bookmarks/public/rest/v2/lock
2024-07-14T07:12:05.796Z Syncing failed with E016: Request timed out. Check your server configuration
2024-07-14T07:12:05.810Z QUEUING DELETE https://nextcloud.internal/index.php/apps/bookmarks/public/rest/v2/lock
2024-07-14T07:12:05.812Z FETCHING DELETE https://nextcloud.internal/index.php/apps/bookmarks/public/rest/v2/lock
2024-07-14T07:12:06.083Z Receiving response for DELETE https://nextcloud.internal/index.php/apps/bookmarks/public/rest/v2/lock

Expected Behavior

Sync should terminate.

To Reproduce

I might be specific to my bookmarks, but generate a bunch of bookmarks and they try to query them? I'm not sure. If there were logs of failed requests, I could be more specific. But I have no idea which request is failing. I tried calling every request listed in the logs, but they all succeed.

Debug log provided

  • I have provided a debug log file
@ghost ghost added the bug label Aug 27, 2024
Copy link

Hello 👋

Thank you for taking the time to open this issue with floccus. I know it's frustrating when software
causes problems. You have made the right choice to come here and open an issue to make sure your problem gets looked at
and if possible solved.
I'm Marcel and I created floccus a few years ago, maintaining it ever since. I currently work for Nextcloud
which leaves me with less time for side projects like this one than I used to have.
I still try to answer all issues and if possible fix all bugs here, but it sometimes takes a while until I get to it.
Until then, please be patient.
Note also that GitHub is a place where people meet to make software better together. Nobody here is under any obligation
to help you, solve your problems or deliver on any expectations or demands you may have, but if enough people come together we can
collaborate to make this software better. For everyone.
Thus, if you can, you could also have a look at other issues to see whether you can help other people with your knowledge
and experience. If you have coding experience it would also be awesome if you could step up to dive into the code and
try to fix the odd bug yourself. Everyone will be thankful for extra helping hands!
To continue the development and maintenance of this project in a sustainable way it is expected that you donate to the project when opening a ticket,
if you're not a donor already. You can find donation options at https://floccus.org/donate/. Thank you!

One last word: If you feel, at any point, like you need to vent, this is not the place for it; you can go to the Nextcloud forum,
to twitter or somewhere else. But this is a technical issue tracker, so please make sure to
focus on the tech and keep your opinions to yourself.

I look forward to working with you on this issue
Cheers 💙

@marcelklehr
Copy link
Member

Hey @LoveIsGrief
https://nextcloud.internal/index.php/apps/bookmarks/public/rest/v2/folder/-1/children?layers=1 seems to be the request that times out, that shouldn't happen, but can happen when the folder is not cached on the server yet. Since all requests are succeeding when you run them manually now it's strange that the requests from the app timeout. Do you have all your bookmarks in one folder?

@github-project-automation github-project-automation bot moved this to Backlog in Floccus Aug 28, 2024
@marcelklehr marcelklehr moved this from Backlog to Triaging in Floccus Aug 28, 2024
@ghost
Copy link
Author

ghost commented Aug 28, 2024

Hi @marcelklehr

Many bookmarks are indeed in one folder. I moved them out of folders because firefox would slow down immensely when opening the bookmarks with many folders and subfolders. I use tagging extensively.

The request is ~18MB gzipped and transfers in 10-20s (~1MB/s). Maybe the timeout could be configurable?

I checked the API and the bookmarks aren't paged, but the bigger problem is that the bookmarks have a textContent and htmlContent field, which seems to contain the entirety of the bookmark ☹️

It's weird because "Auto Archiving" isn't on

image

Maybe using the GET /public/rest/v2/bookmark, filtering by folder and paging the results could help too?

Edit: If indeed folders/.../children is the one timing out, then it's only called by this function, which could probably use /folder/ to get the tree and /bookmark/ to page through each folder.

I wouldn't know how to test it though :/ Is the code used for both the android and the browser app?

@marcelklehr
Copy link
Member

Is the code used for both the android and the browser app?

Yeah, it's the same code. Thanks for looking into possible fixes!

@marcelklehr
Copy link
Member

If indeed folders/.../children is the one timing out, then it's only called by this function, which could probably use /folder/ to get the tree and /bookmark/ to page through each folder.

That's a good idea! Since you say the request is only 10-20s I'm not sure if the client-side timeout is the issue. it's set to 300s seconds at the moment.

@ghost
Copy link
Author

ghost commented Sep 2, 2024

If that request is not timing out, then I wonder, would it make sense to log the stack? Or is there some other way to find out which request is timing out?

I'm also wondering if there error is actually correct. Maybe it's running out of memory as it's 22MB of JSON, but that's just an assumption. For some reason this does work in the browser, but not on Android.

@marcelklehr
Copy link
Member

Or is there some other way to find out which request is timing out?

I'm pretty certain it's this request, because all other requests have a log entry that says "receiving response".

For some reason this does work in the browser, but not on Android.

That's peculiar indeed.

@marcelklehr marcelklehr moved this from Triaging to To Do: Bugs in Floccus Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To Do: Bugs
Development

No branches or pull requests

1 participant