This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Failing to sync: attr._funcs.evolve() argument after ** must be a mapping, not RoomStreamToken #9936
Closed
Description
Seeing these errors on latest develop (merged with #9379 -- so far that branch has worked consistently).
2021-05-06 10:37:24,144 - synapse.http.server - 93 - ERROR - GET-282- Failed handle request via 'SyncRestServlet': <XForwardedForRequest at 0x7fa7e5691910 method='GET' uri='/_matrix/client/r0/sync?filter=183&timeout=0&since=s45567119_293425298_1_29910218_595864_1764_1018470_21679023_52' clientproto='HTTP/1.0' site=8018>
Traceback (most recent call last):
File "/opt/synapse/lib/python3.9/site-packages/twisted/internet/defer.py", line 1445, in _inlineCallbacks
result = current_context.run(g.send, result)
StopIteration: ([<FrozenEventV3 event_id='$b1vB74hFd4li3crjazdhqyhysvEk6sr_dB85hCuWzK4', type='m.room.member', state_key='@freenode_Kryptron_:matrix.org'>, <FrozenEventV3 event_id='$4fSNY9DWOo8XOOR1TrLbev_S4OWjXFGGtkYlbFs9GWs', type='m.room.member', state_key='@greatudini:matrix.org'>, <FrozenEventV3 event_id='$XXjQ2trh4wxhW7BQ15UsTtgNRerkrSw5A7OTWM4OVTY', type='m.room.message', state_key=None>, <FrozenEventV3 event_id='$1ci12KD7g0aQowO7a7NbUM8ixYNt_NunMELTBUvau_k', type='m.room.message', state_key=None>, <FrozenEventV3 event_id='$Ux9DERofhO04Smj3PcVDAPw6w7s5ihNS0xrm1qpVY3w', type='m.room.message', state_key=None>, <FrozenEventV3 event_id='$bpVth3vcA6IMHZS2GnoVxhCMywgld9I-G0sIOsHIJdc', type='m.room.message', state_key=None>], RoomStreamToken(topological=None, stream=45567154, instance_map={}))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/synapse/lib/python3.9/site-packages/twisted/internet/defer.py", line 1445, in _inlineCallbacks
result = current_context.run(g.send, result)
File "/opt/synapse/lib/python3.9/site-packages/synapse/handlers/sync.py", line 321, in _wait_for_sync_for_user
result = await self.current_sync_for_user(
File "/opt/synapse/lib/python3.9/site-packages/synapse/handlers/sync.py", line 354, in current_sync_for_user
sync_result = await self.generate_sync_result(
File "/opt/synapse/lib/python3.9/site-packages/synapse/handlers/sync.py", line 1020, in generate_sync_result
res = await self._generate_sync_entry_for_rooms(
File "/opt/synapse/lib/python3.9/site-packages/synapse/handlers/sync.py", line 1441, in _generate_sync_entry_for_rooms
room_changes = await self._get_rooms_changed(
File "/opt/synapse/lib/python3.9/site-packages/synapse/handlers/sync.py", line 1709, in _get_rooms_changed
prev_batch_token = now_token.copy_and_replace("room_key", start_key)
File "/opt/synapse/lib/python3.9/site-packages/synapse/types.py", line 657, in copy_and_replace
return attr.evolve(self, **{key: new_value})
File "/opt/synapse/lib/python3.9/site-packages/attr/_funcs.py", line 347, in evolve
changes[init_name] = evolve(value, **changes[init_name])
TypeError: attr._funcs.evolve() argument after ** must be a mapping, not RoomStreamToken
Looks like it could be related to #9919 ? See Erik's comment