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

Sync chain randomly ceases working #35042

Closed
valynor opened this issue Dec 26, 2023 · 72 comments
Closed

Sync chain randomly ceases working #35042

valynor opened this issue Dec 26, 2023 · 72 comments
Assignees
Labels
closed/stale Issue is no longer relevant, perhaps because the feature it refers to has been deprecated. feature/sync

Comments

@valynor
Copy link

valynor commented Dec 26, 2023

Since 1.61 across all kinds of devices (Windows, Android, macOS, iOS, iPadOS) the Sync chain randomly fails and is not updating across devices anymore.

More information from multiple users here:

https://community.brave.com/t/sync-stops-working-randomly-and-cannot-be-restarted-without-new-sync-chain-bookmarks-no-longer-syncing-send-to-device-no-longer-working-reliably-either/521949

This is a major issue IMHO, reliable syncing is very important for a lot of users. Please assign a high priority to this bug.

@rebron rebron added feature/sync needs-investigation A bug not 100% confirmed/fixed labels Dec 27, 2023
@rebron rebron added the priority/P3 The next thing for us to work on. It'll ride the trains. label Dec 27, 2023
@the-overdriven
Copy link

the-overdriven commented Jan 24, 2024

I'm struggling with the same problem. Last time when it happened I've created a new sync ring, but it helped only for a few days because now I've realized it randomly stopped again.
Almost all models show "Backed off message" at brave://sync-internals.
Status from Last Completed Session: Commit Step Result | Protocol error (TRANSIENT_ERROR)

@hamirmahal
Copy link

My devices are also not syncing.

I get a similar message at brave://sync-internals/.

Status from Last Completed Session
Sync Source	GU_TRIGGER
GetKey Step Failed	false
Download Step Result	Success
Commit Step Result	Protocol error (TRANSIENT_ERROR)

@Jorg333
Copy link

Jorg333 commented Jan 25, 2024

Same here.
No sync between pc and android. (TRANSIENT_ERROR)” shows in sync internals.

Repeat the synchronization process fixes the problem (even if only temporarily), doesn't it?"

@ntarox
Copy link

ntarox commented Jan 27, 2024

+1. Same issue here, and didn't realize it immediately because I don't change my bookmarks (and also look immediately to verify that change on all of my other devices) very often. I imagine many, many others are in a similar situation.

@valynor
Copy link
Author

valynor commented Jan 27, 2024

It has been exactly 30 days since my post and the new sync chain I made back then broke again today with

Commit Step Result | Protocol error (TRANSIENT_ERROR)

Took me 15-20 minutes to create a new one on my 5 devices and to verify everything works correctly.
This is really annoying and a major issue for people who rely on it to work.

@Tallyrald
Copy link

Tallyrald commented Jan 29, 2024

Sync stopped working for me somewhere around 2023.12.17 (+- couple days) and is non-functional ever since (2 windows and 1 android device). Really annoying. Sending a tab/link from the URL bar to another device also doesn't work.

@dennzo
Copy link

dennzo commented Jan 30, 2024

I've been facing the same issue. In recent months, there was a delay, but it usually synced up after a few hours. However, for the past few weeks, there's been no synchronization between my devices at all.

In the past, a solution to this problem was leaving and rejoining the chain.
Unfortunately, this time, that didn't resolve the issue.

Currently, Brave is synced across all my devices, including:

  • 2 Windows PCs (Win10 and Win11)
  • 2 Apple MacBooks
  • 1 Linux system
  • 1 iOS (iPhone).

Interestingly, my friends using Brave haven't experienced this problem, but they only have around two devices and fewer than 100 bookmarks.

I acknowledge that my bookmark collection is extensive.
I'm reluctant to switch browsers because I genuinely love Brave, but seamless syncing is a crucial feature for me.

For further analysis, I've attached a screenshot of the Brave sync internals. Maybe this could be a help to someone.

Screenshot 2024-01-30 at 14 01 27

@jonatan-ivanov
Copy link

jonatan-ivanov commented Jan 31, 2024

I have the same issue. Under brave://sync-internals/ I see this:

Throttled or Backoff | true

If I click on any Commit Response in the Sync Protocol Log I see a bunch of errors like this:

{
    "error_message": "There are already 50000 non-deleted objects in store",
    "response_type": "OVER_QUOTA"
}

Despite of this, the Commit Response says: Result: Success and in the response there is also this: "error_code": "SUCCESS".

It seems history is also synced and it pushes the objects to sync easily over the quota.

EDIT: https://community.brave.com/t/bookmark-sync-isnt-working-over-quota/525475/2

Alexey Barabash:
Starting from 1.61 version there was a change so all history visits are synced now; before only visits from url bar were synced. We are working on fix.

@jonatan-ivanov
Copy link

jonatan-ivanov commented Jan 31, 2024

Connected to #35042 (comment), if I create a new chain, it works since the object store is empty again. But I think if you do not disable history sync, it will be full again relatively quickly.

I guess removing history from the remote object store and disabling history sync could also work but I have no idea how to do the former.

I think this also means that 1.61 writes full everyone's object store who use the browser eventually and makes the sync feature broken for them.

@jonatan-ivanov
Copy link

@AlexeyBarabash I'm not familiar with Brave's triaging process but if the above is correct, breaking sync for everyone who actually uses the browser could get higher priority in my opinion.

@Jorg333
Copy link

Jorg333 commented Feb 2, 2024

The problem has fixed itself! I just realized that I have all three devices (2 PCs and a mobile) syncing again, with all the bookmarks in their place.

Thx Brave ;)

@oleg-derevenetz
Copy link

The problem has fixed itself! I just realized that I have all three devices (2 PCs and a mobile) syncing again, with all the bookmarks in their place.

For me, there is still "Protocol error (TRANSIENT_ERROR)".

@p134c0d3
Copy link

p134c0d3 commented Feb 5, 2024

Having this issue right now, added my Linux machine to my sync chain, and only bookmarks were synced. None of my extensions or autofill were synced even though I left the browser open for an hour, had Sync Everything selected. Uninstalled, reinstalled, removed from sync chain, re-added to sync chain, seems to be stuck on "In progress..." in the Sync Node Browser Tab. Clicking Request Start or Trigger Updates does nothing.

@kmfoodservice
Copy link

Same situation here syncing with 2 Windows 11 computers and 2 Android devices. The only thing that works is deleting the sync chain completely and recreating it.

@p134c0d3
Copy link

p134c0d3 commented Feb 8, 2024

Only fix I've found so far is leaving the browser open overnight, so I'm think the sync might just be EXTREMELY delayed...

In the morning, when I checked it out, all autofill and extensions were finally synced.

@Jorg333
Copy link

Jorg333 commented Feb 17, 2024

Again "Protocol error (TRANSIENT_ERROR)"

@martinlanger90
Copy link

same for me

@BenjaminMichaelis
Copy link

BenjaminMichaelis commented Mar 6, 2024

Same error for me "There are already 75000 non-deleted objects in store".

image

it would also give me a http error under "Download Step Result".

For me, turning off "sync everything" and only turning on everything except for history got everything seeming to sync again somewhat, however, I would love to be able to sync history... It also is still inconsistent and hits that limit nonetheless, but did allow it to sync some things on a new browser at least (such as extensions, etc that weren't before)

@martinlanger90
Copy link

martinlanger90 commented Mar 6, 2024

That worked only for one time sync... now again transient error....

@BenjaminMichaelis
Copy link

That worked only for one time sync... now again transient error....

Yeah, 12 hours later and it stopped again... bummer

@petcap
Copy link

petcap commented Mar 11, 2024

Same issue here, this has been an issue for a while, at least 6+ months. The only working solution so far has been to completely remove and create a new sync chain, but the new chain always stops working after a month or two.

Edit: I sync between three Debian machines and two Android phones. I sync everything on all devices.

@mogarchy
Copy link

@AlexeyBarabash Plz help

@jonatan-ivanov
Copy link

Fyi: if history sync is on no matter what you do this issue will come back (unless this will be fixed in Brave), see: #35042 (comment)

As a workaround, you need to disable syncing history and remove objects from your object store. The only way I'm aware to remove objects from your object store is creating a new sync chain (history sync disabled).

@LorenzoVonMatterhom
Copy link

Fyi: if history sync is on no matter what you do this issue will come back (unless this will be fixed in Brave), see: #35042 (comment)

As a workaround, you need to disable syncing history and remove objects from your object store. The only way I'm aware to remove objects from your object store is creating a new sync chain (history sync disabled).

Yes this is the only method that works and you can see it works immediately
Also fixes the "recent tabs" sync some users are not getting, you may want to merge issues

@Saoiray
Copy link

Saoiray commented May 14, 2024

@bsclifton definitely keeping an eye out and passing word here on the good news, hoping this is the solution for recent issues..

I do have one request as you guys are working on all of this. Would it be possible to implement some sort of notification or warning that will appear to users somewhere noticeable that might alert anyone if they are approaching objects limit on any type of sync criteria? Perhaps have it show objects synced vs object limit in the sync menu in Settings and not require people to think to go to sync-internals?

While we hope people won't hit that often, it would be great to have something for times when bookmarks, passwords, or whatever else might be reaching limits. And would want it to advise enough in advance that people can delete or export long before actually hitting limit and sync breaking.

@valynor
Copy link
Author

valynor commented May 14, 2024

Waiting for sync to fix itself definitely did not work here.

  • I just deleted the sync chain again (hey, I'm pretty proficient with that by now ;-)
  • I manually deleted the history from all devices but one
  • I created a new sync chain from the device with the history still enabled

... and NOW it is working again and syncing history, too.

@NicholasYamamoto
Copy link

Just wanted to report that Sync appears to be working still, however I'm still seeing a Protocol error (CONFLICT) when visiting brave://sync-internals/. I'll keep checking it periodically to see if it flips over. Thanks again team!

@nfacha
Copy link

nfacha commented May 14, 2024

Just wanted to report that Sync appears to be working still, however I'm still seeing a Protocol error (CONFLICT) when visiting brave://sync-internals/. I'll keep checking it periodically to see if it flips over. Thanks again team!

Was having this, but left ot there for a while and it fixed itself

@valynor
Copy link
Author

valynor commented May 14, 2024

@bsclifton
I'm sorry to say but the fix is no good.

With the new sync chain that I made just 4 hours ago history syncing stopped working about 2 hours later.
History gets synced to the exact same point on all devices and then just stopped syncing - both ways.

Open tabs still sync within seconds.

brave://sync-internals/ are all green on all devices and show
"Status from Last Completed Session Sync Source | PERIODIC"
but no history gets synced.

There is absolutely no way I ran into the 26k limit either.

Edit: Another 3 hours later .. history sync suddenly decided to start working again. :-|

@bsclifton
Copy link
Member

bsclifton commented May 15, 2024

@valynor thank you for the updates - I think the major problem is that a large amount of folks are hitting the servers at the same time. We're seeing things stabilize over time - it should continue to get better as more people get fixed.

We did push another fix (see brave/go-sync#257 where requests which timeout would not adjust the count. Pushing this fix could have helped 😄

@valynor
Copy link
Author

valynor commented May 15, 2024

History sync is still working for me. I'll update in case that changes again. ;-)

@valynor
Copy link
Author

valynor commented May 15, 2024

@bsclifton

Same thing as yesterday:

  • history sync worked for 2 hours and now it simply stopped at the same point in time across multiple devices
  • "Status from Last Completed Session Sync Source | PERIODIC" / all green / OK on all devices but no new history data gets actually synced "GetUpdates Response Received 0 update(s)."
  • "tabs from other devices" still sync in the usual timeframe (~20 secs)

It's not working reliably.

@bsclifton
Copy link
Member

@valynor history sync aside, how is sync working? Sounds like tabs from other devices is OK... how about the other types?

There is a limit of 26k history items - after that, it won't do new items. So that could very well be what you're running into

@valynor
Copy link
Author

valynor commented May 15, 2024

@bsclifton

It appears everything else syncs fine but I can confidently rule out I ran into the 26k limit.
This is a new sync chain I made yesterday, considering my browsing activity there should be no more than a couple hundred history items at best.

Edit: Just scrolled through the entire history on my mobile - definitely <1000 items.

Edit2: It's now ~9 hours after history sync broke again and it appears it's not coming back by itself.

Edit3: (another hour later) And just like that it started syncing history again. It appears every site I visited on my desktop (I only used the desktop PC today) in the time sync was down is not getting synced over, though.

All considered history syncing is pretty much completely borked for me right now - it was actually better before the fix, at least it worked without issue for 1-2 months until you ran into the quota.

@valynor
Copy link
Author

valynor commented May 23, 2024

Update: since I last complained ;-) a week ago sync has been working flawlessly without any changes on my part.

@gurgunday
Copy link

Hey @bsclifton, thanks a lot for the updates, everything is working now!

Just a quick question, isn't Sync end-to-end encrypted? How does the server know to delete history entries older than 14 days? I guess it's just the metadata that isn't e2e encrypted, right?

Reference:

The server side will delete records that are 14 days or older. However, the quota for folks was not adjusted to reflect this. The Sync history count fix pull request addresses this and should fix a subset of folks. Because this fix is going to free up records, the quota is now lowered from 85k to 60k.

@dnet890
Copy link

dnet890 commented May 24, 2024

@gurgunday So, History sync also worked properly as well?

@bsclifton
Copy link
Member

Just a quick question, isn't Sync end-to-end encrypted? How does the server know to delete history entries older than 14 days? I guess it's just the metadata that isn't e2e encrypted, right?

@gurgunday sorry for the late response - great question.

The entries themselves are client-side encrypted - meaning Brave has no way to see what's inside the object. We can tell what the object type is (ex: is it History? or Bookmark?) and when it was last modified. Being able to see the type and last modified is the only way we can clean these records up.

@bsclifton
Copy link
Member

bsclifton commented Jun 4, 2024

@valynor great to hear! Something we did do, which I failed to update here... was as things smoothed out on the server side (less errors w/ clients, servers getting hit less, etc) we started to increase the limits. We had lower limits and then gradually increased

Kudos to @DJAndries for that work! He can provide more information about that rollout if you have questions

Given the status here, I'm going to close this ticket. However, there are some follow ups we have planned on our side to help make things better. I'll create some new GitHub issues and link them to this issue.

@dnet890
Copy link

dnet890 commented Jun 5, 2024

@bsclifton I deleted the sync chain and recreated it again. But, it does not worked
image

@hamirmahal
Copy link

Are you on the latest version of Brave? What does it say at brave://version/?

@dnet890
Copy link

dnet890 commented Jun 5, 2024

1.65

@dnet890
Copy link

dnet890 commented Jun 5, 2024

it looks like I need to stay off from History sync atm.

@kjozwiak kjozwiak added the closed/stale Issue is no longer relevant, perhaps because the feature it refers to has been deprecated. label Jun 6, 2024
@kjozwiak kjozwiak removed needs-investigation A bug not 100% confirmed/fixed priority/P2 A bad problem. We might uplift this to the next planned release. OS/Desktop labels Jun 6, 2024
@mrnooz
Copy link

mrnooz commented Dec 24, 2024

In 2024, it happened to me three times that my PC lost synchronization on Brave. What could this be caused by?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed/stale Issue is no longer relevant, perhaps because the feature it refers to has been deprecated. feature/sync
Projects
None yet
Development

No branches or pull requests