[GH-ISSUE #1838] Sync fails against webdav: JSON parse error #1232

Closed
opened 2026-02-25 22:39:24 +03:00 by kerem · 8 comments
Owner

Originally created by @tom709 on GitHub (Jan 22, 2025).
Original GitHub issue: https://github.com/floccusaddon/floccus/issues/1838

Which version of floccus are you using?

5.4.2.1

How many bookmarks do you have, roughly?

5000

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

No

Sync method

WebDAV

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

Firefox Linux

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

No response

Which version of Nextcloud? (if relevant)

No response

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

Nginx; config:

server {
listen 80 default_server;
listen 443 ssl default_server;
include snippets/snakeoil.conf;

charset utf-8;

index index.html index.htm index.nginx-debian.html;

root /share;
server_name _;

allow large files

send_timeout 3600;
client_body_timeout 3600;
keepalive_timeout 3600;
lingering_timeout 3600;
client_max_body_size 10G;
[...]
location /webdav/ {
root /var/dav;
dav_methods PUT DELETE MKCOL COPY MOVE;
dav_ext_methods PROPFIND OPTIONS;
create_full_put_path on;
dav_access user:rw group:rw all:rw;
autoindex on;
auth_basic "Administrator’s Area";
auth_basic_user_file /var/dav/htpasswd;
}
}

Describe the Bug

Have been syncing with floccus 5.4.2 for two weeks against the same webdav server; now without changing anything I suddenly get: "JSON.parse: bad control character in string literal at line 1 column 798734 of the JSON data | Last synchronized: 2 hours ago"
Push up once gives the same result, as does moving away the xbel file on the server.
Restarting nginx did not fix it neither.
The xbel file in encrypted, so there is nothing interesting to see in line 1.
I have a second Firefox profile that syncs against a second XBEL file on the same webdav server and that is still working.
The difference between the two files is: the failed one is much bigger and uses nested folder mapping.
Tried to get a log but nothing happens when I press the Logs button in floccus. This problem only occurs in the failed Firefox instance. I am adding the printout from the Firefox extension dev console collected while run one sync attempt.

Expected Behavior

sync sync sync :)

To Reproduce

unknown

Debug log provided

  • I have provided a debug log file
Originally created by @tom709 on GitHub (Jan 22, 2025). Original GitHub issue: https://github.com/floccusaddon/floccus/issues/1838 ### Which version of floccus are you using? 5.4.2.1 ### How many bookmarks do you have, roughly? 5000 ### Are you using other means to sync bookmarks in parallel to floccus? No ### Sync method WebDAV ### Which browser are you using? In case you are using the phone App, specify the Android or iOS version and device please. Firefox Linux ### Which version of Nextcloud Bookmarks are you using? (if relevant) _No response_ ### Which version of Nextcloud? (if relevant) _No response_ ### What kind of WebDAV server are you using? (if relevant) Nginx; config: server { listen 80 default_server; listen 443 ssl default_server; include snippets/snakeoil.conf; charset utf-8; index index.html index.htm index.nginx-debian.html; root /share; server_name _; # allow large files send_timeout 3600; client_body_timeout 3600; keepalive_timeout 3600; lingering_timeout 3600; client_max_body_size 10G; [...] location /webdav/ { root /var/dav; dav_methods PUT DELETE MKCOL COPY MOVE; dav_ext_methods PROPFIND OPTIONS; create_full_put_path on; dav_access user:rw group:rw all:rw; autoindex on; auth_basic "Administrator’s Area"; auth_basic_user_file /var/dav/htpasswd; } } ### Describe the Bug Have been syncing with floccus 5.4.2 for two weeks against the same webdav server; now without changing anything I suddenly get: "JSON.parse: bad control character in string literal at line 1 column 798734 of the JSON data | Last synchronized: 2 hours ago" Push up once gives the same result, as does moving away the xbel file on the server. Restarting nginx did not fix it neither. The xbel file in encrypted, so there is nothing interesting to see in line 1. I have a second Firefox profile that syncs against a second XBEL file on the same webdav server and that is still working. The difference between the two files is: the failed one is much bigger and uses nested folder mapping. Tried to get a log but nothing happens when I press the Logs button in floccus. This problem only occurs in the failed Firefox instance. I am adding the printout from the Firefox extension dev console collected while run one sync attempt. ### Expected Behavior sync sync sync :) ### To Reproduce unknown ### Debug log provided - [x] I have provided a debug log file
kerem 2026-02-25 22:39:24 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@github-actions[bot] commented on GitHub (Jan 22, 2025):

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 I ask that you donate to the project when opening an issue
(or at least once your issue is solved), 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:2607024103 --> @github-actions[bot] commented on GitHub (Jan 22, 2025): 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 I ask that you donate to the project when opening an issue (or at least once your issue is solved), 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

@tom709 commented on GitHub (Jan 22, 2025):

log.txt

<!-- gh-comment-id:2607366368 --> @tom709 commented on GitHub (Jan 22, 2025): [log.txt](https://github.com/user-attachments/files/18506684/log.txt)
Author
Owner

@marcelklehr commented on GitHub (Jan 22, 2025):

Hey @tom709
The encrypted xbel file has the following format: JSON {ciphertext: string, salt: string}
So the JSON error is from the JSON structure that holds the ciphertext. Could you perhaps send me the encrypted file via email? I won't try (and will not be able) to decrypt it :) My address is mklehr@gmx.net

<!-- gh-comment-id:2607413758 --> @marcelklehr commented on GitHub (Jan 22, 2025): Hey @tom709 The encrypted xbel file has the following format: JSON {ciphertext: string, salt: string} So the JSON error is from the JSON structure that holds the ciphertext. Could you perhaps send me the encrypted file via email? I won't try (and will not be able) to decrypt it :) My address is mklehr@gmx.net
Author
Owner

@tom709 commented on GitHub (Jan 23, 2025):

I am afraid the original xbel file has been overwritten. I uninstalled/reinstalled the floccus extension in Firefox and restored its configuration. After that, sync worked again against the original xbel file, the one that you suspect was corrupted. But I do not think that was the case. I rather believe the internal state of the extension in Firefox was corrupt. But it is impossible to prove that now.
Why I think the file was not corrupted is this: I had previously renamed the xbel file on the server so that it was basically hidden, then I clicked "Push up once" in floccus, and even then, I got the described error message. After that I renamed the xbel file to the original name again, and a normal sync succeeded after reinstalling the extension in Firefox. Before and after it was the exact same floccus version 5.4.2.1.

<!-- gh-comment-id:2609351263 --> @tom709 commented on GitHub (Jan 23, 2025): I am afraid the original xbel file has been overwritten. I uninstalled/reinstalled the floccus extension in Firefox and restored its configuration. After that, sync worked again against the original xbel file, the one that you suspect was corrupted. But I do not think that was the case. I rather believe the internal state of the extension in Firefox was corrupt. But it is impossible to prove that now. Why I think the file was not corrupted is this: I had previously renamed the xbel file on the server so that it was basically hidden, then I clicked "Push up once" in floccus, and even then, I got the described error message. After that I renamed the xbel file to the original name again, and a normal sync succeeded after reinstalling the extension in Firefox. Before and after it was the exact same floccus version 5.4.2.1.
Author
Owner

@marcelklehr commented on GitHub (Jan 23, 2025):

I see. It could also be that the JSON error is coming from deserializing the accounts state from the local extension storage. I'm at a loss to explain why that would happen though. Perhaps your PC crashed while the value was being written

<!-- gh-comment-id:2609733077 --> @marcelklehr commented on GitHub (Jan 23, 2025): I see. It could also be that the JSON error is coming from deserializing the accounts state from the local extension storage. I'm at a loss to explain why that would happen though. Perhaps your PC crashed while the value was being written
Author
Owner

@marcelklehr commented on GitHub (Jan 23, 2025):

I've now changed the code to not die when the value cannot be parsed. This should prevent having to reinstall the extension. Thank you for reporting this! 💙

<!-- gh-comment-id:2609735395 --> @marcelklehr commented on GitHub (Jan 23, 2025): I've now changed the code to not die when the value cannot be parsed. This should prevent having to reinstall the extension. Thank you for reporting this! 💙
Author
Owner

@tom709 commented on GitHub (Jan 24, 2025):

Thank you for giving the world this really useful extension!

<!-- gh-comment-id:2612859285 --> @tom709 commented on GitHub (Jan 24, 2025): Thank **you** for giving the world this really useful extension!
Author
Owner

@github-actions[bot] commented on GitHub (Jan 25, 2026):

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.

<!-- gh-comment-id:3795761990 --> @github-actions[bot] commented on GitHub (Jan 25, 2026): 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.
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#1232
No description provided.