I was un-paired for about 24hours, on re-pair, all MUC history came through, which is nice, but I basically received all history from all MUCs, not just the requested range. This lead to various "failed to download media" in the logs (http 403 and 410), duplicates in gajim and also:
ERROR:slidge.group.room:Could not backfill: Multiple rows were found when exactly one was required
Traceback (most recent call last):
File "/venv/lib/python3.11/site-packages/slidge/group/room.py", line 273, in __fill_history
before, after = self.archive.get_hole_bounds()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/slidge/group/archive.py", line 91, in get_hole_bounds
least_recent_live = self.__store.get_least_recent_with_legacy_id_after(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/slidge/db/store.py", line 655, in get_least_recent_with_legacy_id_after
.scalar()
^^^^^^^^
File "/venv/lib/python3.11/site-packages/sqlalchemy/orm/query.py", line 2805, in scalar
ret = self.one()
^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/sqlalchemy/orm/query.py", line 2778, in one
return self._iter().one() # type: ignore
^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/sqlalchemy/engine/result.py", line 1520, in one
return self._only_one_row(
^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/sqlalchemy/engine/result.py", line 805, in _only_one_row
raise exc.MultipleResultsFound(
sqlalchemy.exc.MultipleResultsFound: Multiple rows were found when exactly one was required
(which should probably be handled better by slidge core)
Do you have logs on what kind of history event was triggered here? AFAIR WhatsApp will send catch-up history (with
HistorySync_RECENT
events) without a way to configure this (though we could ignore the events entirely), much like it does on the official apps. I wonder what the 403 and 410 errors are about as well.
I think I messed it up, I used
before
when I should have usedafter
… maybe?
nicoco referenced this ticket in commit 3780b8c.
Is this closable?
No, it just happened again for me. I think I identified one part of the issue in slidge core: when you're "logged out" as it happens before re-pairing, slidge considers you're still joined in all groups, instead you should be kicked. I'll fix that but even with that, I still think too much history is requested, and I also think that an "history message" flag would be useful, although not everything is crystal clear in my mind about this, LOL. Anyway, let's keep this open!
Slidge is moving away from sourcehut. For updates on this issue, visit codeberg.
nicoco referenced this ticket in commit d125a92.