-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Can't log in (initial sync fails HTTP 500) #7349
Comments
Follow-up: |
Hey there, could you give me some info to figure out what happened here? More specifically:
|
Note: the other json in the table (checked some random ones) seems alright (normal, human readable json).
however, the broken event itself was redacted
|
Duh, yes, I mistyped the last request, sorry about that and thanks for correcting it. So it looks like the column has the right type, and that it's #4475, though this bug should have been fixed #6185 (which included a database update that should have applied to this event), so I'm a bit puzzled here. Trying to figure out what happened, do you remember migrating your homeserver's database from SQLite to PostgreSQL after this redaction was sent (Oct 6)? |
Indeed, this database was migrated this year. I had to purge the psql 1-2 times after running into space issues, and ended up mounting the sqlite through network. In the end it seemingly succeeded.
|
Right, I think there was an issue with the migration script a few months ago, that might have explained it? Anyway, I believe this might just be a one-off issue which might not require a fix on Synapse's codebase. You can make Synapse look for other events that might have that issue by running: INSERT INTO background_updates (update_name, progress_json)
VALUES ('event_fix_redactions_bytes', '{}'); in psql and restarting Synapse. |
Thanks for looking into this, running the background update now. |
Description
A user of my homeserver has this issue:
after logging in from a new device, riot-desktop and riot-web are "Unable to connect to Homeserver. Retrying..." , and if cancelled "Unexpected error resolving homeserver configuration".
From my understanding, the initial sync of this user may contain malformed json, which leads to the initial sync failing. The user can still access the account from another device that have been logged in for a long time.
Steps to reproduce
Specifically, synapse runs behind an nginx reverse proxy.
Error as seen from nginx:
And from synapse homesever.log:
Logs
Specifically, the dict dumped after StopIteration contains several events with a
'json'
field each.I manually confirmed all these json strings as valid using a validator, except one which is not a "clear text" json string, but instead a hex-encoded string in the manner of
'\\xMANYHEXCHARS'
. Trying to load this hex with simplejson crashes it, however decoding it returns what seems to be valid json.Related line from the source:
https://github.com/matrix-org/synapse/blob/master/synapse/storage/data_stores/main/events_worker.py#L577
Version information
The text was updated successfully, but these errors were encountered: