Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding qBitTorrent as download client for Prowlarr failing #22

Closed
1 task done
imgios opened this issue Apr 22, 2024 · 3 comments · Fixed by #23
Closed
1 task done

Adding qBitTorrent as download client for Prowlarr failing #22

imgios opened this issue Apr 22, 2024 · 3 comments · Fixed by #23
Assignees
Labels
bug Something isn't working
Milestone

Comments

@imgios
Copy link
Collaborator

imgios commented Apr 22, 2024

Description

There's an issue when adding qBitTorrent in Prowlarr as download client via the API ttp://servarr-prowlarr.{{ .Release.Namespace }}.svc.cluster.local:9696/api/v1/downloadclient\. Moreover, Prowlarr is answering with the status code 400 and the following message: Test was aborted due to an error: Object reference not set to an instance of an object..

From Prowlarr docs, the request body seems quite different from the one being set in the job:

- name: prowlarr-vs-qbt-finalizer
image: "rapidfort/curl:latest"
command:
- "/bin/sh"
- "-ec"
args:
- "curl -k -X POST \"http://servarr-prowlarr.{{ .Release.Namespace }}.svc.cluster.local:9696/api/v1/downloadclient\" -H 'content-type: application/json' -H 'x-api-key: $(APIKEY)' -H 'x-requested-with: XMLHttpRequest' -d '{\"enable\":true,\"protocol\":\"torrent\",\"priority\":1,\"removeCompletedDownloads\":true,\"removeFailedDownloads\":true,\"name\":\"qBittorrent\",\"fields\":[{\"name\":\"host\",\"value\":\"servarr-qbittorrent\"},{\"name\":\"port\",\"value\":\"10095\"},{\"name\":\"useSsl\",\"value\":false},{\"name\":\"urlBase\"},{\"name\":\"username\",\"value\":\"$(TORRENT_ADMIN)\"},{\"name\":\"password\",\"value\":\"$(TORRENT_PASSWORD)\"},{\"name\":\"movieCategory\",\"value\":\"radarr\"},{\"name\":\"movieImportedCategory\"},{\"name\":\"recentMoviePriority\",\"value\":0},{\"name\":\"olderMoviePriority\",\"value\":0},{\"name\":\"initialState\",\"value\":0},{\"name\":\"sequentialOrder\",\"value\":false},{\"name\":\"firstAndLast\",\"value\":false},{\"name\":\"contentLayout\",\"value\":0}],\"implementationName\":\"qBittorrent\",\"implementation\":\"QBittorrent\",\"configContract\":\"QBittorrentSettings\",\"infoLink\":\"https://wiki.servarr.com/radarr/supported#qbittorrent\",\"tags\":[]}'"
env:
- name: APIKEY
value: "{{ .Values.global.apikey }}"
- name: TORRENT_ADMIN
value: "{{ .Values.torrent.username }}"
- name: TORRENT_PASSWORD
value: "{{ .Values.torrent.password }}"

Steps to reproduce

Deploy the Helm Chart with any value by using the version available in the dev branch.

Expected behavior

qBitTorrent getting registered in Prowlarr successfully I guess?

Servarr Helm Chart version

dev

Relevant log output

# API Answer
~$ kubectl logs -n servarr downloaders-post-install-job-mpj59 -c prowlarr-vs-qbt-finalizer                                                                                                                         % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
[
  {
    "isWarning": false,
    "propertyName": "",
    "errorMessage": "Test was aborted due to an error: Object reference not set to an instance of an object.",
    "severity": "error"
  }
100  1033    0   194  100   839    539   2333 --:--:-- --:--:-- --:--:--  2869
]

# Prowlarr pod logs
[Error] QBittorrent: Test aborted due to exception

[v1.14.0.4286] System.NullReferenceException: Object reference not set to an instance of an object.
   at NzbDrone.Core.Download.DownloadClientBase`1.ValidateCategories(List`1 failures) in ./Prowlarr.Core/Download/DownloadClientBase.cs:line 97
   at NzbDrone.Core.Download.DownloadClientBase`1.Test() in ./Prowlarr.Core/Download/DownloadClientBase.cs:line 112


[Warn] ProwlarrErrorPipeline: Invalid request Validation failed:
 -- : Test was aborted due to an error: Object reference not set to an instance of an object.

Chart values

# Refers to https://github.com/fonzdm/servarr/blob/dev/.github/ci/ci-values.yaml

Code of Conduct

  • I agree to follow this project's Code of Conduct
@imgios imgios added bug Something isn't working needs triage This issue may need triage. Remove it if it has been sufficiently triaged labels Apr 22, 2024
@fonzdm fonzdm self-assigned this Apr 23, 2024
@fonzdm
Copy link
Owner

fonzdm commented Apr 23, 2024

Hi @imgios, thanks for reporting this bug!
I will take care of it, let's see what's wrong.
Thank you also for pointing the correct API to be used 😃

I will create a dedicated branch for this, and i (hopefully) fix the bug using the current workflow (one container inside the job, executing the curl).

@fonzdm fonzdm linked a pull request Apr 23, 2024 that will close this issue
2 tasks
@fonzdm fonzdm removed the needs triage This issue may need triage. Remove it if it has been sufficiently triaged label Apr 23, 2024
@fonzdm
Copy link
Owner

fonzdm commented Apr 23, 2024

PR #23 has been raised.

@imgios
Copy link
Collaborator Author

imgios commented Apr 23, 2024

Issue fixed in #23.

@imgios imgios closed this as completed Apr 23, 2024
@imgios imgios added this to the first release milestone May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants