microsoft / vscode-azureresourcegroups

VS Code extension for managing Azure resources.
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azureresourcegroups
MIT License
53 stars 28 forks source link

Internal error: Expected value to be neither null nor undefined #608

Closed agravity-philipp closed 1 year ago

agravity-philipp commented 1 year ago

Type: Bug

I could not expand the resources groups in the Azure Resources extension. When doing so, the "Internal error: Expected value to be neither null nor undefined" pops up on the right bottom.

Extension version: 0.6.1 VS Code version: Code 1.76.1 (5e805b79fcb6ba4c2d23712967df89a089da575b, 2023-03-08T16:32:00.131Z) OS version: Windows_NT x64 10.0.22621 Modes: Sandboxed: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz (8 x 1992)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
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_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|undefined| |Memory (System)|15.82GB (1.82GB free)| |Process Argv|-n --crash-reporter-id efb28cfc-749f-4bc3-a59a-9e2823d8eaef| |Screen Reader|no| |VM|0%|
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vstes627:30244334 vslsvsres303:30308271 pythonvspyl392:30443607 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscorecescf:30445987 pythondataviewer:30285071 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593cf:30376535 pythonvs932:30410667 cppdebug:30492333 vsclangdc:30486549 c4g48928:30535728 dsvsc012:30540252 pynewext54:30681850 azure-dev_surveyone:30548225 pyindex848:30662994 nodejswelcome1cf:30587006 282f8724:30602487 pyind779:30671433 89544117:30613380 pythonsymbol12:30671437 pythonb192:30669360 funwalk2cf:30682975 pythonms35:30680984 ```
agravity-philipp commented 1 year ago

Adding console log from Visual Studio Code: vscode-app-1678742881888.log

alexweininger commented 1 year ago

If you change the grouping to something other than Resource Groups, like Resource Type, does the issue still reproduce?

image
agravity-philipp commented 1 year ago

I seems that grouping by Resource Type is not affected. It expands and I can see the resources.

alexweininger commented 1 year ago

Does changing it back to group by Resource Group make the issue reappear?

agravity-philipp commented 1 year ago

No. Still doing that. And it seems that not all Resource Group affected. Only the one with 36 resource groups.

agravity-philipp commented 1 year ago

Just showing this popup: image

alexweininger commented 1 year ago

Ok, thanks for the info.

joaovbezerra1990 commented 1 year ago

If you change the grouping to something other than Resource Groups, like Resource Type, does the issue still reproduce?

image

I had the same issue, it was showing "Internal error: Expected value to be neither null..."

My resources were collapsed, and I could not expand them without getting to the error, tried logout/login, restarting the mac etc. It was working fine until a couple of hours ago, but i performed a large in vs code and manually interrupted one, I believe thats when the problem started.

This solved the issue for me.

"""If you change the grouping to something other than Resource Groups, like Resource Type, does the issue still reproduce?"""

alexweininger commented 1 year ago

It was working fine until a couple of hours ago, but i performed a large in vs code and manually interrupted one, I believe thats when the problem started.

@joaovbezerra1990 Could you explain more about what you think caused the issue? I'm not sure I understand fully.

alexweininger commented 1 year ago

Note: I'm guessing this error is being thrown by this line https://github.com/microsoft/vscode-azureresourcegroups/blob/c76ebe0d49db3b4a8c762a86d0d44bcfa0b21c47/src/tree/azure/AzureResourceGroupingManager.ts#L145

joaovbezerra1990 commented 1 year ago

I am new to programming/azure in general, so I will try to describe.

1) I was running a long inefficient query on VS Code / somefile.ipynb 2) I have the Azure Database extension, which was connected and working normally (expand groups etc) 3) The long code worked normally, and I started another long query on the same database, using the same somefile.ipynb 4) I am not certain on this, but after manually interrupting the very long query, I could not access my azure resources on Azure extension. this was the only out of ordinary thing that I did.

5) grouping differently enabled me to access the desired resource, but I cant use the other group format, as it wont expand.