Azure-functions-core-tools: Func CLI crashes with an unhandled exception on Fedora28

Created on 26 May 2018  路  3Comments  路  Source: Azure/azure-functions-core-tools

After installing the azure functions tools cli i get the following output:

Unhandled Exception: System.AggregateException: One or more errors occurred. (The terminfo database is invalid.) ---> System.InvalidOperationException: The terminfo database is invalid.
   at System.TermInfo.Database..ctor(String term, Byte[] data)
   at System.TermInfo.Database.ReadDatabase(String term, String directoryPath)
   at System.TermInfo.Database.ReadDatabase(String term)
   at System.TermInfo.Database.ReadActiveDatabase()
   at System.ConsolePal.TerminalFormatStrings.<>c.<.cctor>b__27_0()
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Lazy`1.CreateValue()
   at System.ConsolePal.WriteResetColorString()
   at System.ConsolePal.RefreshColors(ConsoleColor& toChange, ConsoleColor value)
   at Colors.Net.ColoredConsoleWriter.WriteColor(String value, ConsoleColor color)
   at Colors.Net.ColoredConsoleWriter.Write(Object ovalue)
   at Colors.Net.ColoredConsoleWriter.WriteLine(Object value)
   at Azure.Functions.Cli.Program.<>c.<SetupGlobalExceptionHandler>b__1_0(Object s, UnhandledExceptionEventArgs e)
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at Azure.Functions.Cli.ConsoleApp.Run[T](String[] args, IContainer container)
   at Azure.Functions.Cli.Program.Main(String[] args)

I tried installing the cli with the following method:

npm i -g azure-functions-core-tools@core --unsafe-perm

which installs version 2.0.1-beta.28

and

rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm
dnf install azure-functions-core-tools

which installs package https://packages.microsoft.com/rhel/7/prod/azure-functions-core-tools-2.0.1_beta.23-1.x86_64.rpm

I also have dotnet installed, which has version 2.1.200

external

Most helpful comment

After some googling I found that the issue was related to: https://github.com/dotnet/sdk/issues/1916 and with pull request: https://github.com/dotnet/corefx/pull/28786
To temporary solve the issue you need to execute the func CLI with TERM=xterm before your command like so:

TERM=xterm func init .

All 3 comments

After some googling I found that the issue was related to: https://github.com/dotnet/sdk/issues/1916 and with pull request: https://github.com/dotnet/corefx/pull/28786
To temporary solve the issue you need to execute the func CLI with TERM=xterm before your command like so:

TERM=xterm func init .

Thanks for sharing the workaround @zBurrito

Closing as stale, if you are still experiencing the same error with the latest version of the Core Tools, please open a new issue

Was this page helpful?
0 / 5 - 0 ratings