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
225 stars 10 forks source link

cannot read properties of undefined (reading 'size') #1159

Open valentin-pouget-forge opened 4 months ago

valentin-pouget-forge commented 4 months ago

Type: Bug

Just launch any app with dotnet 8 using dapr in a devcontainer.

Extension version: 1.6.8 VS Code version: Code 1.89.1 (Universal) (dc96b837cf6bb4af9cd736aa3af08cf8279f7685, 2024-05-07T05:14:24.611Z) OS version: Darwin arm64 23.5.0 Modes: Remote OS version: Linux arm64 6.6.26-linuxkit

System Info |Item|Value| |---|---| |CPUs|Apple M3 Pro (11 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
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|8, 10, 6| |Memory (System)|36.00GB (0.42GB free)| |Process Argv|--crash-reporter-id 935eb27a-f574-436a-a6e3-3f9e128b2940| |Screen Reader|no| |VM|0%| |Item|Value| |---|---| |Remote|Dev Container: FORGE.EU @ desktop-linux| |OS|Linux arm64 6.6.26-linuxkit| |CPUs|unknown (10 x 0)| |Memory (System)|24.67GB (13.48GB free)| |VM|0%|
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscoreces:30445986 vscod805cf:30301675 binariesv615:30325510 vsaa593:30376534 py29gd2263:31024239 vscaat:30438848 c4g48928:30535728 azure-dev_surveyonecf:30548226 vscrp:30673768 962ge761:30959799 pythongtdpath:30769146 welcomedialogc:30910334 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pythonmypyd1:30879173 pythoncet0:30885854 h48ei257:31000450 pythontbext0:30879054 accentitlementsc:30995553 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 chatpanelc:31048052 dsvsc021:30996838 9c06g630:31013171 pythoncenvpt:31062603 a69g1124:31058053 dvdeprecationcf:31061161 pythonprt:31056678 dwnewjupyter:31046869 fa862199:31048878 ```
AbhitejJohn commented 4 months ago

@valentin-pouget-forge : Thank you for letting us know. Curious, what template are you using to create these apps?

valentin-pouget-forge commented 4 months ago

One front end app with blazor (and Fluxor) on net8, which connects to the backend using dapr, and the backend app using net8. Both build to a jammy alpine image, they are built using a docker-compose.yml. My VsCode is containerized, using mcr.microsoft.com/devcontainers/dotnet:dev-8.0-jammy.

tmeschter commented 3 months ago

@valentin-pouget-forge Can you provide more details on where you saw this message?

valentin-pouget-forge commented 3 months ago

I am also using docker in docker for devcontainer
// "ghcr.io/devcontainers/features/docker-in-docker:2": {}, and I am using docker compose to build both apps with docker-compose.dcproj

If i remember well, it was in the output pane, maybe for the Window. I didn't keep the details, I though it would be in the crash file. Do you have more details in the crash file?

github-actions[bot] commented 3 months ago

@tmeschter, the 'needs-more-info' label has been removed upon receiving further response from the original bug filer.

valentin-pouget-forge commented 3 months ago

I found the error today again.

structure of the solution: solution.sln docker-compose.yml src/Project1/Project.Api/Project.Api.csproj src/Project1/Project.Sql/Project.Sql.csproj src/Project1/Dockerfile .devcontainer/devcontainer.json .devcontainer/Dockerfile .devcontainer/docker-compose.yml

file path in devcontainer :

/root/.vscode-server/data/logs/20240704T095545/exthost2/ms-dotnettools.csdevkit/ProjectSystemServerFault_130e1a33-0c65-4a3c-a008-71d260097e35.failure.txt

content:

=====================
7/4/2024 10:57:49 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)
===================
7/4/2024 10:57:49 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)
   at Microsoft.VisualStudio.ProjectSystem.PackageReferences.NuGetRestoreService.NominateAsync(ProjectRestoreInfo restoreData, IReadOnlyCollection`1 inputVersions, CancellationToken cancellationToken)
===================
7/4/2024 10:57:49 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)
===================
7/4/2024 10:57:50 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)
===================

output : C# Dev Kit

Starting Spawn .NET server...
Starting Open a solution...
Starting handling solution file "/Users/***sln" in Dev Kit server...
Starting Clear environment...
Using preinstalled .NET runtime at "/usr/share/dotnet/dotnet"
.NET server started and IPC established in 823ms
Completed Spawn .NET server (1049ms)
Completed Clear environment (1582ms)
Completed handling solution file "/Users/***.sln" in Dev Kit server (11676ms)
Starting Restore solution...
Selected configuration: null, active configuration: Debug|Any CPU
Completed Open a solution (11704ms)
Starting NuGet restore for the solution.
Starting command: "dotnet" restore /Users/***.sln --interactive...
Completed command: "dotnet" restore /Users***.sln --interactive (1028ms)
Completed NuGet restore.
Completed Restore solution (1029ms)
valentin-pouget-forge commented 2 months ago

Another example. VsCode Popup: Cs DevKit encountered an unexpected error, click to open log files.

/root/.vscode-server/data/logs/20240708T131801/exthost3/ms-dotnettools.csdevkit/ProjectSystemServerFault_56025b08-9c01-4ea7-b13f-6436253e971b.failure.txt

=====================
7/9/2024 8:03:09 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)
===================
7/9/2024 8:03:09 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)

Output C#

Using dotnet configured on PATH
Dotnet path: /usr/share/dotnet/dotnet
Activating C# + C# Dev Kit + C# IntelliCode...
waiting for named pipe information from server...
[stdout] {"pipeName":"/tmp/728a19c0.sock"}
received named pipe information from server
attempting to connect client to server...
client has connected to server
[Info  - 8:03:07 AM] [Program] Language server initialized
[Info  - 8:03:09 AM] [WorkspaceProjectFactoryService] Project /Users/***.com/git/repo/src/Project/Project/Project.A.csproj loaded by C# Dev Kit
[Info  - 8:03:09 AM] [WorkspaceProjectFactoryService] Project /Users/***.com/git/repo/src/Project/Project/Project.AI.csproj loaded by C# Dev Kit
[Info  - 8:03:09 AM] [WorkspaceProjectFactoryService] Project /Users/***.com/git/repo/src/Project/Project/Project.API.csproj loaded by C# Dev Kit
[Info  - 8:03:09 AM] [WorkspaceProjectFactoryService] Project/Users/***.com/git/repo/src/Project/Project/Project.APP.csproj  loaded by C# Dev Kit
[Info  - 8:03:09 AM] [WorkspaceProjectFactoryService] Project /Users/***.com/git/repo/src/Project/Project/Project.SQL.csproj loaded by C# Dev Kit

Output C# DevKit

Starting Spawn .NET server...
Starting Open a solution...
Starting handling solution file "/Users/***/git/repo/a.sln" in Dev Kit server...
Starting Clear environment...
Using preinstalled .NET runtime at "/usr/share/dotnet/dotnet"
.NET server started and IPC established in 823ms
Completed Spawn .NET server (959ms)
Completed Clear environment (1296ms)
Completed handling solution file "/Users/***/git/repo/a.sln" in Dev Kit server (13708ms)
Starting Restore solution...
Selected configuration: null, active configuration: Debug|Any CPU
Completed Open a solution (13736ms)
Starting NuGet restore for the solution.
Starting command: "dotnet" restore /Users/***/git/repo/a.sln --interactive...
Completed command: "dotnet" restore /Users/***/git/repo/a.sln --interactive (853ms)
Completed NuGet restore.
Completed Restore solution (854ms)
smitpatel commented 2 months ago

Related #1175

glen-84 commented 1 month ago

Duplicate of #567.