"System.ObjectDisposedException: Cannot access a disposed object." On manual NZB grab

Some nzb grabs from every indexer I use reports the following error when I try to grab it manually.

17-7-24 13:16:27.8|Info|EpisodeSearchService|Episode search completed. 1 reports downloaded.
17-7-24 13:16:27.8|Info|DownloadDecisionMaker|Processing 74 releases
17-7-24 13:16:30.9|Info|Nzbget|Adding report [Bloodline.S02E08.1080p.NF.WEBRip.DD5.1.x264-NTb-Obfuscated] to the queue.
17-7-24 13:16:30.9|Warn|ProcessDownloadDecisions|Couldn't add report to download queue. Bloodline.S02E08.1080p.NF.WEBRip.DD5.1.x264-NTb-Obfuscated

[v2.0.0.4881] System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Net.Sockets.NetworkStream'.
  at System.Net.WebConnection.BeginWrite (System.Net.HttpWebRequest request, System.Byte[] buffer, System.Int32 offset, System.Int32 size, System.AsyncCallback cb, System.Object state) [0x0002b] in <2b0d86369d72459baed0cee98a8e578a>:0 
  at System.Net.WebConnectionStream.BeginWrite (System.Byte[] buffer, System.Int32 offset, System.Int32 size, System.AsyncCallback cb, System.Object state) [0x00270] in <2b0d86369d72459baed0cee98a8e578a>:0 
  at System.Net.WebConnectionStream.Write (System.Byte[] buffer, System.Int32 offset, System.Int32 size) [0x00007] in <2b0d86369d72459baed0cee98a8e578a>:0 
  at NzbDrone.Common.Http.Dispatchers.ManagedHttpDispatcher.GetResponse (NzbDrone.Common.Http.HttpRequest request, System.Net.CookieContainer cookies) [0x000d6] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Common\Http\Dispatchers\ManagedHttpDispatcher.cs:55 
  at NzbDrone.Common.Http.Dispatchers.FallbackHttpDispatcher.GetResponse (NzbDrone.Common.Http.HttpRequest request, System.Net.CookieContainer cookies) [0x0009d] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Common\Http\Dispatchers\FallbackHttpDispatcher.cs:47 
  at NzbDrone.Common.Http.HttpClient.Execute (NzbDrone.Common.Http.HttpRequest request) [0x0007e] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Common\Http\HttpClient.cs:70 
  at NzbDrone.Core.Download.Clients.Nzbget.NzbgetProxy.ProcessRequest[T] (NzbDrone.Core.Download.Clients.Nzbget.NzbgetSettings settings, System.String method, System.Object[] parameters) [0x00047] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Core\Download\Clients\Nzbget\NzbgetProxy.cs:232 
  at NzbDrone.Core.Download.Clients.Nzbget.NzbgetProxy.DownloadNzb (System.Byte[] nzbData, System.String title, System.String category, System.Int32 priority, System.Boolean addpaused, NzbDrone.Core.Download.Clients.Nzbget.NzbgetSettings settings) [0x00032] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Core\Download\Clients\Nzbget\NzbgetProxy.cs:53 
  at NzbDrone.Core.Download.Clients.Nzbget.Nzbget.AddFromNzbFile (NzbDrone.Core.Parser.Model.RemoteEpisode remoteEpisode, System.String filename, System.Byte[] fileContent) [0x00039] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Core\Download\Clients\Nzbget\Nzbget.cs:43 
  at NzbDrone.Core.Download.UsenetClientBase`1[TSettings].Download (NzbDrone.Core.Parser.Model.RemoteEpisode remoteEpisode) [0x0011f] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Core\Download\UsenetClientBase.cs:68 
  at NzbDrone.Core.Download.DownloadService.DownloadReport (NzbDrone.Core.Parser.Model.RemoteEpisode remoteEpisode) [0x00171] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Core\Download\DownloadService.cs:69 
  at NzbDrone.Core.Download.ProcessDownloadDecisions.ProcessDecisions (System.Collections.Generic.List`1[T] decisions) [0x000ae] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Core\Download\ProcessDownloadDecisions.cs:74 

17-7-24 13:16:32.6|Info|NzbSearchService|Searching 5 indexers for [Bloodline : S03E07]
17-7-24 13:16:33.1|Info|Nzbget|Adding report [Bloodline.S02E08.1080p.NF.WEBRip.DD5.1.x264-NTb-Obfuscated] to the queue.
17-7-24 13:16:33.3|Warn|ProcessDownloadDecisions|Couldn't add report to download queue. Bloodline.S02E08.1080p.NF.WEBRip.DD5.1.x264-NTb-Obfuscated

[v2.0.0.4881] System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Net.Sockets.NetworkStream'.
  at System.Net.WebConnectionStream.EndWrite (System.IAsyncResult r) [0x00097] in <2b0d86369d72459baed0cee98a8e578a>:0 
  at System.Net.WebConnectionStream.Write (System.Byte[] buffer, System.Int32 offset, System.Int32 size) [0x00053] in <2b0d86369d72459baed0cee98a8e578a>:0 
  at NzbDrone.Common.Http.Dispatchers.ManagedHttpDispatcher.GetResponse (NzbDrone.Common.Http.HttpRequest request, System.Net.CookieContainer cookies) [0x000d6] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Common\Http\Dispatchers\ManagedHttpDispatcher.cs:55 
  at NzbDrone.Common.Http.Dispatchers.FallbackHttpDispatcher.GetResponse (NzbDrone.Common.Http.HttpRequest request, System.Net.CookieContainer cookies) [0x0009d] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Common\Http\Dispatchers\FallbackHttpDispatcher.cs:47 
  at NzbDrone.Common.Http.HttpClient.Execute (NzbDrone.Common.Http.HttpRequest request) [0x0007e] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Common\Http\HttpClient.cs:70 
  at NzbDrone.Core.Download.Clients.Nzbget.NzbgetProxy.ProcessRequest[T] (NzbDrone.Core.Download.Clients.Nzbget.NzbgetSettings settings, System.String method, System.Object[] parameters) [0x00047] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Core\Download\Clients\Nzbget\NzbgetProxy.cs:232 
  at NzbDrone.Core.Download.Clients.Nzbget.NzbgetProxy.DownloadNzb (System.Byte[] nzbData, System.String title, System.String category, System.Int32 priority, System.Boolean addpaused, NzbDrone.Core.Download.Clients.Nzbget.NzbgetSettings settings) [0x00032] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Core\Download\Clients\Nzbget\NzbgetProxy.cs:53 
  at NzbDrone.Core.Download.Clients.Nzbget.Nzbget.AddFromNzbFile (NzbDrone.Core.Parser.Model.RemoteEpisode remoteEpisode, System.String filename, System.Byte[] fileContent) [0x00039] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Core\Download\Clients\Nzbget\Nzbget.cs:43 
  at NzbDrone.Core.Download.UsenetClientBase`1[TSettings].Download (NzbDrone.Core.Parser.Model.RemoteEpisode remoteEpisode) [0x0011f] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Core\Download\UsenetClientBase.cs:68 
  at NzbDrone.Core.Download.DownloadService.DownloadReport (NzbDrone.Core.Parser.Model.RemoteEpisode remoteEpisode) [0x00171] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Core\Download\DownloadService.cs:69 
  at NzbDrone.Core.Download.ProcessDownloadDecisions.ProcessDecisions (System.Collections.Generic.List`1[T] decisions) [0x000ae] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Core\Download\ProcessDownloadDecisions.cs:74 

Version info

Version
2.0.0.4881
Mono Version
5.0.1.1

If I need additional logs just let me know what I need to grab.

Which OS is Sonarr running on?
Are you explicitly setting the legacy TLS provider?

If you’re not setting the legacy TLS provider take a look at the following issue and see if setting it helps.

Im running Sonarr in a Docker on a CentOS system. Also I thought that issue was fixed in a newer release of Sonarr already.

No it’s still an issue, originally we thought it was fixed, but it was not as there is an underlying bug in mono.

I now have added that env in my docker. Sonarr now reports

	Sonarr now supports Mono 5.x with btls enabled, consider removing MONO_TLS_PROVIDER=legacy option

I havent seen any issues yet with maunally downloading nzbs though.

Yeah the health check is wrong since the bug wasn’t our alone to fix.

still getting this even with MONO_TLS_PROVIDER=legacy

same symptom as I reported here:

We’re going to need more information if you’re having this issue, same as we need for another new issue, but ((trace logs)) instead of just ((debug logs)).

Sonarr version (exact version):
Mono version (if Sonarr is not running on Windows):
OS:
((Debug logs)):
(Make sure debug logging is enabled in settings and post the full log to hastebin/pastebin/dropbox/google drive or something similar, do not post them directly here)
Description of issue:

Me too or similar posts without enough information won’t get us anywhere.

Also does mono 4.8 have the same problem? There could be another issue with mono 5.0.1.

My problem started when I upgraded mono, as far as I can remember from 4.4 to 4.8 after Jackett informed there was a problem with my current version.

I now have a trace log, however since it contains sensitive information I’d rather email it to devs rather than post it online.

Anything sensitive should be cleansed automatically, but you can PM it to me.

sent by replying to the notification email, is that the proper way?
let me know if you did not receive it.

No, click on my name to open my profile and click Message:

ok, sent a link for download.

Which version of nzbget are you using?
Sonarr appears to be able to get some responses from nzbget, but history fails, do you have a large history in nzbget?

I’m using the latest 19.1. I have had problems as far back as 18 and upgraded when new versions was available.
I have tried to clear history when I have had these problems but no change.

when I try test button in definition it tests ok sometimes and sometimes it fails.

anything more I can do to help on this issue?

I believe this is related to the mono bug: https://bugzilla.xamarin.com/show_bug.cgi?id=30434

Looking at the fix, it’s not yet in a release as it’s tagged in 5.4 (and 5.2 was just released).

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.