From 60b9d3e5b6343893778ac644635a98a71efa8aa0 Mon Sep 17 00:00:00 2001 From: Kegan Dougal <7190048+kegsay@users.noreply.github.com> Date: Thu, 14 Aug 2025 11:26:38 +0100 Subject: [PATCH] Horrible fix for https://github.com/element-hq/dendrite/issues/3629 --- stateresolutionv2.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stateresolutionv2.go b/stateresolutionv2.go index 10c7bc6c..dd8338f6 100644 --- a/stateresolutionv2.go +++ b/stateresolutionv2.go @@ -74,7 +74,10 @@ func ResolveStateConflictsV2( } } if createEvent == nil { - panic("ResolveStateConflictsV2: cannot find create event in auth chain") + // FIXME TODO: We previously panicked here but this meant Dendrite would crash on startup. + // We really need to get our error handling sorted properly when doing state resolution.. + // See https://github.com/element-hq/dendrite/issues/3629 + return nil // we should return an error here :/ } // Prepare the state resolver. conflictedControlEvents := make([]PDU, 0, len(conflicted))