BUG: Blocklist-search fails due to queue ID type mismatch (string vs number) #48
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?
Summary
The "Blocklist and search" feature is broken for all users. Clicking the blocklist button on a download (e.g. the film "Project Hail Mary",
arrQueueId: 905000340,arrType: radarr) consistently returns a403 Download not found or permission deniederror.Root Cause
The server-side lookup in
server/routes/dashboard.jsuses strict equality (===) to find the matching download:d.arrQueueIdis populated from the Radarr/Sonarr queue API response as a number (e.g.905000340).arrQueueIdfromreq.bodyoriginates from the client SPA via a DOMdatasetattribute, which is always a string (e.g."905000340").905000340 === "905000340"evaluates tofalse, so the lookup always fails and returns403.Evidence
Server log (live environment,
2026-05-24):Client log confirms user clicked blocklist at
21:01:19,21:01:32, and21:02:35.Steps to Reproduce
[Blocklist] Download not found.Proposed Fix
Cast both sides of the comparison to
Stringbefore comparing:This fix will be released in version
1.7.16.Severity
High — The blocklist-and-search feature is completely non-functional for all users. There is no workaround within the UI.
Resolved in commit
83c9d4d164.Regression: Fix in v1.7.16 was insufficient — issue persists in production
Updated Root Cause Analysis
Post-release investigation of live server debug logs on
sofarr.i3omb.comconfirms the blocklist feature is still failing after v1.7.16. The server logs still show:The v1.7.16 fix cast both sides of the comparison to
String, which was the correct approach — but it was applied to the wrong data source.The permission check at line 693 of
dashboard.jscalls:downloadClientRegistry.getAllDownloads()fetches raw download client data directly from qBittorrent, SABnzbd, etc. — these are unmatched objects with no Sonarr/Radarr queue metadata. ThearrQueueIdfield is only populated duringDownloadMatcher.jsprocessing (which runs during the SSE/dashboard build from the *arr cache). Because qBittorrent'snormalizeDownload()never setsarrQueueId, the lookup always returnsundefinedfor any qBittorrent torrent, regardless of type casting.Correct Fix
The permission check should validate against the Sonarr/Radarr queue cache records directly (where
idis the queue record ID), rather than against raw download client data. The fix will replace thedownloadClientRegistry.getAllDownloads()lookup with a direct cache lookup ofpoll:sonarr-queue/poll:radarr-queuerecords, matching byString(record.id) === String(arrQueueId).This will be released in v1.7.17.
Resolved in v1.7.17
This issue has been resolved. The commit
7690d95correctly addresses the root cause of the blocklist-and-search feature failure.Root Cause
The v1.7.16 fix correctly cast both sides of the queue ID comparison to
String, but the lookup was performed againstdownloadClientRegistry.getAllDownloads(), which returns raw download-client data (qBittorrent, SABnzbd, etc.) that never hasarrQueueIdpopulated.For qBittorrent torrents specifically,
QBittorrentClient.normalizeDownload()does not setarrQueueIdat all, so the lookup always returnedundefinedand the request was rejected with403.Fix Applied
The permission check in
POST /api/dashboard/blocklist-searchnow looks up the queue record directly from the Sonarr/Radarr queue cache (poll:sonarr-queue/poll:radarr-queue) whererecord.idis the numeric queue ID, usingString()casting on both sides to handle the DOM-dataset (string) vs API response (number) type difference.Files Changed
server/routes/dashboard.js- Fixed lookup to use queue cachetests/integration/dashboard.test.js- Updated tests to use cache-based lookupCHANGELOG.md- Added v1.7.17 entry documenting the regression fixVersion
7690d95All 883 tests pass. The release will be tagged v1.7.17.
Commit:
7690d95Release: v1.7.17