vscode-ng-language-service: Angular Language Service v15.1.0 crashes on 5 times and is not restarted
🐞 bug report
Is this a regression?
Yes, the previous version in which this bug was not present was: ....v15.0.4
Description
A clear and concise description of the problem...Everyone on my team who is on an intel mac found that Angular Language Service server crashed 5 times and is not restarted
each time they open vscode.
Reverting to v15.0.4 fixes this. Our team on M1 macs did not report this issue.
Bug Type
- [ x ] Angular Language Service VSCode extension
- [ x ] Angular Language Service server
as the server is crashed, the extensions function to navigate from templates to matching methods doesn’t work. I am unsure if the extension has any other features.
Reproduction
Open VSCode on an intel mac, with Angular Language Service v15.1.0
Expected behavior
The angular server doesn’t crash.
Logs
Info 0 [17:2:29.2] Format host information updated
Info 1 [17:2:29.2] reload projects.
Info 2 [17:2:29.3] Before ensureProjectForOpenFiles:
Info 3 [17:2:29.3] Open files:
Info 3 [17:2:29.3] After ensureProjectForOpenFiles:
Info 4 [17:2:29.3] Open files:
Info 4 [17:2:29.3] Host file extension mappings updated
Info 5 [17:2:29.3] Host watch options changed to {"watchFile":4,"watchDirectory":0,"fallbackPolling":2}, it will be take effect for next watches.
Info 6 [17:2:29.4] Angular language server process ID: 93241
Info 7 [17:2:29.4] Using typescript/lib/tsserverlibrary v4.6.4 from .../node_modules/typescript/lib/tsserverlibrary.js
Info 8 [17:2:29.4] Using @angular/language-service v15.1.0 from ~/.vscode/extensions/angular.ng-template-15.1.0/node_modules/@angular/language-service/index.js
Info 9 [17:2:29.4] Log file: ~/Library/Application Support/Code/logs/20230125T140056/window3/exthost/Angular.ng-template/nglangsvc.log
Info 10 [17:2:29.11] Search path: .../my.component
Info 11 [17:2:29.12] For info: .../my.component.html :: Config file name: .../tsconfig.json
Info 12 [17:2:29.12] Creating configuration project .../tsconfig.json
Info 13 [17:2:29.14] FileWatcher:: Added:: WatchInfo: .../tsconfig.json 2000 {"watchFile":4,"watchDirectory":0,"fallbackPolling":2} Project: .../tsconfig.json WatchType: Config file
Info 14 [17:2:29.15] Loading new project: Creating possible configured project for .../my.component.html to open
Info 15 [17:2:29.344] Config: .../tsconfig.json : {
"rootNames": [
".../dist/browser/assets/i18n/en.ts",
".../e2e/app.e2e-spec.ts",
".../e2e/app.po.ts",
".../807.of.my.ts"
],
"options": {
"baseUrl": "...",
"outDir": ".../dist/out-tsc",
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"module": 6,
"moduleResolution": 2,
"importHelpers": true,
"target": 7,
"typeRoots": [
".../node_modules/@types"
],
"lib": [
"lib.es2018.d.ts",
"lib.dom.d.ts"
],
"plugins": [
{
"name": "typescript-strict-plugin"
}
],
"configFilePath": ".../tsconfig.json"
}
}
Info 16 [17:2:29.345] DirectoryWatcher:: Added:: WatchInfo: ... 1 {"watchFile":4,"watchDirectory":0,"fallbackPolling":2} Config: .../tsconfig.json WatchType: Wild card directory
Info 17 [17:2:29.345] Elapsed:: 0.5390470027923584ms DirectoryWatcher:: Added:: WatchInfo: ... 1 {"watchFile":4,"watchDirectory":0,"fallbackPolling":2} Config: .../tsconfig.json WatchType: Wild card directory
Info 18 [17:2:29.345] Enabling plugin typescript-strict-plugin from candidate paths: .../node_modules/typescript/lib/tsserverlibrary.js/../../..,~/.vscode/extensions/angular.ng-template-15.1.0/node_modules/@angular/language-service/index.js
Info 19 [17:2:29.346] Loading typescript-strict-plugin from .../node_modules/typescript/lib/tsserverlibrary.js/../../.. (resolved to .../node_modules/node_modules)
Info 20 [17:2:29.367] Loading typescript-strict-plugin from ~/.vscode/extensions/angular.ng-template-15.1.0/node_modules/@angular/language-service/index.js (resolved to ~/.vscode/extensions/angular.ng-template-15.1.0/node_modules/@angular/language-service/index.js/node_modules)
Info 21 [17:2:29.367] Failed to load module 'typescript-strict-plugin' from .../node_modules/node_modules: Error: Angular server will not load plugin 'typescript-strict-plugin'.
at ServerHost.require (~/.vscode/extensions/angular.ng-template-15.1.0/server/index.js:724:20)
at Project.resolveModule (.../node_modules/typescript/lib/tsserverlibrary.js:166368:35)
at .../node_modules/typescript/lib/tsserverlibrary.js:167464:36
at Object.firstDefined (.../node_modules/typescript/lib/tsserverlibrary.js:407:26)
at Project.enablePlugin (.../node_modules/typescript/lib/tsserverlibrary.js:167463:41)
at ConfiguredProject.enablePluginsWithOptions (.../node_modules/typescript/lib/tsserverlibrary.js:168074:30)
at ProjectService.loadConfiguredProject (.../node_modules/typescript/lib/tsserverlibrary.js:169784:25)
at ProjectService.createAndLoadConfiguredProject (.../node_modules/typescript/lib/tsserverlibrary.js:169737:22)
at ProjectService.createLoadAndUpdateConfiguredProject (.../node_modules/typescript/lib/tsserverlibrary.js:169742:36)
at ProjectService.assignProjectToOpenedScriptInfo (.../node_modules/typescript/lib/tsserverlibrary.js:170826:44)
Info 22 [17:2:29.367] Failed to load module 'typescript-strict-plugin' from ~/.vscode/extensions/angular.ng-template-15.1.0/node_modules/@angular/language-service/index.js/node_modules: Error: Angular server will not load plugin 'typescript-strict-plugin'.
at ServerHost.require (~/.vscode/extensions/angular.ng-template-15.1.0/server/index.js:724:20)
at Project.resolveModule (.../node_modules/typescript/lib/tsserverlibrary.js:166368:35)
at .../node_modules/typescript/lib/tsserverlibrary.js:167464:36
at Object.firstDefined (.../node_modules/typescript/lib/tsserverlibrary.js:407:26)
at Project.enablePlugin (.../node_modules/typescript/lib/tsserverlibrary.js:167463:41)
at ConfiguredProject.enablePluginsWithOptions (.../node_modules/typescript/lib/tsserverlibrary.js:168074:30)
at ProjectService.loadConfiguredProject (.../node_modules/typescript/lib/tsserverlibrary.js:169784:25)
at ProjectService.createAndLoadConfiguredProject (.../node_modules/typescript/lib/tsserverlibrary.js:169737:22)
at ProjectService.createLoadAndUpdateConfiguredProject (.../node_modules/typescript/lib/tsserverlibrary.js:169742:36)
at ProjectService.assignProjectToOpenedScriptInfo (.../node_modules/typescript/lib/tsserverlibrary.js:170826:44)
Info 23 [17:2:29.367] Couldn't find typescript-strict-plugin
Info 24 [17:2:29.367] Loading global plugin @angular/language-service
Info 25 [17:2:29.367] Enabling plugin @angular/language-service from candidate paths: ~/.vscode/extensions/angular.ng-template-15.1.0/node_modules/@angular/language-service/index.js,.../node_modules/typescript/lib/tsserverlibrary.js/../../..
Info 26 [17:2:29.367] Loading @angular/language-service from ~/.vscode/extensions/angular.ng-template-15.1.0/node_modules/@angular/language-service/index.js (resolved to ~/.vscode/extensions/angular.ng-template-15.1.0/node_modules/@angular/language-service/index.js/node_modules)
Info 27 [17:2:29.627] Angular compiler options for .../tsconfig.json: {
"baseUrl": "...",
"outDir": ".../dist/out-tsc",
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"module": 6,
"moduleResolution": 2,
"importHelpers": true,
"target": 7,
"typeRoots": [
".../node_modules/@types"
],
"lib": [
"lib.es2018.d.ts",
"lib.dom.d.ts"
],
"plugins": [
{
"name": "typescript-strict-plugin"
}
],
"configFilePath": ".../tsconfig.json",
"genDir": "...",
"basePath": "...",
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"compileNonExportedClasses": false
}
Info 28 [17:2:29.628] Plugin validation succeeded
Info 35 [17:2:29.630] FileWatcher:: Added:: WatchInfo: .../806.of.my.ts 500 {"watchFile":4,"watchDirectory":0,"fallbackPolling":2} WatchType: Closed Script info
Lots of imports et al.
🌍 Your Environment
Angular Version:
Angular: 14.1.3
Extension Version:
v15.1.0
VSCode Version:
1.74.3
Operating System:
mac v12.6.2
Extension options:
"angular.experimental-ivy": true,
Anything else relevant? fixed by reverting to angular language server 15.0.4
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 2
- Comments: 18
Commits related to this issue
- fix(server): Fall back to bundled TS version if specified TSDK is too old We attempt to use the version of typescript defined in the extension options. However, this might be too old for the required... — committed to atscott/vscode-ng-language-service by atscott a year ago
- fix(server): Fall back to bundled TS version if specified TSDK is too old (#1863) We attempt to use the version of typescript defined in the extension options. However, this might be too old for the ... — committed to angular/vscode-ng-language-service by atscott a year ago
- fix(server): Fall back to bundled TS version if specified TSDK is too old (#1863) We attempt to use the version of typescript defined in the extension options. However, this might be too old for the ... — committed to angular/vscode-ng-language-service by atscott a year ago
Oh, I found why.
We have this in workspace settings.json
{ “typescript.enablePromptUseWorkspaceTsdk”: true, “typescript.tsdk”: “client/node_modules/typescript/lib” }
I’ve also tried adding the plugin “typescript-strict-plugin” and indeed it fails to load the plugin but it does not result in a crash. Is there any additional information in the server logs about the crash or in the output tab? At the moment, there’s not enough information here to reproduce the issue and the included logs don’t show the failure. An example project would be helpful as well.