microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
160.15k stars 28.05k forks source link

Cannot read properties of undefined (reading 'localeCompare') #213369

Open VSCodeTriageBot opened 1 month ago

VSCodeTriageBot commented 1 month ago
TypeError: Cannot read properties of undefined (reading 'localeCompare')
at <anonymous> in src/vs/workbench/services/language/common/languageService.ts:185:60
at Array.sort (<anonymous>)
at r.render in src/vs/workbench/services/language/common/languageService.ts:185:40
at U.u in src/vs/workbench/contrib/extensions/browser/extensionFeaturesTab.ts:451:45
at U.s in src/vs/workbench/contrib/extensions/browser/extensionFeaturesTab.ts:437:10
at new U in src/vs/workbench/contrib/extensions/browser/extensionFeaturesTab.ts:379:8
at b.o in src/vs/platform/instantiation/common/instantiationService.ts:159:18
at b.createInstance in src/vs/platform/instantiation/common/instantiationService.ts:125:18
at j.D in src/vs/workbench/contrib/extensions/browser/extensionFeaturesTab.ts:265:54
at d.value in src/vs/workbench/contrib/extensions/browser/extensionFeaturesTab.ts:201:10
at s.y in src/vs/base/common/event.ts:1156:13
at s.z in src/vs/base/common/event.ts:1167:9
at s.fire in src/vs/base/common/event.ts:1191:9
at <anonymous> in src/vs/base/common/event.ts:127:84
at d.value in src/vs/base/common/event.ts:1578:15
at s.y in src/vs/base/common/event.ts:1156:13
at s.fire in src/vs/base/common/event.ts:1187:9
at a.h in src/vs/base/browser/ui/list/listWidget.ts:184:18
at a.set in src/vs/base/browser/ui/list/listWidget.ts:171:15
at q.setSelection in src/vs/base/browser/ui/list/listWidget.ts:1696:18
at j.u in src/vs/workbench/contrib/extensions/browser/extensionFeaturesTab.ts:206:8
at new j in src/vs/workbench/contrib/extensions/browser/extensionFeaturesTab.ts:168:8
at b.o in src/vs/platform/instantiation/common/instantiationService.ts:159:18
at b.createInstance in src/vs/platform/instantiation/common/instantiationService.ts:125:18
at me.Pb in src/vs/workbench/contrib/extensions/browser/extensionEditor.ts:1023:86

Go to Errors Site

SuperManito commented 1 month ago

image Encountered the same error on monaco-editor

SuperManito commented 1 week ago

This error has been present from monaco-editor version 0.46.0 to version 0.50.0

My web project uesed Vue and Vite not React. Both latest version. I was forced to keep using version 0.45.0. Because other versions may encounter some intolerable errors. I remember the previous stable version was 0.43.0.

I don't know how to provide feedback on these issues I encountered because submitting problems in the MonacoEditor repository requires Playground to reproduce them.

aeschli commented 1 week ago

The original issue is a duplicate of https://github.com/microsoft/vscode/issues/210999 (fixed now)

@SuperManito Your stack trace is at a different location: in the MenuService) https://github.com/microsoft/vscode/blob/8fdbb81a9f8d3f0e4367ea988907435be37a581a/src/vs/platform/actions/common/menuService.ts#L317 There seems to be an invalid menuItem around. Reproducible steps would be very helpful.