Radarr: Startup error TinyIoC.TinyIoCResolutionException System.ArgumentException: -20000 is not a valid value for Int32

Created on 1 Dec 2020  路  8Comments  路  Source: Radarr/Radarr

Describe the bug
Force closes on startup after using clean /opt/Radarr and .config/Radarr folders. Worked perfectly on V2.

To Reproduce
Steps to reproduce the behavior:

  1. run ./Radarr from installed dir

Expected behavior
Radarr to launch

Platform Information (please complete the following information):

  • OS: Ubuntu 20.04 LTS
  • Docker: NO
  • Mono or.NET Core Version: Net Core 5.0.0 (Installed as per FAQ)
  • Radarr Version 3.0.0.4204
  • Radarr Branch master

Trace Logs

[Info] Bootstrap: Starting Radarr - /opt/Radarr/Radarr.dll - Version 3.0.0.4204
[Info] Router: Application mode: Interactive


[Fatal] ConsoleApp: EPIC FAIL!

[v3.0.0.4204] TinyIoC.TinyIoCResolutionException: Unable to resolve type: NzbDrone.Core.Datastore.IDbFactory
 ---> TinyIoC.TinyIoCResolutionException: Unable to resolve type: NzbDrone.Core.Datastore.DbFactory
 ---> TinyIoC.TinyIoCResolutionException: Unable to resolve type: NzbDrone.Core.Datastore.IConnectionStringFactory
 ---> TinyIoC.TinyIoCResolutionException: Unable to resolve type: NzbDrone.Core.Datastore.ConnectionStringFactory
 ---> System.ArgumentException: -20000 is not a valid value for Int32. (Parameter 'value')
 ---> System.FormatException: Input string was not in a correct format.
   at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type)
   at System.Number.ParseInt32(ReadOnlySpan`1 value, NumberStyles styles, NumberFormatInfo info)
   at System.Int32.Parse(String s, NumberStyles style, IFormatProvider provider)
   at System.ComponentModel.Int32Converter.FromString(String value, NumberFormatInfo formatInfo)
   at System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
   --- End of inner exception stack trace ---
   at System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
   at System.ComponentModel.TypeConverter.ConvertFrom(Object value)
   at System.Data.SQLite.SQLiteConnectionStringBuilder.TryGetValue(String keyword, Object& value)
   at System.Data.Common.DbConnectionStringBuilder.get_ConnectionString()
   at NzbDrone.Core.Datastore.ConnectionStringFactory.GetConnectionString(String dbPath) in D:\a\1\s\src\NzbDrone.Core\Datastore\ConnectionStringFactory.cs:line 49
   at NzbDrone.Core.Datastore.ConnectionStringFactory..ctor(IAppFolderInfo appFolderInfo) in D:\a\1\s\src\NzbDrone.Core\Datastore\ConnectionStringFactory.cs:line 19
   at lambda_method(Closure , Object[] )
   at TinyIoC.TinyIoCContainer.ConstructType(Type requestedType, Type implementationType, ConstructorInfo constructor, NamedParameterOverloads parameters, ResolveOptions options) in D:\a\1\s\src\NzbDrone.Common\TinyIoC.cs:line 3576
   --- End of inner exception stack trace ---
   at TinyIoC.TinyIoCContainer.ConstructType(Type requestedType, Type implementationType, ConstructorInfo constructor, NamedParameterOverloads parameters, ResolveOptions options) in D:\a\1\s\src\NzbDrone.Common\TinyIoC.cs:line 3583
   at TinyIoC.TinyIoCContainer.ConstructType(Type requestedType, Type implementationType, ConstructorInfo constructor, ResolveOptions options) in D:\a\1\s\src\NzbDrone.Common\TinyIoC.cs:line 3503
   at TinyIoC.TinyIoCContainer.SingletonFactory.GetObject(Type requestedType, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptions options) in D:\a\1\s\src\NzbDrone.Common\TinyIoC.cs:line 2742
   at TinyIoC.TinyIoCContainer.ResolveInternal(TypeRegistration registration, NamedParameterOverloads parameters, ResolveOptions options) in D:\a\1\s\src\NzbDrone.Common\TinyIoC.cs:line 3237
   at TinyIoC.TinyIoCContainer.Resolve(Type resolveType, String name) in D:\a\1\s\src\NzbDrone.Common\TinyIoC.cs:line 1458
   at NzbDrone.Common.Composition.Container.<>c__DisplayClass12_0.<CreateSingletonImplementationFactory>b__0(TinyIoCContainer c, NamedParameterOverloads p) in D:\a\1\s\src\NzbDrone.Common\Composition\Container.cs:line 85
   at TinyIoC.TinyIoCContainer.DelegateFactory.GetObject(Type requestedType, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptions options) in D:\a\1\s\src\NzbDrone.Common\TinyIoC.cs:line 2504
   --- End of inner exception stack trace ---
   at TinyIoC.TinyIoCContainer.DelegateFactory.GetObject(Type requestedType, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptions options) in D:\a\1\s\src\NzbDrone.Common\TinyIoC.cs:line 2508
   at TinyIoC.TinyIoCContainer.ResolveInternal(TypeRegistration registration, NamedParameterOverloads parameters, ResolveOptions options) in D:\a\1\s\src\NzbDrone.Common\TinyIoC.cs:line 3237
   at TinyIoC.TinyIoCContainer.ConstructType(Type requestedType, Type implementationType, ConstructorInfo constructor, NamedParameterOverloads parameters, ResolveOptions options) in D:\a\1\s\src\NzbDrone.Common\TinyIoC.cs:line 3551
   --- End of inner exception stack trace ---
   at TinyIoC.TinyIoCContainer.ConstructType(Type requestedType, Type implementationType, ConstructorInfo constructor, NamedParameterOverloads parameters, ResolveOptions options) in D:\a\1\s\src\NzbDrone.Common\TinyIoC.cs:line 3564
   at TinyIoC.TinyIoCContainer.ConstructType(Type requestedType, Type implementationType, ConstructorInfo constructor, ResolveOptions options) in D:\a\1\s\src\NzbDrone.Common\TinyIoC.cs:line 3503
   at TinyIoC.TinyIoCContainer.SingletonFactory.GetObject(Type requestedType, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptions options) in D:\a\1\s\src\NzbDrone.Common\TinyIoC.cs:line 2742
   at TinyIoC.TinyIoCContainer.ResolveInternal(TypeRegistration registration, NamedParameterOverloads parameters, ResolveOptions options) in D:\a\1\s\src\NzbDrone.Common\TinyIoC.cs:line 3237
   at TinyIoC.TinyIoCContainer.Resolve(Type resolveType, String name) in D:\a\1\s\src\NzbDrone.Common\TinyIoC.cs:line 1458
   at NzbDrone.Common.Composition.Container.<>c__DisplayClass12_0.<CreateSingletonImplementationFactory>b__0(TinyIoCContainer c, NamedParameterOverloads p) in D:\a\1\s\src\NzbDrone.Common\Composition\Container.cs:line 85
   at TinyIoC.TinyIoCContainer.DelegateFactory.GetObject(Type requestedType, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptions options) in D:\a\1\s\src\NzbDrone.Common\TinyIoC.cs:line 2504
   --- End of inner exception stack trace ---
   at TinyIoC.TinyIoCContainer.DelegateFactory.GetObject(Type requestedType, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptions options) in D:\a\1\s\src\NzbDrone.Common\TinyIoC.cs:line 2508
   at TinyIoC.TinyIoCContainer.ResolveInternal(TypeRegistration registration, NamedParameterOverloads parameters, ResolveOptions options) in D:\a\1\s\src\NzbDrone.Common\TinyIoC.cs:line 3237
   at TinyIoC.TinyIoCContainer.Resolve(Type resolveType) in D:\a\1\s\src\NzbDrone.Common\TinyIoC.cs:line 1431
   at TinyIoC.TinyIoCContainer.Resolve[ResolveType]() in D:\a\1\s\src\NzbDrone.Common\TinyIoC.cs:line 1550
   at NzbDrone.Common.Composition.Container.Resolve[T]() in D:\a\1\s\src\NzbDrone.Common\Composition\Container.cs:line 36
   at NzbDrone.Core.Datastore.DbFactory.RegisterDatabase(IContainer container) in D:\a\1\s\src\NzbDrone.Core\Datastore\DbFactory.cs:line 45
   at Radarr.Host.NzbDroneConsoleFactory.Start() in D:\a\1\s\src\NzbDrone.Host\ApplicationServer.cs:line 95
   at Radarr.Host.Router.Route(ApplicationModes applicationModes) in D:\a\1\s\src\NzbDrone.Host\Router.cs:line 56
   at Radarr.Host.Bootstrap.Start(ApplicationModes applicationModes, StartupContext startupContext) in D:\a\1\s\src\NzbDrone.Host\Bootstrap.cs:line 77
   at Radarr.Host.Bootstrap.Start(StartupContext startupContext, IUserAlert userAlert, Action`1 startCallback) in D:\a\1\s\src\NzbDrone.Host\Bootstrap.cs:line 40
   at NzbDrone.Console.ConsoleApp.Main(String[] args) in D:\a\1\s\src\NzbDrone.Console\ConsoleApp.cs:line 41

support

Most helpful comment

No worries, sorry I was so dismissive before. I'm sure you can imagine we've had a lot of very similar looking support requests that are just a lack of reading the docs!

All 8 comments

We use the issue tracker exclusively for bug reports and feature requests. However, this issue appears to be a support request. Please hop over onto our Discord or Subreddit

If you read the faq you'd know that .net 5 doesn't need to be installed and that you need to remove the old mono binaries completely before replacing with the net core ones. You've just extracted over the top I think.

https://wiki.servarr.com/Radarr_System#update-to-net-core-version

I don't think @stiangus extracted over the top since he said:
"Force closes on startup after using clean /opt/Radarr and .config/Radarr folders. Worked perfectly on V2."

I have the same issue on my Gentoo Linux system. I updated to Radarr v3 from the usenet-overlay but the ebuild seems to be broken (it installs a systemd service file trying to launch "mono --debug /usr/share/radarr/Radarr.exe -nobrowser" which no longer exists.

I updated this line to:
ExecStart=/usr/share/radarr/Radarr -nobrowser

Which now gets me a lot further but now I get exactly the same errors as @stiangus .

After reading this thread and the FAQ I decided to completely delete /usr/share/radarr and manually redownload the latest tar.gz release and unpack it there but it makes absolutetly no difference (this is what the package manager portage should have done for me anyways). The errors are the same.

I have Mono 6.6.0.161 installed (but I don't think it's being used by Radarr v3 anymore?) and no Net Core.

For the record, after a lot of back and forth on discord, for one user this was caused by having norweigan set as the language in bash:

LANGUAGE=nb_NO:nb:no_NO:no:nn_NO:nn:en
LANG=nb_NO.UTF-8

Running

export LANG=en_GB.UTF-8
export LANGUAGE=en_GB:en

then running radarr allowed it to start.

See https://github.com/dotnet/runtime/issues/28452

Wow, that seems pretty likely since I am indeed from Norway lol. What a weird error.. Thanks for keeping me posted though, had pretty much given up on solving it!

No worries, sorry I was so dismissive before. I'm sure you can imagine we've had a lot of very similar looking support requests that are just a lack of reading the docs!

No problem at all, I can imagine it looked like just another support request solvable by reading documentation and not an actual issue.

Thanks a lot, this fixed my issue as well!
I ran "systemctl edit radarr" and added:

[Service]
Environment="LANG=en_GB.UTF-8"
Environment="LANGUAGE=en_GB:en"

Radarr now starts again. FYI my system LANG is normally: "sv_SE.UTF-8" (Swedish UTF-8)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

onedr0p picture onedr0p  路  3Comments

danielb2 picture danielb2  路  3Comments

mattman86 picture mattman86  路  3Comments

Silent-Remux picture Silent-Remux  路  4Comments

alpinewinter picture alpinewinter  路  3Comments