BUG: Blocklist-search fails due to queue ID type mismatch (string vs number) #48
Closed
opened 2026-05-24 22:10:14 +01:00 by Gandalf
·
3 comments
No Branch/Tag Specified
main
release/1.7.38
develop
release/1.7.37
release/1.7.36
release/1.7.35
release/1.7.34
release/1.7.33
release/1.7.32
release/1.7.31
release/1.7.30
release/1.7.29
release/1.7.28
release/1.7.27
release/1.7.26
release/1.7.25
release/1.7.24
release/1.7.23
release/1.7.22
release/1.7.21
release/1.7.20
release/1.7.19
release/1.7.18
release/1.7.17
release/1.7.16
release/1.7.15
release/1.7.14
release/1.7.13
release/1.7.12
release/1.7.11
release/1.7.10
release/1.7.9
release/1.7.8
release/1.7.7
release/1.7.6
release/1.7.5
release/1.7.4
release/1.7.3
release/1.6.0
release/1.5.5
release/1.5.3
release/1.5.2
release/1.5.0a
release/1.4.0
release/1.3.1a
release/1.3.1
release/1.3.0
release/v1.2.2
release/v1.2.1
release/v1.2.0
release/1.1.2
release/1.1.1
release/1.1.0
release/1.0.0
release/0.2.0
release/v0.1.5
release/0.1.4
release/0.1.3
release/0.1
v1.7.38
v1.7.37
v1.7.36
v1.7.35
v1.7.34
v1.7.33
v1.7.32
v1.7.31
v1.7.30
v1.7.29
v1.7.28
v1.7.27
v1.7.26
v1.7.25
v1.7.24
v1.7.23
v1.7.22
v1.7.21
v1.7.20
v1.7.19
v1.7.18
v1.7.17
v1.7.16
v1.7.15
v1.7.14
v1.7.13
v1.7.12
v1.7.11
v1.7.10
v1.7.9
v1.7.8
v1.7.7
v1.7.6
v1.7.5
v1.7.4
v1.7.3
v1.6.0
v1.5.5
v1.5.3
v1.5.2
v1.5.1
v1.5.0a
v1.4.0
v1.3.1a
v1.3.1
v1.2.2
v1.2.1
v1.2.0
v1.1.2
v1.1.1
v1.1.0
v1.0.0
v0.2.0
v0.1.5
v0.1.4
v0.1.3
v0.1.2
v0.1.1
v0.1.0
Labels
Clear labels
Area/Docker
Area/Download Clients
Area/Frontend
Area/History
Area/Logging
Area/Matching
Area/Proxy
Area/SSE
Area/Webhooks
Compat/Breaking
Compat/Non-Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Docker image and container packaging
Download client integrations
Client-side UI and build tooling
History and completed downloads views
Log streaming, file handling, and debug infrastructure
Matching and correlation logic
Upstream service proxy routes
Server-Sent Events and real-time streaming
Webhook processing and reliability
Breaking change that won't be backward compatible
Non-breaking compatibility change
Something is not working
Documentation changes
Improve existing functionality
New functionality
This is security issue
Issue or pull request related to testing
Priority
Critical
1
The priority is critical
Priority
High
2
The priority is high
Priority
Low
4
The priority is low
Priority
Medium
3
The priority is medium
Reviewed
Confirmed
1
Issue has been confirmed
Reviewed
Duplicate
2
This issue or pull request already exists
Reviewed
Invalid
3
Invalid issue
Reviewed
Won't Fix
3
This issue won't be fixed
Status
Abandoned
3
Somebody has started to work on this but abandoned work
Status
Blocked
1
Something is blocking this issue or pull request
Status
Need More Info
2
Feedback is required to reproduce issue or to continue work
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Gandalf/sofarr#48
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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