-
Notifications
You must be signed in to change notification settings - Fork 204
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
auto_join_rooms
breaks after changing
#16878
Comments
We are running into the same issue. |
We are running in the same issue. We can not reproduce the third case. If we create the room prior to the registration and set the room options and permissions correctly, newly added users are joined to that room. |
The documentation for the option says:
So the As for
this is weird. Are you sure the new room is publicly joinable etc? Unfortunately the logging is pretty rubbish here (remedied in #17176) |
…uto_join_rooms` option. (element-hq#17176) Would have been useful for tracking down element-hq#16878. Signed-off-by: Olivier 'reivilibre <oliverw@matrix.org>
…uto_join_rooms` option. (element-hq#17176) Would have been useful for tracking down element-hq#16878. Signed-off-by: Olivier 'reivilibre <oliverw@matrix.org>
@kieranlane in the case where you create a room manually, is it a public or a private room? For private rooms you need to specify the local part of the user that is used to invite new users to any auto-join rooms. See |
I am also running into this on Synapse The test below is running in Podman locally on my Fedora 40 workstation using the image
# Configuration file for Synapse.
#
# This is a YAML file: see [1] for a quick introduction. Note in particular
# that *indentation is important*: all the elements of a list or dictionary
# should have the same indentation.
#
# [1] https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html
#
# For more information on how to configure Synapse, including a complete accounting of
# each option, go to docs/usage/configuration/config_documentation.md or
# https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html
server_name: "localhost:8448"
pid_file: /data/homeserver.pid
listeners:
- port: 8448
tls: false
type: http
x_forwarded: true
resources:
- names: [client, federation]
compress: false
bind_addresses:
- 0.0.0.0
database:
name: psycopg2
args:
database: synapse
user: synapse
password: password
host: postgres
cp_min: 5
cp_max: 10
log_config: "/data/localhost:8448.log.config"
media_store_path: /data/media_store
registration_shared_secret: "wbgKrqSFFRp#9yN8wblZunUPOJISqUq-F&K;Ue8Ak44ZXa80vq"
report_stats: false
macaroon_secret_key: "wZ=.rSIz#5Z7D+W-m-*JeZV&GtqyDtw4Zl79.wcrhbIY45aI-z"
form_secret: "MylO_ICdt1WldF4XoZken@kDlb4Av89w~4GXr35^V~RiFf-iQB"
signing_key_path: "/data/localhost:8448.signing.key"
trusted_key_servers:
- server_name: "matrix.org"
accept_keys_insecurely: true
# vim:ft=yaml
suppress_key_server_warning: true
enable_registration: true
enable_registration_without_verification: true
presence:
enabled: false
user_directory:
enabled: true
search_all_users: true
prefer_local_users: true
auto_join_rooms:
- "#auto-join-room:localhost:8448"
- "#test01:localhost:8448"
autocreate_auto_join_rooms: true
auto_join_mxid_localpart: adminbot
Note that the adminbot user on my local test environment is just a normal Synapse user, I am not running the Element AdminBot locally. However I see the exact same behavior on my ESS lab where I am trying to use the AdminBot to invite users to rooms.
Full room state for [
{
"type": "m.room.create",
"room_id": "!cEDYxlMhpnXRGcZELg:localhost:8448",
"sender": "@admin:localhost:8448",
"content": {
"room_version": "10",
"creator": "@admin:localhost:8448"
},
"state_key": "",
"origin_server_ts": 1723824702825,
"unsigned": {
"age": 1034564
},
"event_id": "$LkLP8qY3Lpx4ji7O6Wv03kfJUpqG7WOaaa4f9CymWXg",
"user_id": "@admin:localhost:8448",
"age": 1034564
},
{
"type": "m.room.member",
"room_id": "!cEDYxlMhpnXRGcZELg:localhost:8448",
"sender": "@admin:localhost:8448",
"content": {
"displayname": "admin",
"membership": "join"
},
"state_key": "@admin:localhost:8448",
"origin_server_ts": 1723824702865,
"unsigned": {
"age": 1034524
},
"event_id": "$LpzQIDO8XdZvFChQb4d0AvyFVypozHTjAmPZVz6Oq7E",
"user_id": "@admin:localhost:8448",
"age": 1034524
},
{
"type": "m.room.guest_access",
"room_id": "!cEDYxlMhpnXRGcZELg:localhost:8448",
"sender": "@admin:localhost:8448",
"content": {
"guest_access": "can_join"
},
"state_key": "",
"origin_server_ts": 1723824702898,
"unsigned": {
"age": 1034491
},
"event_id": "$-eUfh_0sLSXoxMoH8eh3stM1YiJ_04vYYXnYUNXefP8",
"user_id": "@admin:localhost:8448",
"age": 1034491
},
{
"type": "m.room.history_visibility",
"room_id": "!cEDYxlMhpnXRGcZELg:localhost:8448",
"sender": "@admin:localhost:8448",
"content": {
"history_visibility": "shared"
},
"state_key": "",
"origin_server_ts": 1723824702898,
"unsigned": {
"age": 1034491
},
"event_id": "$jCkHev4M7eLws57JKWdJTxhLebQ2nPcripexYLqF-TU",
"user_id": "@admin:localhost:8448",
"age": 1034491
},
{
"type": "m.room.join_rules",
"room_id": "!cEDYxlMhpnXRGcZELg:localhost:8448",
"sender": "@admin:localhost:8448",
"content": {
"join_rule": "invite"
},
"state_key": "",
"origin_server_ts": 1723824702897,
"unsigned": {
"age": 1034492
},
"event_id": "$w7DUkGXlQEWgNVb1NUuH2OeInrWWqU2jWGFbS_wAqV0",
"user_id": "@admin:localhost:8448",
"age": 1034492
},
{
"type": "m.room.name",
"room_id": "!cEDYxlMhpnXRGcZELg:localhost:8448",
"sender": "@admin:localhost:8448",
"content": {
"name": "test01"
},
"state_key": "",
"origin_server_ts": 1723824702898,
"unsigned": {
"age": 1034491
},
"event_id": "$IDlgGmkSUuO0BI_36_ySqwl0J-HxTqqilTWFP4sCHLs",
"user_id": "@admin:localhost:8448",
"age": 1034491
},
{
"type": "m.room.canonical_alias",
"room_id": "!cEDYxlMhpnXRGcZELg:localhost:8448",
"sender": "@admin:localhost:8448",
"content": {
"alt_aliases": [],
"alias": "#test01:localhost:8448"
},
"state_key": "",
"origin_server_ts": 1723824711189,
"unsigned": {
"age": 1026200
},
"event_id": "$WbgEgWRnbN3nnINcsjYdTAZSNSuQMcDoTEEQe2NYWfY",
"user_id": "@admin:localhost:8448",
"age": 1026200
},
{
"type": "m.room.member",
"room_id": "!cEDYxlMhpnXRGcZELg:localhost:8448",
"sender": "@adminbot:localhost:8448",
"content": {
"displayname": "adminbot",
"membership": "join"
},
"state_key": "@adminbot:localhost:8448",
"origin_server_ts": 1723825008304,
"unsigned": {
"replaces_state": "$93wRkKlE2lXv98J1WJ1mhNCpeeEWswdZEjd-fk00mhE",
"prev_content": {
"displayname": "adminbot",
"membership": "invite"
},
"prev_sender": "@admin:localhost:8448",
"age": 729085
},
"event_id": "$wvhQz2vAtQ1TEnFOMGHUcYsOy_SM43aeUNxtVxjUoHc",
"user_id": "@adminbot:localhost:8448",
"age": 729085,
"replaces_state": "$93wRkKlE2lXv98J1WJ1mhNCpeeEWswdZEjd-fk00mhE",
"prev_content": {
"displayname": "adminbot",
"membership": "invite"
}
},
{
"type": "m.room.power_levels",
"room_id": "!cEDYxlMhpnXRGcZELg:localhost:8448",
"sender": "@admin:localhost:8448",
"content": {
"users": {
"@admin:localhost:8448": 100,
"@adminbot:localhost:8448": 100
},
"users_default": 0,
"events": {
"m.room.name": 50,
"m.room.power_levels": 100,
"m.room.history_visibility": 100,
"m.room.canonical_alias": 50,
"m.room.avatar": 50,
"m.room.tombstone": 100,
"m.room.server_acl": 100,
"m.room.encryption": 100
},
"events_default": 0,
"state_default": 50,
"ban": 50,
"kick": 50,
"redact": 50,
"invite": 0,
"historical": 100
},
"state_key": "",
"origin_server_ts": 1723825024853,
"unsigned": {
"replaces_state": "$M2G6HQbfMKFpqK_SVnAlT_c-yAbkNTPpqZ0pXdY7vfE",
"prev_content": {
"users": {
"@admin:localhost:8448": 100
},
"users_default": 0,
"events": {
"m.room.name": 50,
"m.room.power_levels": 100,
"m.room.history_visibility": 100,
"m.room.canonical_alias": 50,
"m.room.avatar": 50,
"m.room.tombstone": 100,
"m.room.server_acl": 100,
"m.room.encryption": 100
},
"events_default": 0,
"state_default": 50,
"ban": 50,
"kick": 50,
"redact": 50,
"invite": 0,
"historical": 100
},
"prev_sender": "@admin:localhost:8448",
"age": 712536
},
"event_id": "$5O6coIwrqFLTQmd5bbtplNqTVeYYyCtgoKufq4m20MQ",
"user_id": "@admin:localhost:8448",
"age": 712536,
"replaces_state": "$M2G6HQbfMKFpqK_SVnAlT_c-yAbkNTPpqZ0pXdY7vfE",
"prev_content": {
"users": {
"@admin:localhost:8448": 100
},
"users_default": 0,
"events": {
"m.room.name": 50,
"m.room.power_levels": 100,
"m.room.history_visibility": 100,
"m.room.canonical_alias": 50,
"m.room.avatar": 50,
"m.room.tombstone": 100,
"m.room.server_acl": 100,
"m.room.encryption": 100
},
"events_default": 0,
"state_default": 50,
"ban": 50,
"kick": 50,
"redact": 50,
"invite": 0,
"historical": 100
}
},
{
"type": "m.room.member",
"room_id": "!cEDYxlMhpnXRGcZELg:localhost:8448",
"sender": "@test02:localhost:8448",
"content": {
"displayname": "test02",
"membership": "join"
},
"state_key": "@test02:localhost:8448",
"origin_server_ts": 1723825039707,
"unsigned": {
"replaces_state": "$jnnRoaEOVzbILMi9VLJzz7RzHrO2wbqmU5h0N6t41Q4",
"prev_content": {
"displayname": "test02",
"membership": "invite"
},
"prev_sender": "@adminbot:localhost:8448",
"age": 697682
},
"event_id": "$s-Za-gg_0uU14w8dYfEp27SfxJ_1e2Pu4LcE6TS51qA",
"user_id": "@test02:localhost:8448",
"age": 697682,
"replaces_state": "$jnnRoaEOVzbILMi9VLJzz7RzHrO2wbqmU5h0N6t41Q4",
"prev_content": {
"displayname": "test02",
"membership": "invite"
}
},
{
"type": "m.room.member",
"room_id": "!cEDYxlMhpnXRGcZELg:localhost:8448",
"sender": "@test03:localhost:8448",
"content": {
"displayname": "test03",
"membership": "join"
},
"state_key": "@test03:localhost:8448",
"origin_server_ts": 1723825122981,
"unsigned": {
"replaces_state": "$RLO-h3N35JXVaY9x13QpQIg3mU9hRCXUnuTShfp3vMA",
"prev_content": {
"displayname": "test03",
"membership": "invite"
},
"prev_sender": "@adminbot:localhost:8448",
"age": 614408
},
"event_id": "$dvuwm765-7Gl7fQmQ_Sl9k1npjjO12_ixFQQtfxYOdQ",
"user_id": "@test03:localhost:8448",
"age": 614408,
"replaces_state": "$RLO-h3N35JXVaY9x13QpQIg3mU9hRCXUnuTShfp3vMA",
"prev_content": {
"displayname": "test03",
"membership": "invite"
}
},
{
"type": "m.room.member",
"room_id": "!cEDYxlMhpnXRGcZELg:localhost:8448",
"sender": "@test04:localhost:8448",
"content": {
"displayname": "test04",
"membership": "join"
},
"state_key": "@test04:localhost:8448",
"origin_server_ts": 1723825351449,
"unsigned": {
"replaces_state": "$-iKtUhr8OgZJEHeGgiIcr9qTlzi4u7jS_zlKBq8CZLY",
"prev_content": {
"displayname": "test04",
"membership": "invite"
},
"prev_sender": "@adminbot:localhost:8448",
"age": 385940
},
"event_id": "$OhJK9nDOXN1iMYFG4WJrul23EnkkVkDc6oJAbOoyFVQ",
"user_id": "@test04:localhost:8448",
"age": 385940,
"replaces_state": "$-iKtUhr8OgZJEHeGgiIcr9qTlzi4u7jS_zlKBq8CZLY",
"prev_content": {
"displayname": "test04",
"membership": "invite"
}
},
{
"type": "m.room.member",
"room_id": "!cEDYxlMhpnXRGcZELg:localhost:8448",
"sender": "@test05:localhost:8448",
"content": {
"displayname": "test05",
"membership": "join"
},
"state_key": "@test05:localhost:8448",
"origin_server_ts": 1723825410938,
"unsigned": {
"replaces_state": "$8rGvJ7FQFtIDYHpVHtP87A2iqkAJWftqnH6AMLYMY88",
"prev_content": {
"displayname": "test05",
"membership": "invite"
},
"prev_sender": "@adminbot:localhost:8448",
"age": 326451
},
"event_id": "$YurKYN47n9Mhrtop0pOhqnGvj5H5Ar-XHvnP3_6MTNw",
"user_id": "@test05:localhost:8448",
"age": 326451,
"replaces_state": "$8rGvJ7FQFtIDYHpVHtP87A2iqkAJWftqnH6AMLYMY88",
"prev_content": {
"displayname": "test05",
"membership": "invite"
}
}
] |
Description
Troubleshooting issues with the
auto_join_rooms
Synapse configuration option, I haven't been able to get users to join rooms (/ or have them auto-created, which it should do by default).Starting fresh to try again, I've noticed that it works the first time, but breaks as soon as you change the rooms in the
auto_join_rooms
config. The only workaround seems to be starting fresh, which isn't ideal.autojoin_success.log
autojoin_fail.log
autojoin_fail_manual.log
Steps to reproduce
Starting on a fresh server with the following set:
Works as intended, new users created either manually through the Admin API (/ console), via Delegated Auth, or through registering all join the three rooms.
However, changing the
auto_join_rooms
config seems to break it from ever working again for newly registered users. I changed it too:But any new users, receive the following error when synapse tries to auto-join them:
I have also tried manually creating a room and giving it the alias, but this then hits:
Homeserver
Custom Homeserver
Synapse Version
1.93.0+lts.1
Installation Method
Other (please mention below)
Database
ESS Built-in Postgres
Workers
Single process
Platform
AWS
c5a.2xlarge
: 8 vCPU, 16 GB MemoryUbuntu 22.04.3 LTS
Installed via ESS: element-installer-enterprise-edition-23.10.18-gui
Configuration
Relevant log output
Anything else that would be useful to know?
No response
The text was updated successfully, but these errors were encountered: