Jackett: System.ArgumentNullException: Value cannot be null.

Created on 26 Feb 2018  路  23Comments  路  Source: Jackett/Jackett

Please use the search bar at the top of the page and make sure you are not creating an already submitted issue. Duplicating issues makes it more difficult for everyone to follow. Your issue may have already been solved in the past as well.

Provide a description of the feature request or bug, the more details the better.
If you are experiencing an issue with a tracker, a full log must be included. Instructions for obtaining logs are here: https://github.com/Jackett/Jackett#troubleshooting

Xubuntu 16.04

Jackett version:
v0.8.716

Mono version (if not using Windows):
Mono JIT compiler version 5.10.0.140 (tarball Sat Feb 24 15:33:47 UTC 2018)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
Interpreter: yes
LLVM: supported, not enabled.
GC: sgen (concurrent by default)


After the latest mono update and a reboot I am no longer able to start Jackett

Error:
Unhandled Exception:
System.ArgumentNullException: Value cannot be null.
Parameter name: context
at Autofac.ResolutionExtensions.ResolveService (Autofac.IComponentContext context, Autofac.Core.Service service, System.Collections.Generic.IEnumerable1[T] parameters) [0x00003] in <6b74cc51e42041dba63ed788f99f0cbb>:0 at Autofac.ResolutionExtensions.Resolve (Autofac.IComponentContext context, System.Type serviceType, System.Collections.Generic.IEnumerable1[T] parameters) [0x00007] in <6b74cc51e42041dba63ed788f99f0cbb>:0
at Autofac.ResolutionExtensions.Resolve[TService] (Autofac.IComponentContext context, System.Collections.Generic.IEnumerable1[T] parameters) [0x00000] in <6b74cc51e42041dba63ed788f99f0cbb>:0 at Autofac.ResolutionExtensions.Resolve[TService] (Autofac.IComponentContext context) [0x00000] in <6b74cc51e42041dba63ed788f99f0cbb>:0 at Jackett.Engine.get_Logger () [0x00000] in C:\projects\jackett\src\Jackett.Common\Engine.cs:166 at JackettConsole.Program+<>c.<Main>b__0_1 (Jackett.Common.Models.Config.ConsoleOptions options) [0x00330] in <1ff49239ca8c4e438ca9e858f1a41115>:0 at CommandLine.ParserResultExtensions.WithParsed[T] (CommandLine.ParserResult1[T] result, System.Action1[T] action) [0x00011] in <450057026f344cf3b18fc8978bc1a7a3>:0 at JackettConsole.Program.Main (System.String[] args) [0x0002f] in <1ff49239ca8c4e438ca9e858f1a41115>:0 [ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentNullException: Value cannot be null. Parameter name: context at Autofac.ResolutionExtensions.ResolveService (Autofac.IComponentContext context, Autofac.Core.Service service, System.Collections.Generic.IEnumerable1[T] parameters) [0x00003] in <6b74cc51e42041dba63ed788f99f0cbb>:0
at Autofac.ResolutionExtensions.Resolve (Autofac.IComponentContext context, System.Type serviceType, System.Collections.Generic.IEnumerable1[T] parameters) [0x00007] in <6b74cc51e42041dba63ed788f99f0cbb>:0 at Autofac.ResolutionExtensions.Resolve[TService] (Autofac.IComponentContext context, System.Collections.Generic.IEnumerable1[T] parameters) [0x00000] in <6b74cc51e42041dba63ed788f99f0cbb>:0
at Autofac.ResolutionExtensions.Resolve[TService] (Autofac.IComponentContext context) [0x00000] in <6b74cc51e42041dba63ed788f99f0cbb>:0
at Jackett.Engine.get_Logger () [0x00000] in C:\projects\jackett\src\Jackett.Common\Engine.cs:166
at JackettConsole.Program+<>c.

b__0_1 (Jackett.Common.Models.Config.ConsoleOptions options) [0x00330] in <1ff49239ca8c4e438ca9e858f1a41115>:0
at CommandLine.ParserResultExtensions.WithParsed[T] (CommandLine.ParserResult1[T] result, System.Action1[T] action) [0x00011] in <450057026f344cf3b18fc8978bc1a7a3>:0
at JackettConsole.Program.Main (System.String[] args) [0x0002f] in <1ff49239ca8c4e438ca9e858f1a41115>:0

Most helpful comment

@Taloth is right, the problem is caused by NLog, apparently the nuget 5.0 beta doesn't contain the fix.
If you don't want to downgrade mono you can use the fixed version provided by @dutch2005:

cd .../Jackett
wget https://download.sonarr.tv/hotfixes/regression-mono-5.10/NLog.dll.gz
gunzip -f NLog.dll.gz

All 23 comments

I'm getting this too. I think it's a Mono update as no previous versions of Jackett work.

Yes same here since the mono update.

Some problem for me :(

I downgraded to mono 5.8.0. It works, be careful that this last update messes with sonarr and radarr too. Don't update and wait some clarifications 馃憤

@jenkinsddl How did you manage to downgrade? Ubuntu 14.04 won't let me downgrade to 5.8.0...

The mono issue is located here
mono/mono#7285

Someone on the Sonarr Git posted this. I had to remove a bunch of dependencies but was finally able to get things working again.
Pin your version of mono to 5.8.0.127 for the time being.

I did something like this (on Ubuntu):

apt remove mono-complete mono-devel (or whatever you installed for mono, I did mono-complete)
apt autoremove

I edited /etc/apt/sources.list.d/mono-xamarin.list to read:

deb http://download.mono-project.com/repo/ubuntu xenial/snapshots/5.8.0.127 main

Note in the above line, I locked to the 5.8.0.127 version, which still works with sonarr/radarr/jackett.

Then I did an apt update.

Then I did an apt install mono-complete, that got me back down to 5.8.0.127.

Hope this helps someone.

Same happened here

I though I have the same problem, however after installing mono v. 5.8.0.127 jackett looks like this for me:

jackett

Any ideas what's wrong here? I also cannot set any options.

Have you cleaned your browser cache? It's weird.

yeah, didn't help.

The error Sonarr was getting is related to the ReadOnlySpan implicit cast operator that got added to the string type and NLog didn't handle that until 4.5 Release Candidate (latest official release is 4.4.12 iirc). Not the same error as OP. Also Jackett is already on NLog 5.0 beta releases.

An error in Autofac hints at an issue in Reflection, which sounds plausible given the various additions in the .net framework.
Quite the irony though that the error occurs when Autofac is trying to resolve the Logger. :smile:

Mono have released an update which should fix this issue

@Taloth is right, the problem is caused by NLog, apparently the nuget 5.0 beta doesn't contain the fix.
If you don't want to downgrade mono you can use the fixed version provided by @dutch2005:

cd .../Jackett
wget https://download.sonarr.tv/hotfixes/regression-mono-5.10/NLog.dll.gz
gunzip -f NLog.dll.gz

@kaso17 Was just about to mention that. The fix in nlog was made in october, and the latest 5.0 beta is from september. Bad assumption on my part that 5.0 would contain all fixes from 4.5 :smile:
Please note that the nlog.dll from that download is 4.5 RC6, it seems to run in docker, but I don't know if there's anything new in 5.0 that you use otherwise you might want to switch to the 4.5 RC6 nuget package version and release a new Jackett version with that.
I mentioned it to 304NotModified in https://github.com/NLog/NLog/pull/2600 that 5.0 doesn't have the fix yet, so keep an eye on that.

using the new NLog.dll file works.

2nd that. new NLog.dll fixes the issue. I upgraded Mono again ;)
sonarr with the update today works also ;) gracias !

This works for me as well (using the NLog.dll from @dutch2005). Going forward, will we need to do anything once an official fix is released, or will the files in question just be overwritten by the updater/installer?

Nice, Jackett, Sonarr and Radarr all working again with that updated NLog.dll file. Thanks!

@kaso17 They told me nlog 5.0 beta has been abandoned, so it's advisable to switch to 4.5 RC6 (iirc that's likely the last RC before 4.5 final)

With jackett version v0.8.737 Nlog 4.4.13 is used which contains the fix too, so this should be fixed for good.

Having this same issue on a new install of jackett on a Raspberry Pi (raspbian) already running Sonarr and Radarr without any issues. Happens for both 0.9.16 and 0.8.1263 on mono '5.12.0.226-0xamarin3+raspbian9b1'. Any ideas?

System.ArgumentNullException can occur for many reasons, this issue was specific to a Mono update and NLog. It was fixed a while ago

Please create a new issue with your problem and a full enhanced log
https://github.com/Jackett/Jackett#troubleshooting

Was this page helpful?
0 / 5 - 0 ratings

Related issues

annomatik picture annomatik  路  3Comments

STX2k picture STX2k  路  3Comments

dairefagan picture dairefagan  路  3Comments

Corjaantje picture Corjaantje  路  3Comments

thexa4 picture thexa4  路  3Comments