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

Syncing failed with E019: HTTP status 400. Failed PUT request. #1804

Open
1 task done
ImintA2 opened this issue Dec 19, 2024 · 20 comments
Open
1 task done

Syncing failed with E019: HTTP status 400. Failed PUT request. #1804

ImintA2 opened this issue Dec 19, 2024 · 20 comments

Comments

@ImintA2
Copy link

ImintA2 commented Dec 19, 2024

Which version of floccus are you using?

5.4.0

How many bookmarks do you have, roughly?

2k

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.

Catsxp 4.11.3

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

15.0.4

Which version of Nextcloud? (if relevant)

30.0.4

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

No response

Describe the Bug

I started encountering this error randomly a few days ago, without changing any settings manually other than leaving everything on auto-update.

When the error occurs, I have to delete the bookmarks causing the issue (on the Nextcloud server) to get syncing to work again. However, tracking down the problematic bookmarks is often difficult, so I usually end up deleting all of them and starting over. Unfortunately, this solution only works for a few syncs before the same error reappears.

Logs:
floccus-5.4.0-2024-12-19-redacted.log

What server configurations or additional logs should I check to help diagnose this issue?

Expected Behavior

Sync should complete without error.

To Reproduce

Reproducing the issue is challenging because it occurs randomly after some time.
I have a large number of duplicate bookmarks, which result from syncing tabs and bookmarks across multiple PCs—if that information is relevant.

Debug log provided

  • I have provided a debug log file
@ImintA2 ImintA2 added the bug label Dec 19, 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

marcelklehr commented Dec 21, 2024

I believe the offending bookmark seems to have the ID 10698 on the server, you can check it out at https://<yournextclouddomain>/index.php/apps/bookmarks/bookmarks/10698

(It could also be 10794 or 10789, but I hope this helps to narrow it down. In the next release the error message will contain the offending bookmark)

@ImintA2
Copy link
Author

ImintA2 commented Dec 21, 2024

Thanks for the response! The problem is that it seems to be caused by different, random bookmarks every time this happens, and I don't know how to find out why.
I think I'm going to do a clean reinstall of Nextcloud Bookmarks app to see if that helps. Maybe the database was corrupted or something.

@marcelklehr
Copy link
Member

I don't think reinstalling will help. You can try clearing the trash bin in the app, sometimes that causes issues.

@marcelklehr
Copy link
Member

Status 400 can be caused by invalid URLs, reaching the upper limit of allowed amount of bookmarks, or it can happen in rare occasions when there is a duplicate somewhere else of the same URL like in the trashbin, that's why the clearing of the trashbin may help.

@ImintA2
Copy link
Author

ImintA2 commented Dec 21, 2024

I've definitely noticed that duplicate bookmarks have a high chance of causing the problem I've encountered. Thanks for the advice!
I'll close the issue for now, as I think it requires more observation, and the root cause might lie with Nextcloud Bookmarks.

@ImintA2 ImintA2 closed this as completed Dec 21, 2024
@marcelklehr
Copy link
Member

No need to close, we can move it to Nextcloud Bookmarks once we know the cause (I'm maintainer of that as well :) )

@marcelklehr marcelklehr reopened this Dec 21, 2024
@github-project-automation github-project-automation bot moved this to Backlog in Floccus Dec 21, 2024
@marcelklehr marcelklehr moved this from Backlog to Triaging in Floccus Dec 21, 2024
@ImintA2
Copy link
Author

ImintA2 commented Dec 21, 2024

I see! I'll let you know if I find anything new that might be helpful then.
(Just to recap: moving the problematic bookmarks to the trash bin and then permanently deleting them helps solve the issue temporarily—until it randomly happens again.)

@marcelklehr
Copy link
Member

If you are not afraid of some debugging, you can try the following:

Firefox

  • Go to about:debugging
  • go to "This firefox"
  • click on Inspect button next to floccus entry
  • go to the network tab in the inspector
  • trigger a sync by clicking on sync now for the account of your choice.
  • check the failing network requests

Chrome

  • Go to chrome://extensions
  • enable Developer mode
  • click on dist/html/background.html button in floccus' entry next to "Inspect views: "
  • go to the network tab in the inspector window
  • trigger a sync by clicking on sync now for the account of your choice
  • check the failing network requests

@ImintA2
Copy link
Author

ImintA2 commented Dec 21, 2024

It's working currently so I can't do it now, but I'll definitely use the chrome devtools the next time it happens.

@ImintA2
Copy link
Author

ImintA2 commented Dec 23, 2024

So the E019: HTTP status 400. Failed PUT request. error happened again. After seeing that I then tried both Push up once and Sync Now and they're giving different errors.

Sync Now:
Log:
floccus-5.4.0-2024-12-23-redacted_sn.log
Devtools:
2024-12-23 20 53 16

Push up once:
Log:
floccus-5.4.0-2024-12-23-redacted_puo.log
Devtools:
2024-12-23 20 54 07

Some more information I've gathered and observed:

  1. I have 2 PC and 3 profiles total:
    First PC: broswer tabs and bookmarks
    Second PC: browser tabs
  2. All my profiles are set to Always upload local changes and undo changes from other browsers. Each profile is syncing to its own unique path.
  3. The issue seems to occur mostly after the second PC syncs its browser tabs, particularly when it contains URLs that are also present in the first PC's browser tabs.
  4. After trashing and deleting the problematic bookmark from Nextcloud (10667 in this case), Sync Now still doesn't work initially—it throws the same error as above. However, using Push Up Once does work. Once Push Up Once successfully completes, Sync Now can finally finish without any errors.

Let me know if you need more information!

@marcelklehr
Copy link
Member

Thank you! Can you scroll up for the first error to reveal the stack trace? The second error is exactly what I had suspected.

@ImintA2
Copy link
Author

ImintA2 commented Dec 24, 2024

Oops, I didn’t have it saved, and since it’s currently working properly, I can’t reproduce it right now. I didn’t focus much on the first error because it always occurs alongside the E019 error. If it happens again, I’ll make sure to save the stack trace.

In the meantime, here’s what I’ve observed about the first error:
When the scheduled sync encounters the E019 issue, clicking Push Up Once results in the same E019 error. However, if I click Sync Now, I get a different error: Cannot read properties of undefined (reading 'bookmark').

As mentioned earlier, after resolving the problematic bookmark, I need to click Push Up Once for everything to work properly again. Otherwise, clicking Sync Now continues to result in the Cannot read properties of undefined (reading 'bookmark') error.

@ImintA2
Copy link
Author

ImintA2 commented Dec 26, 2024

I don't see more stack trace to this Cannot read properties of undefined (reading 'bookmark') error, the screenshot I got the last time has already revealed everything (I clicked Sync Now three times so the error repeated three times).
2024-12-27 04 57 40

@marcelklehr
Copy link
Member

Ah, I see, there's no good stack trace :( I can vaguely pinpoint where this might happen, but I don't see why it would happen :/

@marcelklehr
Copy link
Member

The good news is that I believe I have a fi for the actual E019 problem.

@ImintA2
Copy link
Author

ImintA2 commented Dec 27, 2024

Thank you so much!
I’m not too worried about it since the Cannot read properties of undefined (reading 'bookmark') error always appears alongside the E019 issue anyway. So, once the E019 issue is resolved, that error should disappear as well.

@marcelklehr
Copy link
Member

I've published an alpha version for you to try, if you can: https://github.com/floccusaddon/floccus/releases/tag/v5.4.2-alpha.1

@marcelklehr marcelklehr moved this from Triaging to In progress in Floccus Dec 27, 2024
@ImintA2
Copy link
Author

ImintA2 commented Dec 27, 2024

Sure! I'm now running v5.4.2-alpha in dev mode. I'll report back if I encounter any issues.

@marcelklehr
Copy link
Member

Thanks a lot for your cooperation :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In progress
Development

No branches or pull requests

2 participants