Sonarr version (exact version): 2.0.0.5163
Mono version (if Sonarr is not running on Windows): 5.10.1.47
OS: Ubuntu 18.04
Debug logs:
https://pastebin.com/Jv6cmCy4
Description of issue:
I have a Sonarr installation in one server (acts as my main media server) and a download client (ruTorrent) in another. I am trying to run a custom BASH script to pull the download from the download server to the media server a predetermined number of seconds after the grab.
Every time Sonarr tries to execute the script if the show details have come in through the API’s PUSH module it results in this error:
Error|ProcessProvider|Unable to set environment variable 'sonarr_release_indexer', value is null
Followed by:
System.NullReferenceException: Object reference not set to an instance of an object
The relevant sections of the logs are in the link above.
To clarify, this error does not arise when Sonarr finds the show through RSS. In that case it runs the script without a problem. The bug only arises when a separate external script is executed by autodl-irssi to push a release to Sonarr. The command in the push script is:
/usr/bin/curl -i -H "Accept: application/json" -H "Content-Type: application/json" -H "X-Api-Key: $sonKey" -X POST -d '{"title":"'"$title"'","downloadUrl":"'"$downloadUrl"'","downloadProtocol":"torrent","publishDate":"'"$date"'"}' http://localhost:8989/api/release/push
After the push, if Sonarr decides to grab the release, bash scripts fail to execute with the errors in the log.