element-hq / element-hq/element-web

Sync recovery loop failed to handle successful /sync request and contiunued trying to request the same ?since value

Open
#16,505 6 comments 0 reactions 0 assignees View on GitHub
T-Defect
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

I noticed that my client was failing to sync (which is fairly typical after a homeserver restart) but looking at the network log something struck me as unusual:

![image](https://user-images.githubusercontent.com/2072976/108643475-a9f71b80-74a2-11eb-82e4-6f14c35095fa.png)

It's my understanding that once Element has got a successful sync back, it will persist the data and immediately retry with the new since provided in the response. The network log suggests element tried for a bit with the same sync token, which meant Synapse had to generate a completely fresh response several times.

I looked at the response format of the first successful response, and the since token in the response is `s44114914_293425298_135_27463679_540759_1696_968250_19575942_52`, which means that Synapse IS providing the correct since token.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the failed sync after a homeserver restart and inspect the network log around the first successful /sync response. Trace how the returned since token is persisted and reused; done means a successful response immediately leads to a request using its new token rather than repeating the previous value.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.