Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Angular Language Service server crashed 5 times in the last 3 minutes. The server will not be restarted. #436

Closed
andrius-pra opened this issue Oct 31, 2019 · 10 comments
Assignees
Labels

Comments

@andrius-pra
Copy link
Contributor

andrius-pra commented Oct 31, 2019

Steps to reproduce:

  1. install angular.ng-template-0.900.0-next.7 extention
  2. create new angular app
  3. remove @angular/language-service package from project or update to v9.0.0-next.15 version
  4. add this {{ 5 / }} interpolation to any template
  5. you will get The Angular Language Service server crashed 5 times in the last 3 minutes. The server will not be restarted. popup and this error in output window:
[Info  - 22:46:37] Connection to server got closed. Server will restart.
[Info  - 22:46:38] Using typescript v3.6.4 from d:\demo\bug\node_modules\typescript
[Info  - 22:46:38] Using @angular/language-service v9.0.0-next.15 from c:\Users\Andrius\.vscode\extensions\angular.ng-template-0.900.0-next.7\server\node_modules\@angular\language-service
[Info  - 22:46:38] Log file: c:\Users\Andrius\AppData\Roaming\Code\logs\20191031T224516\exthost1\Angular.ng-template\nglangsvc.log
c:\Users\Andrius\.vscode\extensions\angular.ng-template-0.900.0-next.7\server\node_modules\@angular\language-service\bundles\language-service.umd.js:52294
                finally { if (e_1) throw e_1.error; }
                                   ^

TypeError: Cannot read property 'nullable' of undefined
    at getType (c:\Users\Andrius\.vscode\extensions\angular.ng-template-0.900.0-next.7\server\node_modules\@angular\language-service\bundles\language-service.umd.js:28165:26)
    at AstType.visitBinary (c:\Users\Andrius\.vscode\extensions\angular.ng-template-0.900.0-next.7\server\node_modules\@angular\language-service\bundles\language-service.umd.js:28184:29)
    at Binary.visit (c:\Users\Andrius\.vscode\extensions\angular.ng-template-0.900.0-next.7\server\node_modules\@angular\language-service\bundles\language-service.umd.js:6323:28)
    at visit (c:\Users\Andrius\.vscode\extensions\angular.ng-template-0.900.0-next.7\server\node_modules\@angular\language-service\bundles\language-service.umd.js:6767:65)
    at Array.forEach (<anonymous>)
    at visitAll (c:\Users\Andrius\.vscode\extensions\angular.ng-template-0.900.0-next.7\server\node_modules\@angular\language-service\bundles\language-service.umd.js:6769:40)
    at Object.visitInterpolation (c:\Users\Andrius\.vscode\extensions\angular.ng-template-0.900.0-next.7\server\node_modules\@angular\language-service\bundles\language-service.umd.js:6788:50)
    at Interpolation.visit (c:\Users\Andrius\.vscode\extensions\angular.ng-template-0.900.0-next.7\server\node_modules\@angular\language-service\bundles\language-service.umd.js:6308:28)
    at visitAstChildren (c:\Users\Andrius\.vscode\extensions\angular.ng-template-0.900.0-next.7\server\node_modules\@angular\language-service\bundles\language-service.umd.js:6770:13)
    at AstType.visitInterpolation (c:\Users\Andrius\.vscode\extensions\angular.ng-template-0.900.0-next.7\server\node_modules\@angular\language-service\bundles\language-service.umd.js:28339:17)
[Error - 22:46:42] Connection to server got closed. Server will not be restarted.
@ayazhafiz
Copy link
Member

This is because such a template is invalid:

https://runkit.com/ayazhafiz/ng-parser-badexpression

We must have regressed on not blowing up when we have invalid templates.

@ayazhafiz ayazhafiz added the bug label Oct 31, 2019
@kyliau
Copy link
Contributor

kyliau commented Oct 31, 2019

last known good version: v9.0.0-next.3. Regressed starting from next.4 onwards.

changelog: angular/angular@9.0.0-next.3...9.0.0-next.4

@kyliau
Copy link
Contributor

kyliau commented Oct 31, 2019

The diagnostic message used to be:

Parser Error: Unexpected end of expression: 
{{2/}} at the end of the expression [
{{2/}}] in @21:6ng(0)

kyliau pushed a commit to kyliau/angular that referenced this issue Oct 31, 2019
If there is any parser errors when parsing template, we should stop
immediately and not proceed with template expression diagnostics.

This regression is caused by angular@6d11154
and affected v9.0.0-next.4 onwards.

PR closes angular/vscode-ng-language-service#436
@kyliau kyliau self-assigned this Oct 31, 2019
atscott pushed a commit to angular/angular that referenced this issue Nov 1, 2019
…3524)

If there is any parser errors when parsing template, we should stop
immediately and not proceed with template expression diagnostics.

This regression is caused by 6d11154
and affected v9.0.0-next.4 onwards.

PR closes angular/vscode-ng-language-service#436

PR Close #33524
mohaxspb pushed a commit to mohaxspb/angular that referenced this issue Nov 7, 2019
…gular#33524)

If there is any parser errors when parsing template, we should stop
immediately and not proceed with template expression diagnostics.

This regression is caused by angular@6d11154
and affected v9.0.0-next.4 onwards.

PR closes angular/vscode-ng-language-service#436

PR Close angular#33524
mohaxspb pushed a commit to mohaxspb/angular that referenced this issue Nov 7, 2019
…gular#33524)

If there is any parser errors when parsing template, we should stop
immediately and not proceed with template expression diagnostics.

This regression is caused by angular@6d11154
and affected v9.0.0-next.4 onwards.

PR closes angular/vscode-ng-language-service#436

PR Close angular#33524
@ferozsho
Copy link

The Angular Language Service server crashed 5 times in the last 3 minutes. The server will not be restarted.

Extension version: 0.802.3
VS Code version: Code - Insiders 1.41.0-insider (a747d264d668a947eeacd3492b60df6ce8dee6b4, 2019-11-23T11:09:42.834Z)
OS version: Windows_NT x64 10.0.17763

System Info
Item Value
CPUs Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz (8 x 3400)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off
surface_control: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 23.95GB (17.72GB free)
Process Argv
Screen Reader no
VM 0%

@andrius-pra
Copy link
Contributor Author

Could you run ng version command in your project directory and paste output.
version

@ferozsho
Copy link

ferozsho commented Nov 23, 2019

This happens after its last updated

Angular CLI: 7.3.8
Node: 10.16.1
OS: win32 x64
Angular: 5.2.11
... animations, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic

Package Version

@angular-devkit/architect 0.13.8 (cli-only)
@angular-devkit/build-optimizer 0.0.35
@angular-devkit/core 7.3.8 (cli-only)
@angular-devkit/schematics 7.3.8 (cli-only)
@schematics/angular 7.3.8 (cli-only)
@schematics/update 0.13.8 (cli-only)
rxjs 5.5.11
typescript 2.6.2
webpack 3.12.0

@Pentadome
Copy link

Pentadome commented Nov 25, 2019

Error: Cannot find module 'c:\Users\hgfghgf\.vscode-insiders\extensions\angular.ng-template-0.802.3\server\out\server.js'
    at Function._resolveFilename (internal/modules/cjs/loader.js:627:15)
    at Function._load (internal/modules/cjs/loader.js:531:27)
    at Function.runMain (internal/modules/cjs/loader.js:850:10)
    at internal/main/run_main_module.js:17:11 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

@kyliau
Copy link
Contributor

kyliau commented Nov 25, 2019

@wrkettlitz Please see #449
The extension currently has known issues working with vscode insider.

@ThaBrad
Copy link

ThaBrad commented Feb 12, 2020

Is there currently ANY working version??

@kyliau v9.0.0-next.3 didn't work for me (also not newest version 0.900.11)

Angular CLI: 8.1.3
Node: 10.16.0
OS: darwin x64
Angular: 8.2.14

Package Version

@angular-devkit/architect 0.801.3
@angular-devkit/build-angular 0.801.3
@angular-devkit/build-optimizer 0.801.3
@angular-devkit/build-webpack 0.801.3
@angular-devkit/core 8.1.3
@angular-devkit/schematics 8.1.3
@angular/cdk 8.2.3
@angular/cli 8.1.3
@angular/flex-layout 8.0.0-beta.27
@angular/material 8.2.3
@ngtools/webpack 8.1.3
@schematics/angular 8.1.3
@schematics/update 0.801.3
rxjs 6.5.4
typescript 3.4.5
webpack 4.35.2

VS Code
Version: 1.42.0
Commit: ae08d5460b5a45169385ff3fd44208f431992451
Date: 2020-02-06T10:51:33.119Z
Electron: 6.1.6
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Darwin x64 18.7.0

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants