Skip to content

qBittorrent download client reports "Authentication failure" despite receiving a successful 204 login response #34

Closed

Description

@svvagga

Is there an existing issue for this?

  • I have searched the existing open and closed issues

Current Behavior

Adding qBittorrent as a download client fails with "Authentication failure" on Test/Save, even though qBittorrent's /api/v2/auth/login endpoint returns a successful 204 No Content response for the exact same credentials. Trace logs (below) show the login POST succeeding immediately before Readarr reports it as a failure.

The same qBittorrent instance, same credentials, same host/port authenticate successfully in Sonarr and Radarr, both running alongside Readarr and connecting to qBittorrent over the same Docker network.

Expected Behavior

A 204 No Content response from /api/v2/auth/login should be treated as successful authentication, matching qBittorrent's documented API behavior and what Sonarr/Radarr already do against the same instance.

Steps To Reproduce

  1. Add a qBittorrent download client in Readarr with correct host/port/username/password (verified working via curl/wget directly against qBittorrent, and via working Sonarr/Radarr connections to the same instance).
  2. Click Test or Save.
  3. Observe "Authentication failure" on the Username field.

Ruled out while troubleshooting:

  • Credentials: confirmed correct via direct curl/wget from inside the Readarr container, and via working Sonarr/Radarr connections to the same qBittorrent instance.
  • Network/DNS: the qBittorrent hostname resolves and is reachable from the Readarr container (ping succeeds, and a plain GET on /api/v2/app/webapiVersion returns 200).
  • IP ban: qBittorrent logs show no ban; a deliberately wrong password correctly returns 401, not 403.
  • Password special characters: reproduced identically with an alphanumeric-only password.
  • Stale cache: reproduced after restarting both the Readarr container and the full Docker stack (including qBittorrent itself).

Environment

OS: QNAP Container Station (Linux)
Readarr: 0.9.1.0 (ghcr.io/faustvii/readarr:latest)
Docker Install: Yes
Using Reverse Proxy: No
Browser: Chrome
Database: SQLite
qBittorrent: 5.2.3 (lscr.io/linuxserver/qbittorrent), reached via a Gluetun VPN container over network_mode: service:gluetun
Sonarr 4.0.19.2979 and Radarr 6.3.0.10514 both authenticate successfully against the same qBittorrent instance/credentials

What branch are you running?

Develop

Trace Logs?

2026-07-28 11:22:36.9|Trace|HttpClient|Req: [GET] http://gluetun:8090/api/v2/app/webapiVersion
2026-07-28 11:22:37.0|Trace|HttpClient|Res: HTTP/1.1 [GET] http://gluetun:8090/api/v2/app/webapiVersion: 200.OK (6 bytes) (72 ms)
2026-07-28 11:22:37.0|Trace|QBittorrentProxySelector|Using qbitTorrent API v2
2026-07-28 11:22:37.0|Trace|HttpClient|Req: [POST] http://gluetun:8090/api/v2/auth/login: username=(removed)&password=(removed)
2026-07-28 11:22:37.1|Trace|HttpClient|Res: HTTP/1.1 [POST] http://gluetun:8090/api/v2/auth/login: 204.NoContent (0 bytes) (62 ms)
2026-07-28 11:22:37.1|Debug|QBittorrentProxyV2|qbitTorrent authentication failed.
2026-07-28 11:22:37.1|Error|QBittorrent|Unable to authenticate

[v0.9.1.0] NzbDrone.Core.Download.Clients.DownloadClientAuthenticationException: Failed to authenticate with qBittorrent.
   at NzbDrone.Core.Download.Clients.QBittorrent.QBittorrentProxyV2.AuthenticateClient(HttpRequestBuilder requestBuilder, QBittorrentSettings settings, Boolean reauthenticate) in ./Readarr.Core/Download/Clients/QBittorrent/QBittorrentProxyV2.cs:line 444
   at NzbDrone.Core.Download.Clients.QBittorrent.QBittorrentProxyV2.ProcessRequest(HttpRequestBuilder requestBuilder, QBittorrentSettings settings) in ./Readarr.Core/Download/Clients/QBittorrent/QBittorrentProxyV2.cs:line 360
   at NzbDrone.Core.Download.Clients.QBittorrent.QBittorrentProxyV2.GetApiVersion(QBittorrentSettings settings) in ./Readarr.Core/Download/Clients/QBittorrent/QBittorrentProxyV2.cs:line 74
   at NzbDrone.Core.Download.Clients.QBittorrent.QBittorrentProxySelector.FetchProxy(QBittorrentSettings settings) in ./Readarr.Core/Download/Clients/QBittorrent/QBittorrentProxySelector.cs:line 85
   at NzbDrone.Core.Download.Clients.QBittorrent.QBittorrentProxySelector.GetProxyCache(QBittorrentSettings settings, Boolean force) in ./Readarr.Core/Download/Clients/QBittorrent/QBittorrentProxySelector.cs:line 77
   at NzbDrone.Core.Download.Clients.QBittorrent.QBittorrentProxySelector.GetProxy(QBittorrentSettings settings, Boolean force) in ./Readarr.Core/Download/Clients/QBittorrent/QBittorrentProxySelector.cs:line 60
   at NzbDrone.Core.Download.Clients.QBittorrent.QBittorrent.TestConnection() in ./Readarr.Core/Download/Clients/QBittorrent/QBittorrent.cs:line 432

The login POST clearly succeeds (204.NoContent), but AuthenticateClient (QBittorrentProxyV2.cs:444) treats it as a failure anyway. This looks like it's checking for something in the response (a specific cookie name/value, a response body, or a status code branch) that qBittorrent 5.2.3's /auth/login no longer returns in the form the code expects.

Trace Logs have been provided as applicable. Reports may be closed if the required logs are not provided.

  • I have read and followed the steps in the wiki link above and provided the required trace logs - the logs contain trace - that are relevant and show this issue.

Activity

  1. svvagga commented on Jul 28, 2026

    @svvagga
    Author
  2. OdinVex commented on Jul 30, 2026

    @OdinVex

    Yeah, API changed. Also can use API key with qBittorrent now.

  3. jgramling17 commented on Aug 2, 2026

    @jgramling17

    pennydreadful#170

    Fix has been ready to merge for a month. This fork is seemingly abandoned.

  4. github-actions commented on Sep 2, 2026

    @github-actions

    🎉 This issue has been resolved in version 0.9.2 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions