Skip to content
This repository has been archived by the owner on Mar 2, 2024. It is now read-only.

You are not invited to this room error #314

Open
antoyo opened this issue Jun 26, 2023 · 1 comment
Open

You are not invited to this room error #314

antoyo opened this issue Jun 26, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@antoyo
Copy link

antoyo commented Jun 26, 2023

Hi.
I tried to setup mautrix-facebook bridge and while it seems to partly work, I have an issue where it continuously fetch the same message over and over to backfill the history.
It shows the following traceback in the console:

Traceback (most recent call last):
  File "/home/user/Ordinateur/matrix/mautrix-facebook/lib/python3.11/site-packages/mautrix/appservice/api/intent.py", line 592, in ensure_joined
    await self.join_room(room_id, max_retries=0)
  File "/home/user/Ordinateur/matrix/mautrix-facebook/lib/python3.11/site-packages/mautrix/appservice/api/intent.py", line 128, in wrapper
    return await __method(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/Ordinateur/matrix/mautrix-facebook/lib/python3.11/site-packages/mautrix/client/store_updater.py", line 62, in join_room
    room_id = await super().join_room(
              ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/Ordinateur/matrix/mautrix-facebook/lib/python3.11/site-packages/mautrix/client/api/rooms.py", line 335, in join_room
    content = await self.api.request(
              ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/Ordinateur/matrix/mautrix-facebook/lib/python3.11/site-packages/mautrix/api.py", line 395, in request
    resp_data, resp = await self._send(
                      ^^^^^^^^^^^^^^^^^
  File "/home/user/Ordinateur/matrix/mautrix-facebook/lib/python3.11/site-packages/mautrix/api.py", line 250, in _send
    raise make_request_error(
mautrix.errors.request.MForbidden: You are not invited to this room.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/Ordinateur/matrix/mautrix-facebook/lib/python3.11/site-packages/mautrix/appservice/api/intent.py", line 592, in ensure_joined
    await self.join_room(room_id, max_retries=0)
  File "/home/user/Ordinateur/matrix/mautrix-facebook/lib/python3.11/site-packages/mautrix/appservice/api/intent.py", line 128, in wrapper
    return await __method(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/Ordinateur/matrix/mautrix-facebook/lib/python3.11/site-packages/mautrix/client/store_updater.py", line 62, in join_room
    room_id = await super().join_room(
              ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/Ordinateur/matrix/mautrix-facebook/lib/python3.11/site-packages/mautrix/client/api/rooms.py", line 335, in join_room
    content = await self.api.request(
              ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/Ordinateur/matrix/mautrix-facebook/lib/python3.11/site-packages/mautrix/api.py", line 395, in request
    resp_data, resp = await self._send(
                      ^^^^^^^^^^^^^^^^^
  File "/home/user/Ordinateur/matrix/mautrix-facebook/lib/python3.11/site-packages/mautrix/api.py", line 250, in _send
    raise make_request_error(
mautrix.errors.request.MForbidden: You are not invited to this room.

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

Traceback (most recent call last):
  File "/home/user/Ordinateur/matrix/mautrix-facebook/lib/python3.11/site-packages/mautrix_facebook/user.py", line 593, in run_with_sync_lock
    await func()
  File "/home/user/Ordinateur/matrix/mautrix-facebook/lib/python3.11/site-packages/mautrix_facebook/user.py", line 665, in _sync_recent_threads
    await self._sync_threads_with_delay(
  File "/home/user/Ordinateur/matrix/mautrix-facebook/lib/python3.11/site-packages/mautrix_facebook/user.py", line 730, in _sync_threads_with_delay
    had_new_messages = await self._sync_thread(thread)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/Ordinateur/matrix/mautrix-facebook/lib/python3.11/site-packages/mautrix_facebook/user.py", line 847, in _sync_thread
    ) = await portal.backfill_message_page(
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/Ordinateur/matrix/mautrix-facebook/lib/python3.11/site-packages/mautrix_facebook/portal.py", line 1079, in backfill_message_page
    event_ids = [
                ^
  File "/home/user/Ordinateur/matrix/mautrix-facebook/lib/python3.11/site-packages/mautrix_facebook/portal.py", line 1080, in <listcomp>
    await intent.send_message_event(
  File "/home/user/Ordinateur/matrix/mautrix-facebook/lib/python3.11/site-packages/mautrix/appservice/api/intent.py", line 141, in wrapper
    await __self.ensure_joined(room_id)
  File "/home/user/Ordinateur/matrix/mautrix-facebook/lib/python3.11/site-packages/mautrix/appservice/api/intent.py", line 598, in ensure_joined
    await bot.invite_user(room_id, self.mxid)
  File "/home/user/Ordinateur/matrix/mautrix-facebook/lib/python3.11/site-packages/mautrix/appservice/api/intent.py", line 141, in wrapper
    await __self.ensure_joined(room_id)
  File "/home/user/Ordinateur/matrix/mautrix-facebook/lib/python3.11/site-packages/mautrix/appservice/api/intent.py", line 596, in ensure_joined
    raise IntentError(f"Failed to join room {room_id} as {self.mxid}") from e
mautrix.errors.base.IntentError: Failed to join room !TFbOAkiWhrbUcTshqT:localhost:7077 as @facebookbot:localhost:7077

Thanks to fix this issue.

@fnordsh
Copy link

fnordsh commented Feb 5, 2024

I'm having the same issue - any news on this?
Since it's so quiet here, I suspect not everyone has this problem - is there a workaround, or a configuration option I should change to fix the problem?

EDIT: I found a workaround: enable encryption in the room. (set allow: true and default: true)
This causes the bot to be automatically invited and the error does not occur anymore.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants