Skip to content

The persistent listener "crashes" once every 5 minutes. #206

@YamatoRyou

Description

@YamatoRyou

I tried using the following command to start listening to an account's messages in all joined rooms (these rooms are unencrypted), but the command only lasted a 5 minutes before crashing due to an error. If this command is automatically rerun after a crash, it will crash periodically every 5 minutes.
The app and Synapse are running in Docker, and the target account does not go through the login and authentication process in the app; instead, an access token for the account is generated from MAS and passed to the app. The credentials file uses a LAN IP address (with http://) pointing to the Synapse instance.

Command:

--debug --debug --verbose --verbose --store /data/store --credentials /data/credentials.json --listen forever --room-invites list+join

Error Log (I'm not sure if this entry is related to crashes):

nio.responses: Error validating response: 'one_time_key_counts' is a required property

The above information only appeared during the first run (when the database for the corresponding account is first created), at a frequency of every few seconds. It did not appear in subsequent runs.

DEBUG: matrix-commander: Here is the traceback.
Traceback (most recent call last):
  File "/usr/local/lib64/python3.11/site-packages/aiohttp/client_reqrep.py", line 1036, in start
    message, payload = await protocol.read()  # type: ignore[union-attr]
                       ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib64/python3.11/site-packages/aiohttp/streams.py", line 667, in read
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/app/matrix_commander/matrix_commander.py", line 4496, in action_listen
    await listen_forever(gs.client)
  File "/app/matrix_commander/matrix_commander.py", line 4044, in listen_forever
    await client.sync_forever(timeout=30000, full_state=True)
  File "/usr/local/lib/python3.11/site-packages/nio/client/base_client.py", line 116, in wrapper
    return await func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/nio/client/async_client.py", line 1388, in sync_forever
    await self.run_response_callbacks([await response])
                                       ^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/asyncio/tasks.py", line 615, in _wait_for_one
    return f.result()  # May raise f.exception().
           ^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/nio/client/base_client.py", line 116, in wrapper
    return await func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/nio/client/async_client.py", line 1232, in sync
    response = await self._send(
               ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/nio/client/async_client.py", line 834, in _send
    transport_resp = await self.send(
                     ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/nio/client/async_client.py", line 307, in wrapper
    return await func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/nio/client/async_client.py", line 912, in send
    return await self.client_session.request(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib64/python3.11/site-packages/aiohttp/client.py", line 728, in _request
    await resp.start(conn)
  File "/usr/local/lib64/python3.11/site-packages/aiohttp/client_reqrep.py", line 1031, in start
    with self._timer:
  File "/usr/local/lib64/python3.11/site-packages/aiohttp/helpers.py", line 671, in __exit__
    raise asyncio.TimeoutError from exc_val
TimeoutError

The above log was the last one given before the crash.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions