dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.83k stars 4.62k forks source link

dotnet paket restore crashes on macos : Failed to initialize CoreCLR, HRESULT: 0x80004005 #58473

Closed jwosty closed 2 years ago

jwosty commented 2 years ago

Description

Can't restore a project on macos; dotnet itself seems to crash. Repro repo (and branch): https://github.com/fsprojects/Interstellar/tree/dotnet6

Then, run:

dotnet tool restore
dotnet paket --version

And observe a single line printed before exiting:

Failed to initialize CoreCLR, HRESULT: 0x80004005

This also happens when trying to run dotnet fake --version (or any fake or paket command, for that matter). Oddly enough, dotnet fsdocs works fine.

I can however run things like dotnet --version and it reports correctly.

Configuration

.Net 6 Preview 7 macOS 10.15.7

Regression?

I recall this working in previous .Net 6 previews, but I tried it under preview 5 (after uninstalling preview 7) and it still seems broken in the same way. So not completely sure.

Other information

dotnet-issue-labeler[bot] commented 2 years ago

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

jwosty commented 2 years ago

Could this have to do with the fact that I'm running macOS 10.15.7? My Macbook is old enough to refuse upgrading to the next version of macOS (and therefore XCode), so if this is the case, I'd have to buy a new Macbook.

jwosty commented 2 years ago

Here are the logs that result from setting COREHOST_TRACE=1:

interstellar-errors.txt.zip

danmoseley commented 2 years ago

Moving to app host area.

BTW, I see mention of 2.1 in the logs. this is now out of support: https://dotnet.microsoft.com/platform/support/policy/dotnet-core

ghost commented 2 years ago

Tagging subscribers to this area: @vitek-karas, @agocke, @vsadov See info in area-owners.md if you want to be subscribed.

Issue Details
### Description Can't restore a project on macos; dotnet itself seems to crash. Repro repo (and branch): https://github.com/fsprojects/Interstellar/tree/dotnet6 Then, run: ```bash dotnet tool restore dotnet paket --version ``` And observe a single line printed before exiting: ``` Failed to initialize CoreCLR, HRESULT: 0x80004005 ``` This also happens when trying to run ``dotnet fake --version`` (or any fake or paket command, for that matter). Oddly enough, ``dotnet fsdocs`` works fine. I can however run things like ``dotnet --version`` and it reports correctly. ### Configuration .Net 6 Preview 7 macOS 10.15.7 ### Regression? I recall this working in previous .Net 6 previews, but I tried it under preview 5 (after uninstalling preview 7) and it still seems broken in the same way. So not completely sure. ### Other information
Author: jwosty
Assignees: -
Labels: `area-Host`, `untriaged`
Milestone: -
danmoseley commented 2 years ago

I'm running macOS 10.15.7

That should not be a problem: https://github.com/dotnet/core/blob/main/os-lifecycle-policy.md

jwosty commented 2 years ago

Moving to app host area.

BTW, I see mention of 2.1 in the logs. this is now out of support: https://dotnet.microsoft.com/platform/support/policy/dotnet-core

This turned out to be the ticket to fix it.... I didn't think it would do anything, but I uninstalled all .net core runtimes and SDKs < .Net 5, did a git clean -xdf, a dotnet tool restore, and .... Lo and behold, dotnet paket restore works now. Thank you for responding