microsoft / vscode-dotnettools

This is a feedback repository to capture issues logged for the C# Dev Kit and related extensions from Visual Studio Code
Other
226 stars 11 forks source link

NuGet restore process throws error on trying to read some metadata (see log) #849

Open alakoring opened 9 months ago

alakoring commented 9 months ago

Type: Bug

I launched VS Code from command line (code). I expected to open my last project with no error message. I got an error message that hinted that I should report it.

Screen Shot 1

Here’s the log. ProjectSystemServerFault_4cbd046a-497d-4d48-8480-550ecd23681b.failure.txt

Log info in file:

=====================
1/10/2024 9:35:53 AM
LimitedFunctionality
StreamJsonRpc.RemoteInvocationException: Request nominateProject failed with message: Cannot read properties of undefined (reading 'size')
   at StreamJsonRpc.JsonRpc.InvokeCoreAsync[TResult](RequestId id, String targetName, IReadOnlyList`1 arguments, IReadOnlyList`1 positionalArgumentDeclaredTypes, IReadOnlyDictionary`2 namedArgumentDeclaredTypes, CancellationToken cancellationToken, Boolean isParameterObject)
   at Microsoft.VisualStudio.ProjectSystem.PackageReferences.NuGetRestoreService.NominateAsync(ProjectRestoreInfo restoreData, IReadOnlyCollection`1 inputVersions, CancellationToken cancellationToken)
===================

Extension version: 1.1.16 VS Code version: Code 1.85.1 (0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2, 2023-12-13T09:48:16.874Z) OS version: Darwin arm64 21.6.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Apple M1 Pro (8 x 24)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|4, 3, 3| |Memory (System)|32.00GB (1.15GB free)| |Process Argv|--crash-reporter-id 5da07d31-c7aa-4fe8-8ac2-1d6b262dfd90| |Screen Reader|no| |VM|0%|
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263cf:30335440 vscod805cf:30301675 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593cf:30376535 py29gd2263:30899288 vscaat:30438848 vsclangdc:30486549 c4g48928:30535728 dsvsc012:30540252 azure-dev_surveyone:30548225 89544117:30613380 vscrp:30673768 showlangstatbar:30737416 fixshowwlkth:30771522 showindicator:30805244 pythongtdpath:30769146 i26e3531:30792625 welcomedialogc:30910334 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 dsvsc013:30795093 dsvsc014:30804076 dsvsc015:30845448 pythontestfixt:30902429 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 h48ei257:30885898 pythontbext0:30879054 accentitlementsc:30887149 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 aa_t_chat:30882232 dsvsc019:30917259 cp7184t:30925682 ```
timheuer commented 9 months ago

Thanks @alakoring (btw, renaming the title here) -- any insight you can share of the type of project? Any other errors in the Output window logs for C# or C# Dev Kit?

alakoring commented 9 months ago

It’s a fairly simple .NET 8 project (C# game logic and some C# glue that interfaces with Godot game engine). I guess I’m building some sort of assembly that Godot uses to run the game (that is, not an app). I don’t recall any other errors. It isn’t repeating.

Thanks for renaming, I don’t even really know what NuGet is, I try to concentrate on games. I realize this isn’t a great bug report but I did want to report it.

timheuer commented 9 months ago

No problem, thanks for additional details. NuGet is the .NET package management ecosystem. It's a fine bug report btw, you gave us detail and the log :-)

Does it continue to reproduce or are you in working order now without issue (e.g., can build, no error messages in logs, can launch your project)?

alakoring commented 9 months ago

It wasn’t blocking when it occurred and hasn’t happened again, though I tried a second time to repro and got something in that bottom right area about downloading Razor. (Which I don’t think is part of C# Dev Kit.)

timheuer commented 9 months ago

Ok, thank you. Razor message was likely Razor telemetry package (it is a part of the Dev Kit - Razor is the language/model for .NET web apps .razor/.cshtml files)

I think maybe closing this one as long as you are no longer having a problem but if you see it again we can take another look, but I'll tag the NuGet team to maybe see if any other info might be helfpul.

alakoring commented 8 months ago

This just happened again. I restarted VS Code to get an update (then relaunched it from command line so it could find .NET SDK, but that’s a different issue). No output in any of the panes on the bottom.

Screen Shot

ProjectSystemServerFault_585b2ed0-0e3d-4168-975c-a0068e2b8e6f.failure.txt

As near as I can tell, “nuget” doesn’t appear anywhere in my files (other than a comment and in .gitignore).

nkolev92 commented 6 months ago

Reassigning the label as nomination is handled on the project side.

tmeschter commented 4 months ago

Note to self: log the restore data when NominateAsync throws an exception.

glen-84 commented 1 month ago

Duplicate of #567.