Skip to content

auto_join_rooms breaks after changing #16878

Open
@kieranlane

Description

@kieranlane

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:

auto_join_rooms:
  - "#banana:example.com"
  - "#apple:example.com"
  - "#orange:example.com"

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:

auto_join_rooms:
  - "#kiwi:example.com"
  - "#pineapple:example.com"
  - "#lemon:example.com"

But any new users, receive the following error when synapse tries to auto-join them:

synapse.handlers.register - 586 - ERROR - POST-347 - Failed to join new user to '#pineapple:example.com': SynapseError('404: Room alias #pineapple:example.com not found')

I have also tried manually creating a room and giving it the alias, but this then hits:

synapse.handlers.register - 586 - ERROR - POST-347 - Failed to join new user to '#kiwi:example.com': AssertionError()

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 Memory
Ubuntu 22.04.3 LTS
Installed via ESS: element-installer-enterprise-edition-23.10.18-gui

Configuration

auto_join_rooms:
  - "#kiwi:example.com"
  - "#pineapple:example.com"
  - "#lemon:example.com"

Relevant log output

See logs uploaded above:
- [autojoin_success.log](https://github.com/element-hq/synapse/files/14112952/autojoin_success.log)
  - First run, auto-join rooms is successful for all newly created users
- [autojoin_fail.log](https://github.com/element-hq/synapse/files/14112954/autojoin_fail.log)
  - Second run, after changing rooms in auto-join config, fails with `SynapseError('404: Room alias not found')`
- [autojoin_fail_manual.log](https://github.com/element-hq/synapse/files/14112955/autojoin_fail_manual.log)
  - Third run, after manually creating the rooms (+ aliases) present in the auto-join config, fails with `Failed to join new user: AssertionError()`

Anything else that would be useful to know?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions