sipeed/picoclaw · error
matrix syncer is not *mautrix.DefaultSyncer
Error message
matrix syncer is not *mautrix.DefaultSyncer
What it means
An internal invariant check in NewMatrixChannel: the mautrix client's Syncer is not the expected *mautrix.DefaultSyncer. This indicates a mautrix library version change rather than user misconfiguration.
Solutions
- Pin/align the mautrix library version the code was written against
- Check upstream mautrix changes to Syncer defaults
- Adapt the channel code to the new syncer type
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at pkg/channels/matrix/matrix.go:234 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15).
Data as JSON: /api/errors/65016391f374f2fd.
Report an issue: GitHub.
Appendix: source
Thrown at pkg/channels/matrix/matrix.go:234
}
if userID == "" {
return nil, fmt.Errorf("matrix user_id is required")
}
if accessToken == "" {
return nil, fmt.Errorf("matrix access_token is required")
}
client, err := mautrix.NewClient(homeserver, id.UserID(userID), accessToken)
if err != nil {
return nil, fmt.Errorf("create matrix client: %w", err)
}
if cfg.DeviceID != "" {
client.DeviceID = id.DeviceID(cfg.DeviceID)
}
syncer, ok := client.Syncer.(*mautrix.DefaultSyncer)
if !ok {
return nil, fmt.Errorf("matrix syncer is not *mautrix.DefaultSyncer")
}
base := channels.NewBaseChannel(
"matrix",
cfg,
messageBus,
bc.AllowFrom,
channels.WithMaxMessageLength(65536),
channels.WithGroupTrigger(bc.GroupTrigger),
channels.WithReasoningChannelID(bc.ReasoningChannelID),
)
ch := &MatrixChannel{
BaseChannel: base,
bc: bc,
client: client,
config: cfg,
syncer: syncer,View on GitHub (pinned to 49183d7e8d)