Skip to content

Room creation fails when default version is 12 in config #3669

@bones-was-here

Description

@bones-was-here

Background information

  • Dendrite version or git SHA: 0.15.2
  • SQLite3 or Postgres?: postgres
  • Running in Docker?: no
  • go version: 1.24
  • Client used (if applicable): element web

Description

  • What is the problem: room creation fails
  • Who is affected: all users
  • How is this bug manifesting: error is logged
  • When did this first appear: after setting the default version to 12, 11 works fine
level=error msg="Request panicked!\ngoroutine 1901 [running]:\nruntime/debug.Stack()\n\t/usr/lib/go-1.24/src/runtime/debug/stack.go:26 +0x5e\ngithub.com/element-hq/dendrite/internal/httputil.MakeExternalAPI.MakeJSONAPI.Protect.func3.1()\n\t/home/dendrite/go/pkg/mod/github.com/matrix-org/util@v0.0.0-20221111132719-399730281e66/json.go:98 +0x14c\npanic({0x175af60?, 0xc003b066c0?})\n\t/usr/lib/go-1.24/src/runtime/panic.go:792 +0x132\ngithub.com/element-hq/dendrite/internal/httputil.MakeAuthAPI.func1.1()\n\t/home/dendrite/dendrite.git/internal/httputil/httpapi.go:94 +0x4a\npanic({0x175af60?, 0xc003b066c0?})\n\t/usr/lib/go-1.24/src/runtime/panic.go:792 +0x132\ngithub.com/matrix-org/gomatrixserverlib.MustGetRoomVersion({0x0, 0x0})\n\t/home/dendrite/go/pkg/mod/github.com/matrix-org/gomatrixserverlib@v0.0.0-20250815065806-6697d93cbcba/eventversion.go:445 +0xbb\ngithub.com/element-hq/dendrite/roomserver/api.GenerateCreateContent({0x1b?, 0x1d4a540?}, {0x0, 0x0}, {0xc0047a0180, 0x1b}, {0x0, 0x0, 0x0}, {0x0, ...})\n\t/home/dendrite/dendrite.git/roomserver/api/wrapper.go:243 +0x211\ngithub.com/element-hq/dendrite/clientapi/routing.createRoom({_, _}, {{0x0, 0x0, 0x0}, {0xc007ab5ea0, 0xd}, {0xc007ab5e80, 0x7}, {0x0, ...}, ...}, ...)\n\t/home/dendrite/dendrite.git/clientapi/routing/createroom.go:203 +0xaaa\ngithub.com/element-hq/dendrite/clientapi/routing.CreateRoom(0xc003cca500, 0xc00776d200, 0xc0000a4a78, {0x7f392c164ba0, 0xc0044705a0}, {0x7f392c164a28, 0xc0001bac60}, {0x1d4a540, 0xc00494a030})\n\t/home/dendrite/dendrite.git/clientapi/routing/createroom.go:124 +0x1cd\ngithub.com/element-hq/dendrite/clientapi/routing.Setup.func16(0x1d48280?, 0x175ad20?)\n\t/home/dendrite/dendrite.git/clientapi/routing/routing.go:305 +0x2f\ngithub.com/element-hq/dendrite/internal/httputil.MakeAuthAPI.func1(0xc003cca3c0)\n\t/home/dendrite/dendrite.git/internal/httputil/httpapi.go:111 +0x5ad\ngithub.com/matrix-org/util.(*jsonRequestHandlerWrapper).OnIncomingRequest(0xc003cca280?, 0x2a0aa80?)\n\t/home/dendrite/go/pkg/mod/github.com/matrix-org/util@v0.0.0-20221111132719-399730281e66/json.go:79 +0x19\ngithub.com/element-hq/dendrite/internal/httputil.MakeExternalAPI.MakeJSONAPI.func2({0x1d458a0, 0xc00645c620}, 0x2a0aa80?)\n\t/home/dendrite/go/pkg/mod/github.com/matrix-org/util@v0.0.0-20221111132719-399730281e66/json.go:141 +0xaa\ngithub.com/element-hq/dendrite/internal/httputil.MakeExternalAPI.MakeJSONAPI.Protect.func3({0x1d458a0?, 0xc00645c620?}, 0x1a4ca75?)\n\t/home/dendrite/go/pkg/mod/github.com/matrix-org/util@v0.0.0-20221111132719-399730281e66/json.go:103 +0x57\nnet/http.HandlerFunc.ServeHTTP(...)\n\t/usr/lib/go-1.24/src/net/http/server.go:2294\ngithub.com/element-hq/dendrite/internal/httputil.MakeExternalAPI.func1({0x1d458a0?, 0xc00645c620?}, 0xc003cca140)\n\t/home/dendrite/dendrite.git/internal/httputil/httpapi.go:194 +0x3b2\nnet/http.HandlerFunc.ServeHTTP(0xc003cca000?, {0x1d458a0?, 0xc00645c620?}, 0x7f39736685c0?)\n\t/usr/lib/go-1.24/src/net/http/server.go:2294 +0x29\ngithub.com/gorilla/mux.(*Router).ServeHTTP(0xc0002b0300, {0x1d458a0, 0xc00645c620}, 0xc000485e00)\n\t/home/dendrite/go/pkg/mod/github.com/gorilla/mux@v1.8.0/mux.go:210 +0x1e2\ngithub.com/gorilla/mux.(*Router).ServeHTTP(0xc0047d8900, {0x1d458a0, 0xc00645c620}, 0xc000485b80)\n\t/home/dendrite/go/pkg/mod/github.com/gorilla/mux@v1.8.0/mux.go:210 +0x1e2\nnet/http.serverHandler.ServeHTTP({0x1d41540?}, {0x1d458a0?, 0xc00645c620?}, 0x6?)\n\t/usr/lib/go-1.24/src/net/http/server.go:3301 +0x8e\nnet/http.(*conn).serve(0xc0047ca870, {0x1d48280, 0xc00555c960})\n\t/usr/lib/go-1.24/src/net/http/server.go:2102 +0x625\ncreated by net/http.(*Server).Serve in goroutine 213\n\t/usr/lib/go-1.24/src/net/http/server.go:3454 +0x485\n" context=missing panic="MustGetRoomVersion: "

Steps to reproduce

Set in config:

room_server:
  default_room_version: 12

Restart server and try to create a room. It works as expected if set to 11 though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-Client-APIT-DefectBugs, crashes, hangs, security vulnerabilities, or other reported issues.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions