Webreaper/SonarrAutoImport

System.Globalization.Invariant

thecyberdevl opened this issue · 3 comments

Output from docker container "mdhiggins/sonarr-sma:preview"

root@a68cec12aa1a:/config/.import# ./SonarrAutoImport -v
Process terminated. Couldn't find a valid ICU package installed on the system. Set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support.
at System.Environment.FailFast(System.String)
at System.Globalization.GlobalizationMode.GetGlobalizationInvariantMode()
at System.Globalization.GlobalizationMode..cctor()
at System.Globalization.CultureData.CreateCultureWithInvariantData()
at System.Globalization.CultureData.get_Invariant()
at System.Globalization.CultureInfo..cctor()
at System.Globalization.CultureInfo.get_InvariantCulture()
at Serilog.Parsing.PropertyToken..ctor(System.String, System.String, System.String, System.Nullable1<Serilog.Parsing.Alignment>, Serilog.Parsing.Destructuring, Int32) at Serilog.Parsing.MessageTemplateParser.ParsePropertyToken(Int32, System.String, Int32 ByRef) at Serilog.Parsing.MessageTemplateParser+<Tokenize>d__1.MoveNext() at System.Collections.Generic.LargeArrayBuilder1[[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].AddRange(System.Collections.Generic.IEnumerable1<System.__Canon>) at System.Collections.Generic.EnumerableHelpers.ToArray[[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable1<System.__Canon>)
at System.Linq.Enumerable.ToArray[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]
at Serilog.Events.MessageTemplate..ctor(System.String, System.Collections.Generic.IEnumerable1<Serilog.Parsing.MessageTemplateToken>) at Serilog.Parsing.MessageTemplateParser.Parse(System.String) at Serilog.Sinks.SystemConsole.Output.OutputTemplateRenderer..ctor(Serilog.Sinks.SystemConsole.Themes.ConsoleTheme, System.String, System.IFormatProvider) at Serilog.ConsoleLoggerConfigurationExtensions.Console(Serilog.Configuration.LoggerSinkConfiguration, Serilog.Events.LogEventLevel, System.String, System.IFormatProvider, Serilog.Core.LoggingLevelSwitch, System.Nullable1<Serilog.Events.LogEventLevel>, Serilog.Sinks.SystemConsole.Themes.ConsoleTheme)
at SonarrAuto.Logging.LogHandler.InitLogs()
at SonarrAuto.Program.Main(System.String[])
Aborted (core dumped)

Which OS are you running on? If it's CentOS then perhaps it's this issue. dotnet/core#2186 (comment)

If I get time I'll put in the workaround mentioned earlier in that thread.

It is a CentOS docker host. I was able to get it running by adding the following environmental variable in the docker-compose file.

  - "DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true"

Excellent, thanks for the fix/update!