Bug: Webhooks stopped triggering updates + Sonarr season packs cause incomplete download pickup and app crashes (v1.7.31) #61
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description:
Two related issues are affecting real-time updates and queue accuracy in v1.7.31 (release/1.7.31, merged 2026-05-28):
These issues surfaced or regressed after the frontend remediation and poller/SSE test expansions in v1.7.31.
Investigation Findings (Code Analysis on release/1.7.31)
1. Webhook Issues (server/routes/webhook.js + related)
Replay protection is overly aggressive (
isReplayfunction):${eventType}:${instanceName}:${eventDate}(or${requestId}-${eventDate}for Ombi).datevalues or identical timestamps for rapid events → legitimate webhooks return200 { duplicate: true }and skipprocessWebhookEvent()+ SSE broadcast.Instance resolution fallback is brittle:
sonarrInstances.find(i => i.name === instanceName || i.id === instanceName) || sonarrInstances[0]instanceNamepayload and configured instances causes wrong cache/metrics updates.Ombi path still fragile (despite query-param secret fallback in commit
7b9c895):validatePayload().extractRequestedUser()logic can fail silently for some payloads/Ombi versions, leavingpoll:ombi-requestsincomplete.Fire-and-forget + SSE dependency:
processWebhookEvent(...).catch(...)only logs errors.await pollAllServices()(for SSE) can fail silently if poller/cache has issues (see below).No changes in v1.7.31 to webhook logic (only frontend + tests), so previous partial fixes regressed under load.
2. Sonarr Queue / Season Pack Handling (server/clients/PollingSonarrRetriever.js + poller + cache)
getQueue() implementation (lines ~20-60):
episodeCountaggregation, no deduplication against download client queues.Poller + Webhook refresh path (
server/utils/poller.js+arrRetrieverRegistry.getQueuesByType()):_instanceUrl/_instanceKeyand caches underpoll:sonarr-queue.processWebhookEventcalls this and thenpollAllServices()for SSE.Crash cause:
series,episode,status, etc.), downstream code (dashboard rendering, SSE payload, cache operations, or UI lists inserver/routes/dashboard.js) can hit:No deduplication or cross-client reconciliation anywhere in the queue/download client pipeline.
Impact
Proposed Solution / Fix Plan:
Webhook Reliability (High Priority)
eventDateto minute precision or use a content hash of key payload fields instead of raw date.forceRefreshquery param or admin bypass for testing.pollAllServices()errors are properly surfaced.Sonarr Season Pack / Multi-Episode Handling (Critical)
PollingSonarrRetriever.getQueue()(or post-processing inarrRetrieverRegistry):seasonNumber && !episodeNumbers || episodeCount > 1).isSeasonPack: true,episodeCount, and aggregatedprogressfields.downloadId/ torrent hash / title).Stability / Crash Prevention
Implementation Notes
poll:sonarr-queue).README.mdand webhook docs to recommend proper *arr webhook settings (include full episode info).Suggested Labels:
Kind/Bug, Priority: High, Area/Webhooks, Area/Queue, Compat/Non-Breaking (with migration note for season packs)
Affected Versions: v1.7.30 – v1.7.31 (regressed after frontend + poller changes)
This ticket combines two user-reported issues that share the webhook → queue refresh → display pipeline. Fixing both will restore reliable real-time operation and accurate multi-episode tracking.