mirror of
https://github.com/floccusaddon/floccus.git
synced 2026-04-25 14:16:12 +03:00
[GH-ISSUE #1277] Nextcloud - Firefox - Sync fails. E020: Could not parse server response. #849
Labels
No labels
browser-specific
bug
correctness issues
enhancement
feature: Google Drive
feature: Linkwarden
feature: git
feature: nextcloud-bookmarks
feature: tabs
feature: webdav
help wanted
native-app
priority: high
priority: low
priority: medium
pull-request
question
question
stale
upstream
waiting for more information
wontfix
🙁 Not following issue template
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/floccus#849
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @patrick-motard on GitHub (Oct 28, 2022).
Original GitHub issue: https://github.com/floccusaddon/floccus/issues/1277
Which version of floccus are you using?
4.17.1
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.
Firefox 106.0.1
Which version of Nextcloud Bookmarks are you using? (if relevant)
10.5.1
Which version of Nextcloud? (if relevant)
20.0.14
What kind of WebDAV server are you using? (if relevant)
No response
Describe the Bug
When I run a merge sync in the firefox plugin, it shows the error:
However, all of the bookmarks did sync to Nextcloud Bookmarks. I'm not able to verify if any are missing because I have so many bookmarks.
Expected Behavior
I expect the sync to complete without error.
To Reproduce
Install and configure nextcloud and nextcloud bookmarks on the appropriate versions.
Attempt to sync bookmarks via the firefox plugin.
See failure.
Debug log provided
@patrick-motard commented on GitHub (Oct 28, 2022):
I noticed in the bug submission form that it mentioned you can use floccus to redact sensitive information from logs. I'm not sure how to do that. If you have any pointers, let me know, and I can send my redacted logs over to you.
@patrick-motard commented on GitHub (Oct 28, 2022):
I found the ability to export redacted logs in the settings of the firefox addon. I've uploaded them to your nextcloud with todays date.
@marcelklehr commented on GitHub (Oct 31, 2022):
Can you check your Nextcloud logs for errors?
@patrick-motard commented on GitHub (Oct 31, 2022):
Absolutely. Thanks @marcelklehr for the speedy response.
Looking through the logs in Nextcloud, it looks like the culprit might be a 414 status code, indicating the URI is too long. Below is the log entry for it. I've omitted part of the URI in the logs below, however it is an incredibly long URI.
Looking into the Nextcloud logs, I think I've figured out what is going on. I think it presents an opportunity for improvement in either within Floccus, Nextcloud, or both.
The following log entry pointed me to the culprit.
The 414 status code at the end of the log indicates that the URI is too long.
Decoding the URI yields this URI:
Here's a hyperlink.
I deleted that bookmark, re-ran the floccus sync, and it succeeded. A few ideas come to mind in how the user experience can be improved:
Improving error messaging
The error message displayed to the user in Floccus is misleading. "E020: Could not parse server response. Is the bookmarks app installed on your server?" This error would lead the user to believe that Floccus thinks perhaps the bookmark app isn't installed. If the response code is 414, that indicates the opposite. It implies that the bookmark extension is installed, but the bookmark in question is causing issues.
A better handling of a 414 would be something like "The bookmark titled 'foo' has a URI that is too long to be supported"
Anything that helps the user understand that it's an issue with a particular bookmark, and helps inform them to either shorten or delete the bookmark.
Fix the underlying issue
I was looking into the Nextcloud API to understand the contract of the call Floccus is making. It doesn't look like it's possible to query the API for a specific bookmark using anything other than the bookmarks URL. This is odd considering each bookmark in the response has an id.
To get around this limitaiton, perhaps Floccus could use pagination to get all of the bookmarks instead of fetching individual bookmarks?
@marcelklehr commented on GitHub (Nov 3, 2022):
yep, that's a good point. Error handling is always improvable :)
This is not trivial, since the point of the request is to search for existing bookmarks with the same URL. Downloading all bookmarks is not very efficient performance-wise, although, floccus does search the bookmarks list if it happens to have dowloaded it during the course of the sync.
@github-actions[bot] commented on GitHub (Nov 4, 2023):
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.