Repository navigation
Fix qBittorrent V2 auth check breaking against qBit 5.2.0+ (empty 204 response) - #158
benhumphry wants to merge 1 commit into
Conversation
… response) qBittorrent 5.2.0 changed POST /api/v2/auth/login to return HTTP 204 with an empty body on successful authentication. Pre-5.2.0 the endpoint returned HTTP 200 with body "Ok.". The auth check in QBittorrentProxyV2.AuthenticateClient compares response.Content against the literal "Ok." with no null/whitespace guard, so an empty 204 body trips the failure branch and throws DownloadClientAuthenticationException against any qBit 5.2.0+ even when authentication actually succeeded. Add a IsNotNullOrWhiteSpace() guard so the check only treats the response as failed when the body is non-empty AND not "Ok.". This matches the equivalent guard already in Sonarr/Radarr/Lidarr's qBit V2 proxy. IsNotNullOrWhiteSpace() is already in scope via NzbDrone.Common.Extensions (existing using directive at the top of the file).
|
I made a local build with this fix for myself, I can verify that it works. |
|
I request that the creators of Bookshelf fix this within Bookshelf itself. The above kind of solutions are Greek and Latin for us commoners. |
+1 for this. I see this thread referenced as a 'fixed' issue, but I don't see a fix. |
|
I would also dearly love for this to be incorporated into Bookshelf. |
|
Also confirming this PR works and i can connect to qbit now. |
|
We'll need to wait for one of the maintainers to merge it unfortunately. The fix works. |
|
I'm waiting for it as well. Just dropping a comment to show demand |
|
any update? without this, its completely borked and wouldn't work. im setting up a new instance of bookshelf(for the first time ever) and cant seem to get it to work. this is kinda breaking. |
|
Also commenting to try and show demand. |
|
Also bumping to show desire |
|
Just trying to add Bookshelf as an app and running into this. I do not see a word on an official fix. Anyone have step by step on fixing this manually? The code to fix it on top, I see that, but I do not see a file or where to put it. If someone has something or could write up something people could follow to correct this until Bookshelf does, we would apricate it. |
|
Curious as to whether there is life here or that we count things a dead and move on to other projects. I spent a couple hours working this issue yesterday before finding this issue and the attendant PR. |
|
Are there any other forks of Readarr out there? Chaptarr is still in alpha, but the public beta should be coming soon. |
|
If this is never fixed, I get it. These projects are a lot of time. I am just hoping someone can write something up for people to follow along to correct this. I think most of us that use stuff like think are not programmers but have good IT knowledge to follow along. Programmers can figure this out, people with IT knowledge might not be able to. |
What I did, and others probably have done, is fork the project and merge the pull request and then point docker to your image. It doesn't require any coding or anything other than using the github website. I'd recommend asking your AI tool of choice to help you with the steps. |
|
I found a project called Bindery which is adding features and fixing bugs
very actively. I'm still messing with it since I'm on vacation, but it
looks promising.
…On Thu, Jun 4, 2026, 10:40 AM SolomonIxanSmith ***@***.***> wrote:
*SolomonIxanSmith* left a comment (pennydreadful/bookshelf#158)
<#158 (comment)>
If this is never fixed, I get it. These projects are a lot of time. I am
just hoping someone can write something up for people to follow along to
correct this.
I think most of us that use stuff like think are not programmers but have
good IT knowledge to follow along. Programmers can figure this out, people
with IT knowledge might not be able to.
What I did, and others probably have done, is fork the project and merge
the pull request and then point docker to your image. It doesn't require
any coding or anything other than using the github website. I'd recommend
asking your AI tool of choice to help you with the steps.
—
Reply to this email directly, view it on GitHub
<#158?email_source=notifications&email_token=AWJUYUWIEXMWB4QYPEHDYHD46GYALA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINRSGQ3DQMZSGY2KM4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-4624683264>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWJUYUVPRG2ZIBD2DTKY33L46GYALAVCNFSM6AAAAACYVGTNXCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DMMRUGY4DGMRWGQ>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/AWJUYURMOT365INDXQ6R3N346GYALA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINRSGQ3DQMZSGY2KM4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJKTGN5XXIZLSL5UW64Y>
and Android
<https://github.com/notifications/mobile/android/AWJUYUV3KIWMY66PKH6JMZL46GYALA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINRSGQ3DQMZSGY2KM4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>.
Download it today!
You are receiving this because you commented.Message ID:
***@***.***>
|
I use TrueNAS, not a standard Docker image, so that would not work for me.. However, I have been in IT for 20 years but never in coding. When you talk about forking and stuff, I have no clue what that means or how to accomplish it. I was hoping for a "this file is located here, change this code to this". That I can do. Thanks for the reply |
|
I made a fork and a build of this fix, everyone is free to use it until an official update is done. |
You're my hero! |
Yeah that's what I ended up doing too. |
Would you be willing to apply the fix to the softcover (Goodreads) version of Readarr? |
It got build at the same time, sorry if that wasn't clear. |
Derp, thank you! |
|
@Roskott penny would have to merge and penny has gone MIA. I've created a fork that merges all of bookshelf's open pull requests including a fix for Qbittorrent 5.2.x. You can use it if you want. https://github.com/klein1jo/bookshelf |
|
On Truenas Scale I converted Bookshelf to a custom app and changed the image to the hardcover one from @klein1jo, https://github.com/klein1jo/bookshelf. Worked great, back up and running with Qbit. |
qBittorrent 5.2.0+ returns 204 No Content on successful /api/v2/auth/login instead of 200 with body "Ok.". Treat empty bodies as success and map HTTP 401 to an authentication error, matching Sonarr/Radarr. Also publish images as ghcr.io/3n8/bookshelf and grant the CI token the permissions a fork needs to push packages. Fixes pennydreadful#160, pennydreadful#165, pennydreadful#178 (unmerged upstream PRs pennydreadful#158, pennydreadful#162, pennydreadful#170).
|
Waiting for this fix. Any update? Seems like it should be good-to-go. |
|
sorry i use an older qbit so don't have this problem fixed in #170 if you'd like to help contribute i would be glad to add maintainers! |
Problem
qBittorrent 5.2.0 changed
POST /api/v2/auth/loginto return HTTP 204 No Content with an empty body on successful authentication. Before 5.2.0 the endpoint returned HTTP 200 with body"Ok.".The auth check in
QBittorrentProxyV2.AuthenticateClientis:An empty 204 body is not
"Ok.", so this throwsDownloadClientAuthenticationExceptionagainst any qBittorrent 5.2.0+ even when the login actually succeeded. The download client shows as "Failed to authenticate with qBittorrent" in Bookshelf and stops working.The change is observable directly:
(Pre-5.2.0 the same call returned
HTTP/1.1 200 OKand bodyOk..)The qBit 5.2.0 release-notes line that documents this is WEBAPI: Send 204 when WebAPI response contains no data (qbittorrent/qBittorrent#21472, shipped in 5.2.0).
Fix
Add a
IsNotNullOrWhiteSpace()guard so an empty body short-circuits the failure branch — only treat the response as failed if it has content AND that content is not"Ok.":IsNotNullOrWhiteSpace()is already in scope via the existingusing NzbDrone.Common.Extensions;import — no new dependencies.Why this is the right shape
The same one-line guard already lives in all the other Servarr forks that share the qBit V2 proxy:
QBittorrentProxyV2.csThe behaviour difference is exactly why Sonarr/Radarr/Lidarr keep working against qBit 5.2.0 while Bookshelf does not. This change brings Bookshelf into line.
Risk
Negligible. The guard only changes behaviour when
response.Contentis null or whitespace, which previously was always classified as "auth failed" and now is classified as "auth ok". Real failures still return either a non-2xx HTTP status (handled by thecatch (HttpException)block above) or body"Fails."(still caught by the!= "Ok."half of the new condition).Test plan
"Ok."): auth still succeeds. ✅"Fails."): auth still throwsDownloadClientAuthenticationException. ✅Verified locally by rebuilding
Readarr.Core.dllfrom a patcheddevelopcheckout (commitc21c4134…) and dropping it into the upstreamghcr.io/pennydreadful/bookshelf:hardcoverimage. Test Connection in Settings → Download Clients flips from red to green.