FS#57260 - [dotnet-sdk] MSBUILD : error MSB1025

Attached to Project: Community Packages
Opened by Dominik Opyd (inder) - Sunday, 28 January 2018, 18:45 GMT
Last edited by Maxime Gauduin (Alucryd) - Thursday, 26 April 2018, 08:13 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Maxime Gauduin (Alucryd)
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
Attempting to run dotnet restore ends with an error. Regardless of what project it is. On the example of neo-cli:

MSBUILD : error MSB1025: An internal failure occurred while running MSBuild.
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)
at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy`1.CreateValue()
at System.ConsolePal.EnsureInitializedCore()
at System.ConsolePal.ControlCHandlerRegistrar.Register()
at System.Console.add_CancelKeyPress(ConsoleCancelEventHandler value)
at Microsoft.Build.CommandLine.MSBuildApp.Execute(String[] commandLine) in E:\A\_work\17\s\src\MSBuild\XMake.cs:line 526

Unhandled Exception: 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)
at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy`1.CreateValue()
at System.ConsolePal.EnsureInitializedCore()
at System.ConsolePal.ControlCHandlerRegistrar.Register()
at System.Console.add_CancelKeyPress(ConsoleCancelEventHandler value)
at Microsoft.Build.CommandLine.MSBuildApp.Execute(String[] commandLine) in E:\A\_work\17\s\src\MSBuild\XMake.cs:line 748
at Microsoft.Build.CommandLine.MSBuildApp.Main(String[] args) in E:\A\_work\17\s\src\MSBuild\XMake.cs:line 215

Steps to reproduce:
git clone https://github.com/neo-project/neo-cli
cd neo-cli
dotnet restore
This task depends upon

Closed by  Maxime Gauduin (Alucryd)
Thursday, 26 April 2018, 08:13 GMT
Reason for closing:  Fixed
Additional comments about closing:  2.1.105
Comment by Maxime Gauduin (Alucryd) - Monday, 29 January 2018, 18:14 GMT
Works for me:

Restoring packages for /home/alucryd/neo-cli/neo-cli/neo-cli.csproj...
Installing Neo.VM 2.0.5.
Installing Neo 2.7.0.
Generating MSBuild file /home/alucryd/neo-cli/neo-cli/obj/neo-cli.csproj.nuget.g.props.
Generating MSBuild file /home/alucryd/neo-cli/neo-cli/obj/neo-cli.csproj.nuget.g.targets.
Restore completed in 10.76 sec for /home/alucryd/neo-cli/neo-cli/neo-cli.csproj.

Can you take it to Microsoft? No idea where the issue could come from.
Comment by Dominik Opyd (inder) - Monday, 29 January 2018, 19:38 GMT
I checked it. And it is very strange. I have a PC with Arch Linux and Gnome and it works there perfectly (checked just now). However, I rented and checked 2 different servers dedicated to OVH from Arch Linux without gui and there are always these errors. Clean systems, the only difference that I have on a PC with Gnome and there is only a server version.
Comment by Maxime Gauduin (Alucryd) - Monday, 29 January 2018, 19:59 GMT
I doubt Gnome has anything to do with it. My test was done on my headless server, I've been restoring and building dotnet projects on that server every day for the past couple months now without issue.
Comment by Dominik Opyd (inder) - Monday, 29 January 2018, 20:06 GMT
So this is hardware problem or what? This is weird for me.
Comment by Maxime Gauduin (Alucryd) - Monday, 29 January 2018, 20:09 GMT
I don't think so. If anything, the error looks related to the terminal you're using. Please take it to Microsoft, they should be able to diagnose this.
Comment by winicius (winicius) - Wednesday, 31 January 2018, 02:30 GMT
Got this same error on my archlinux desktop, but it doesn't happen on my manjaro notebook. Both machines are using the same dotnet-host 2.0.5-1, dotnet-runtime 2.0.5-1 and dotnet-sdk 2.1.4-1
Comment by Dominik Opyd (inder) - Wednesday, 31 January 2018, 11:09 GMT
I created issue on Dotnet-SDK Github: https://github.com/dotnet/sdk/issues/1916
Comment by Jan Alexander Steffens (heftig) - Friday, 02 February 2018, 12:47 GMT
TERM=xterm-256color or TERM=vte-256color explodes. TERM=xterm is fine.
Comment by Eli Schwartz (eschwartz) - Sunday, 04 February 2018, 03:56 GMT
Possibly somehow related to the same root causes as  FS#57300 ?
Comment by Maxime Gauduin (Alucryd) - Sunday, 04 February 2018, 11:02 GMT
Yes, it would seem so.
Comment by Adrienne Cohea (AdrienneCohea) - Thursday, 15 February 2018, 03:14 GMT
I found a workaround.

Downgrade the ncurses to < 6.1 and hold it.

The issue in upstream. The dotnet binary seems not to be compatible with ncurses >= 6.1. The logic used to determine if a terminal is "valid" breaks for ncurses 6.1-1 and 6.1-3 according to my testing. (ncurses 6.0-4 works, which is what I am using). As far as I know, this issue does not affect the tty, just terminal emulators.

Comment by Matthew Welke (welkie) - Tuesday, 20 February 2018, 06:50 GMT
Is there any way to manually install ncurses < 6.1? I just did a reformat and installed the latest version of the dotnet-sdk package, and now I can't continue to do ASP.NET Core development. I'm not familiar with installing specific versions of pacman packages, so I googled it, and found that the only options were to undo to a previously-installed version. Is this true?
Comment by Eli Schwartz (eschwartz) - Wednesday, 21 February 2018, 16:02 GMT
https://wiki.archlinux.org/index.php/ALA

Arch does not support partial upgrades or downgrades, so downgrading ncurses can cause serious issues with other packages linked to ncurses. However, certainly downgrading all packages on your system to a date that is before the 6.1 upgrade, would continue to work.
Comment by Cryptoxin (rrjj99) - Friday, 23 February 2018, 02:09 GMT
Here is the related issue: https://github.com/dotnet/corefx/issues/26966

Another workaround is: TERM=xterm dotnet [operation]
Comment by Matthew Welke (welkie) - Wednesday, 18 April 2018, 09:06 GMT
The latest released SDK finally fixed this:

https://github.com/dotnet/corefx/issues/26966

Loading...