Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bridge stuck - user not able to read event #951

Open
pm-McFly opened this issue Jan 5, 2024 · 1 comment
Open

Bridge stuck - user not able to read event #951

pm-McFly opened this issue Jan 5, 2024 · 1 comment

Comments

@pm-McFly
Copy link

pm-McFly commented Jan 5, 2024

After few days of proper working my bridge got stuck in a weird situation.

Messages are apparently bridged correctly (both ways) although when I send a command to the bot, I am not able to read the return. In the log these appear:

matrix-mautrix-telegram[2587421]: [2024-01-05 21:05:48,650] [[email protected].@user:domain.tld] Error updating read status and tags for 1336706880
matrix-mautrix-telegram[2587421]: Traceback (most recent call last):
matrix-mautrix-telegram[2587421]:   File "/usr/lib/python3.11/site-packages/mautrix_telegram/user.py", line 870, in post_sync_dialog
matrix-mautrix-telegram[2587421]:     await puppet.intent.mark_read(last_read.mx_room, last_read.mxid)
matrix-mautrix-telegram[2587421]:   File "/usr/lib/python3.11/site-packages/mautrix/appservice/api/intent.py", line 491, in mark_read
matrix-mautrix-telegram[2587421]:     await self.set_fully_read_marker(
matrix-mautrix-telegram[2587421]:   File "/usr/lib/python3.11/site-packages/mautrix/appservice/api/intent.py", line 128, in wrapper
matrix-mautrix-telegram[2587421]:     return await __method(*args, **kwargs)
matrix-mautrix-telegram[2587421]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
matrix-mautrix-telegram[2587421]:   File "/usr/lib/python3.11/site-packages/mautrix/client/api/modules/misc.py", line 113, in set_fully_read_marker
matrix-mautrix-telegram[2587421]:     await self.api.request(Method.POST, Path.v3.rooms[room_id].read_markers, content)
matrix-mautrix-telegram[2587421]:   File "/usr/lib/python3.11/site-packages/mautrix/api.py", line 415, in request
matrix-mautrix-telegram[2587421]:     resp_data, resp = await self._send(
matrix-mautrix-telegram[2587421]:                       ^^^^^^^^^^^^^^^^^
matrix-mautrix-telegram[2587421]:   File "/usr/lib/python3.11/site-packages/mautrix/api.py", line 265, in _send
matrix-mautrix-telegram[2587421]:     raise make_request_error(
matrix-mautrix-telegram[2587421]: mautrix.errors.request.MForbidden: You don't have permission to access that event.
matrix-mautrix-telegram[2587421]: [2024-01-05 21:05:48,675] [[email protected].@user:domain.tld] Error updating read status and tags for 1176827940
matrix-mautrix-telegram[2587421]: Traceback (most recent call last):
matrix-mautrix-telegram[2587421]:   File "/usr/lib/python3.11/site-packages/mautrix_telegram/user.py", line 870, in post_sync_dialog
matrix-mautrix-telegram[2587421]:     await puppet.intent.mark_read(last_read.mx_room, last_read.mxid)
matrix-mautrix-telegram[2587421]:   File "/usr/lib/python3.11/site-packages/mautrix/appservice/api/intent.py", line 491, in mark_read
matrix-mautrix-telegram[2587421]:     await self.set_fully_read_marker(
matrix-mautrix-telegram[2587421]:   File "/usr/lib/python3.11/site-packages/mautrix/appservice/api/intent.py", line 128, in wrapper
matrix-mautrix-telegram[2587421]:     return await __method(*args, **kwargs)
matrix-mautrix-telegram[2587421]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
matrix-mautrix-telegram[2587421]:   File "/usr/lib/python3.11/site-packages/mautrix/client/api/modules/misc.py", line 113, in set_fully_read_marker
matrix-mautrix-telegram[2587421]:     await self.api.request(Method.POST, Path.v3.rooms[room_id].read_markers, content)
matrix-mautrix-telegram[2587421]:   File "/usr/lib/python3.11/site-packages/mautrix/api.py", line 415, in request
matrix-mautrix-telegram[2587421]:     resp_data, resp = await self._send(
matrix-mautrix-telegram[2587421]:                       ^^^^^^^^^^^^^^^^^
matrix-mautrix-telegram[2587421]:   File "/usr/lib/python3.11/site-packages/mautrix/api.py", line 265, in _send
matrix-mautrix-telegram[2587421]:     raise make_request_error(
matrix-mautrix-telegram[2587421]: mautrix.errors.request.MForbidden: You don't have permission to access that event.
matrix-mautrix-telegram[2587421]: [2024-01-05 21:05:48,939] [[email protected].@user:domain.tld] Error updating read status and tags for 1313667959
matrix-mautrix-telegram[2587421]: Traceback (most recent call last):
matrix-mautrix-telegram[2587421]:   File "/usr/lib/python3.11/site-packages/mautrix_telegram/user.py", line 870, in post_sync_dialog
matrix-mautrix-telegram[2587421]:     await puppet.intent.mark_read(last_read.mx_room, last_read.mxid)
matrix-mautrix-telegram[2587421]:   File "/usr/lib/python3.11/site-packages/mautrix/appservice/api/intent.py", line 491, in mark_read
matrix-mautrix-telegram[2587421]:     await self.set_fully_read_marker(
matrix-mautrix-telegram[2587421]:   File "/usr/lib/python3.11/site-packages/mautrix/appservice/api/intent.py", line 128, in wrapper
matrix-mautrix-telegram[2587421]:     return await __method(*args, **kwargs)
matrix-mautrix-telegram[2587421]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
matrix-mautrix-telegram[2587421]:   File "/usr/lib/python3.11/site-packages/mautrix/client/api/modules/misc.py", line 113, in set_fully_read_marker
matrix-mautrix-telegram[2587421]:     await self.api.request(Method.POST, Path.v3.rooms[room_id].read_markers, content)
matrix-mautrix-telegram[2587421]:   File "/usr/lib/python3.11/site-packages/mautrix/api.py", line 415, in request
matrix-mautrix-telegram[2587421]:     resp_data, resp = await self._send(
matrix-mautrix-telegram[2587421]:                       ^^^^^^^^^^^^^^^^^
matrix-mautrix-telegram[2587421]:   File "/usr/lib/python3.11/site-packages/mautrix/api.py", line 265, in _send
matrix-mautrix-telegram[2587421]:     raise make_request_error(
matrix-mautrix-telegram[2587421]: mautrix.errors.request.MForbidden: You don't have permission to access that event.

In a multi bridged/relayed room I can see that the return of the !tg is relayed via the other bridge's bot. But my user is unable to see it.

@mborho-innio
Copy link

Same problem here, started without any obvious change in the setup.

But I saw other errors, which can probably be related to this issue:

[[email protected]] Failed to create missing outbound sessions
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/mautrix/bridge/e2ee.py", line 209, in encrypt
    encrypted = await self.crypto.encrypt_megolm_event(room_id, event_type, content)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/mautrix/crypto/encrypt_megolm.py", line 84, in encrypt_megolm_event
    return await self._encrypt_megolm_event(room_id, event_type, content)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/mautrix/crypto/encrypt_megolm.py", line 93, in _encrypt_megolm_event
    ciphertext = session.encrypt(
                 ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/mautrix/crypto/sessions.py", line 263, in encrypt
    raise EncryptionError("Group session has expired")
mautrix.errors.crypto.EncryptionError: Group session has expired
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/mautrix/crypto/encrypt_megolm.py", line 210, in _share_group_session
    await self._create_outbound_sessions(missing_sessions)
  File "/usr/lib/python3.11/site-packages/mautrix/crypto/encrypt_olm.py", line 57, in _create_outbound_sessions
    return await self._create_outbound_sessions_locked(users, _force_recreate_session)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/mautrix/crypto/encrypt_olm.py", line 101, in _create_outbound_sessions_locked
    raise Exception(
Exception: Key claim response didn't contain key for queried device ('@user:example.com', 'WSIDDKUWBO')

Restarting the bridge doesn't help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants