Vscode-ng-language-service: "Initializing Angular language features" remains pending in VS Code 1.40.2

Created on 27 Nov 2019  路  5Comments  路  Source: angular/vscode-ng-language-service

Describe the bug

After the update of Visual Studio Code from 1.40.1 to 1.40.2, in the bottom left the message "Initializing Angular language features" is stuck and the language features don't get enabled.

To Reproduce

Steps to reproduce the behavior:

  1. Install VS Code 1.40.1 and install the Angular Language Features plugin
  2. Update to VS Code 1.40.2

Expected behavior

The plugin to actually work in the latest VS Code update

Logs

Please attach two logs:

In the output console I see:

[Info - 9:48:35 AM] Angular language server process ID: 82460
[Info - 9:48:35 AM] Using typescript v3.6.4 from /Users/cristiantraina/.vscode/extensions/angular.ng-template-0.900.0/node_modules/typescript/lib/tsserverlibrary.js
[Info - 9:48:35 AM] Using @angular/language-service v9.0.0-rc.3 from /Users/cristiantraina/.vscode/extensions/angular.ng-template-0.900.0/server/node_modules/@angular/language-service/bundles/language-service.umd.js
[Info - 9:48:35 AM] Log file: /Users/cristiantraina/Library/Application Support/Code/logs/20191126T100445/exthost7/Angular.ng-template/nglangsvc.log
Warning: Can't resolve all parameters for OpaqueToken in /Users/cristiantraina/Documents/workspaces/project/EVOL_C/node_modules/@angular/core/src/di/opaque_token.d.ts: (?). This will become an error in Angular v6.x
Warning: Can't resolve all parameters for TemplateParser in /Users/cristiantraina/Documents/workspaces/project/EVOL_C/node_modules/@angular/compiler/src/template_parser/template_parser.d.ts: ([object Object], [object Object], [object Object], ?, [object Object]). This will become an error in Angular v6.x
Warning: Can't resolve all parameters for DirectiveWrapperCompiler in /Users/cristiantraina/Documents/workspaces/project/EVOL_C/node_modules/@angular/compiler/src/directive_wrapper_compiler.d.ts: ([object Object], [object Object], [object Object], ?). This will become an error in Angular v6.x
Warning: Can't resolve all parameters for DirectiveResolver in /Users/cristiantraina/Documents/workspaces/project/EVOL_C/node_modules/@angular/compiler/src/directive_resolver.d.ts: (?). This will become an error in Angular v6.x
Warning: Can't resolve all parameters for NgModuleResolver in /Users/cristiantraina/Documents/workspaces/project/EVOL_C/node_modules/@angular/compiler/src/ng_module_resolver.d.ts: (?). This will become an error in Angular v6.x
Warning: Can't resolve all parameters for PipeResolver in /Users/cristiantraina/Documents/workspaces/project/EVOL_C/node_modules/@angular/compiler/src/pipe_resolver.d.ts: (?). This will become an error in Angular v6.x
Warning: Can't resolve all parameters for CompileMetadataResolver in /Users/cristiantraina/Documents/workspaces/project/EVOL_C/node_modules/@angular/compiler/src/metadata_resolver.d.ts: ([object Object], [object Object], [object Object], [object Object], [object Object], [object Object], ?, [object Object]). This will become an error in Angular v6.x
[Error - 9:48:51 AM] Notification handler 'textDocument/didOpen' failed with message: Cannot read property 'attachToProject' of undefined

The log file is:

Info 0 [9:48:35.276] Format host information updated
Info 1 [9:48:35.276] reload projects.
Info 2 [9:48:35.276] Structure before ensureProjectForOpenFiles:
Info 3 [9:48:35.277] Structure after ensureProjectForOpenFiles:
Info 4 [9:48:35.277] Host file extension mappings updated
Info 5 [9:48:35.290] Search path: /Users/cristiantraina/Documents/workspaces/project/EVOL_C/TpdPortalHomeWidget/TpdPortalHomeWidgetWeb/WebContent/modules/le-tue-polizze
Info 6 [9:48:35.293] For info: /Users/cristiantraina/Documents/workspaces/project/EVOL_C/TpdPortalHomeWidget/TpdPortalHomeWidgetWeb/WebContent/modules/le-tue-polizze/le-tue-polizze.component.html :: Config file name: /Users/cristiantraina/Documents/workspaces/project/EVOL_C/tsconfig.json
Info 7 [9:48:35.293] Opened configuration file /Users/cristiantraina/Documents/workspaces/project/EVOL_C/tsconfig.json
Info 8 [9:48:39.137] Loading global plugin @angular/language-service
Info 9 [9:48:39.137] Enabling plugin @angular/language-service from candidate paths: /Users/cristiantraina/.vscode/extensions/angular.ng-template-0.900.0/node_modules/typescript/lib/tsserverlibrary.js/../../..,/Users/cristiantraina/.vscode/extensions/angular.ng-template-0.900.0/server/node_modules/@angular/language-service/bundles/language-service.umd.js
Info 10 [9:48:39.137] Loading @angular/language-service from /Users/cristiantraina/.vscode/extensions/angular.ng-template-0.900.0/node_modules/typescript/lib/tsserverlibrary.js/../../.. (resolved to /Users/cristiantraina/.vscode/extensions/angular.ng-template-0.900.0/node_modules/node_modules)
Info 11 [9:48:39.148] Loading @angular/language-service from /Users/cristiantraina/.vscode/extensions/angular.ng-template-0.900.0/server/node_modules/@angular/language-service/bundles/language-service.umd.js (resolved to /Users/cristiantraina/.vscode/extensions/angular.ng-template-0.900.0/server/node_modules/@angular/language-service/bundles/language-service.umd.js/node_modules)
Info 12 [9:48:39.236] Plugin validation succeded
Info 13 [9:48:39.751] Starting updateGraphWorker: Project: /Users/cristiantraina/Documents/workspaces/project/EVOL_C/tsconfig.json
Info 14 [9:48:51.101] Search path: /Users/cristiantraina/Documents/workspaces/project/EVOL_C/TpdPortalHomeWidget/TpdPortalHomeWidgetWeb/WebContent/modules/le-tue-polizze
Info 15 [9:48:51.101] For info: /Users/cristiantraina/Documents/workspaces/project/EVOL_C/TpdPortalHomeWidget/TpdPortalHomeWidgetWeb/WebContent/modules/le-tue-polizze/le-tue-polizze.component.html :: Config file name: /Users/cristiantraina/Documents/workspaces/project/EVOL_C/tsconfig.json
Info 16 [9:48:51.103] Loading global plugin @angular/language-service
Info 17 [9:48:51.103] Enabling plugin @angular/language-service from candidate paths: /Users/cristiantraina/.vscode/extensions/angular.ng-template-0.900.0/node_modules/typescript/lib/tsserverlibrary.js/../../..,/Users/cristiantraina/.vscode/extensions/angular.ng-template-0.900.0/server/node_modules/@angular/language-service/bundles/language-service.umd.js
Info 18 [9:48:51.103] Loading @angular/language-service from /Users/cristiantraina/.vscode/extensions/angular.ng-template-0.900.0/node_modules/typescript/lib/tsserverlibrary.js/../../.. (resolved to /Users/cristiantraina/.vscode/extensions/angular.ng-template-0.900.0/node_modules/node_modules)
Info 19 [9:48:51.103] Loading @angular/language-service from /Users/cristiantraina/.vscode/extensions/angular.ng-template-0.900.0/server/node_modules/@angular/language-service/bundles/language-service.umd.js (resolved to /Users/cristiantraina/.vscode/extensions/angular.ng-template-0.900.0/server/node_modules/@angular/language-service/bundles/language-service.umd.js/node_modules)
Info 20 [9:48:51.104] Plugin validation succeded
Info 21 [9:48:51.107] Starting updateGraphWorker: Project: /dev/null/inferredProject1*
Info 22 [9:48:51.672] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true Elapsed: 565ms
Info 23 [9:48:51.672] Project '/dev/null/inferredProject1*' (Inferred)
Info 24 [9:48:51.672] Files (15)

Info 25 [9:48:51.672] -----------------------------------------------

bug

Most helpful comment

I think more generally, if the language service fails to load the project, we should update the status accordingly, so that users don't think the project is still loading.

All 5 comments

@andrius-pra, would you mind taking a look at this please?

Notification handler 'textDocument/didOpen' failed with message: Cannot read property 'attachToProject' of undefined

This error occurred here because at least one template file doesn't exist in a file-system. A possible fix is here.

I think more generally, if the language service fails to load the project, we should update the status accordingly, so that users don't think the project is still loading.

I am seeing this also with a React app.

Version: 1.40.2 (system setup)
Commit: f359dd69833dd8800b54d458f6d37ab7c78df520
Date: 2019-11-25T14:54:45.096Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Windows_NT x64 10.0.18363

initializing-angular

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings