[GH-ISSUE #1708] Android bug: E016: Request timed out #1135

Open
opened 2026-02-25 22:39:07 +03:00 by kerem · 7 comments
Owner

Originally created by @ghost on GitHub (Aug 27, 2024).
Original GitHub issue: https://github.com/floccusaddon/floccus/issues/1708

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 loveisgrief@nextcloud.internal
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
Originally created by @ghost on GitHub (Aug 27, 2024). Original GitHub issue: https://github.com/floccusaddon/floccus/issues/1708 ### 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". <details><summary>Complete debug logs</summary> <p> ``` 2024-07-14T07:09:00.592Z Starting sync process for account loveisgrief@nextcloud.internal 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 ``` </p> </details> ### 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 - [X] I have provided a debug log file
Author
Owner

@github-actions[bot] commented on GitHub (Aug 27, 2024):

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 💙

<!-- gh-comment-id:2313222180 --> @github-actions[bot] commented on GitHub (Aug 27, 2024): Hello :wave: 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 :blue_heart:
Author
Owner

@marcelklehr commented on GitHub (Aug 28, 2024):

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?

<!-- gh-comment-id:2315327671 --> @marcelklehr commented on GitHub (Aug 28, 2024): 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?
Author
Owner

@ghost commented on GitHub (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?

<!-- gh-comment-id:2316191232 --> @ghost commented on GitHub (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 :frowning_face: It's weird because "Auto Archiving" isn't on ![image](https://github.com/user-attachments/assets/88226a2f-f8e3-4d36-a074-b98b703bd504) Maybe using the [GET /public/rest/v2/bookmark](https://nextcloud-bookmarks.readthedocs.io/en/latest/bookmark.html#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](https://github.com/floccusaddon/floccus/blob/d33e68635db024121b94cc479cc0f3d7b0aa05c5/src/lib/adapters/NextcloudBookmarks.ts#L329-L362), 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?
Author
Owner

@marcelklehr commented on GitHub (Aug 31, 2024):

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

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

<!-- gh-comment-id:2322862196 --> @marcelklehr commented on GitHub (Aug 31, 2024): > Is the code used for both the android and the browser app? Yeah, it's the same code. Thanks for looking into possible fixes!
Author
Owner

@marcelklehr commented on GitHub (Aug 31, 2024):

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.

<!-- gh-comment-id:2322863334 --> @marcelklehr commented on GitHub (Aug 31, 2024): > If indeed folders/.../children is the one timing out, then it's only called by [this function](https://github.com/floccusaddon/floccus/blob/d33e68635db024121b94cc479cc0f3d7b0aa05c5/src/lib/adapters/NextcloudBookmarks.ts#L329-L362), 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.
Author
Owner

@ghost commented on GitHub (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.

<!-- gh-comment-id:2324639814 --> @ghost commented on GitHub (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.
Author
Owner

@marcelklehr commented on GitHub (Sep 8, 2024):

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.

<!-- gh-comment-id:2336625940 --> @marcelklehr commented on GitHub (Sep 8, 2024): > 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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/floccus#1135
No description provided.