Skip to content

[BUG] Static mirroring silently drops all events when mirror has no limits configured #567

@tharu-jwd

Description

@tharu-jwd

Describe the bug
Static mirroring silently discards all events when a mirror entry doesn't have a limits block configured. The worker connects and subscribes successfully. No errors in logs, but nothing gets stored.

To Reproduce

  1. Add a mirror entry to settings without a limits block:
    mirroring:
    static:
    • address: wss://some-relay.com
  2. Start nostream
  3. Watch the mirror connect. Events come in but none are stored in the database

Expected behavior
Events from the mirrored relay should be stored. Missing limits should just mean no overrides, not a crash.

Screenshots
N/A

System (please complete the following information):

  • OS: Any
  • Platform: docker / standalone
  • Version: latest

Logs
No errors logged. That's one part of the problem. The TypeError from this.config.limits.event is swallowed by the try/catch in the subscribe loop, so the failure is completely silent.

Additional context
Root cause is line 175 in src/app/static-mirroring-worker.ts:
const eventLimitOverrides = this.config.limits.event ?? {}

Mirror.limits is typed as optional. So when it's not configured, .event throws.

The default settings ship with static: [] and no limits key. Any operator who adds a mirror without explicitly setting limits: hits this.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions