Vscode-ng-language-service: Output Window gets opened when I type

Created on 12 Jul 2017  ·  51Comments  ·  Source: angular/vscode-ng-language-service

Output window gets opened any time I type some code and shows language service output.

When I close it doesn't have permanent effect, it gets opened again when I type.

I can't see any settings in the plugin. What shall I do? I don't want Output window open.

Most helpful comment

Actually this is not the only plugin that does this. I think VSCode should generally add option to disable popping out - we should just see like alert at the bottom, but not popping up panel

All 51 comments

This is happening for me as well, but didn't start until I updated to VS Code version 1.14.1 this morning.

VSCode version: 1.14.1
Angular Language Service Extension version: 0.1.4

Temporary fix right now is to leave your Output window open, but reduce the size to the minimum.

I downgraded to VS Code 1.14.0 for now and that resolved it for me. Before I downgraded, I also noticed that autocomplete had each suggestion in triplicate - not sure if that's a VS Code issue or a plugin issue.

This issue is preventing me from updating vscode

These updates are becoming nightmare day by day :(

This window behavior is very distracting. I particularly like the terminal to always show. Am disabling until resolved.

You should stop grabbing focus. Pleaser refer to https://github.com/Microsoft/vscode/issues/31474#event-1185523706 as to how to do it.

@lemoinem I can't see anything in there about stopping this action. They just talk about how their API allows applications to grab focus and not how to prevent it

I can't seem to reproduce this issue in the latest vscode. But I can't seem to get the language service features to work at all anymore. I see messages in the output log, but it's not pulling my focus. It's also not showing any hover help for things like *ngIf and *ngFor which I know it showed before.

@lemoinem I've been looking through the code of this project. I can't find any references to that show() method you're linking.

Please fix ASAP :( Removing focus from terminal is becoming detrimental to work.

@nickprivalov are you experiencing this with the latest version of VSCode? I'm trying to solve this issue myself, but I can't reproduce it anymore.

Just got the update, can confirm your issues with *ngIf and *ngFor directives not appearing. Can also confirm that the Language Service doesn't pop up like before, but have only been using the new version for barely 10 minutes.

What version is the "new version"? 1.14.2? Because it's happening to me with this version.

Yup, disregard what I said it still occurs.

@nickprivalov and @DavidTheProgrammer do either of you have a repo I could pull down that has the issue so I could repro it locally? How long did you have to use VSCode before it happened? Are there any errors in the output window?

@DavidTheProgrammer @DBosley
I still have the issue on the last (1.14.2) version of VScode, it starts as soon as I open VSCode.

I don't know about the show method, but this is what has been answered to me when I reported the issue to VSCode team. If the issue is with VSCode's API or own behavior, I suggest you contact them directly. It will most probably be more efficient than having me or other end-users playing ping-pong between the teams.

I just submitted a PR for this project with updated deps. I've been using the extension built locally with these updates for a week or two now and it all seems to be running smoothly.

Just gotta wait on @chuckjaz to give it the thumbs up.

I was able to see this happen in person today, finally. It seems to switch to the output window when there's an error. This is the error that happened when I saw it:

[Error - 3:08:57 PM] SERVER ERROR: Cannot read property 'identifier' of null
TypeError: Cannot read property 'identifier' of null
    at tokenReference (C:\Users\UserName\.vscode\extensions\Angular.ng-template-0.1.4\server\node_modules\@angular\language-service\bundles\language-service.umd.js:18980:14)
    at Object.visitReference (C:\Users\UserName\.vscode\extensions\Angular.ng-template-0.1.4\server\node_modules\@angular\language-service\bundles\language-service.umd.js:50335:62)
    at ReferenceAst.visit (C:\Users\UserName\.vscode\extensions\Angular.ng-template-0.1.4\server\node_modules\@angular\language-service\bundles\language-service.umd.js:17198:24)
    at locateSymbol (C:\Users\UserName\.vscode\extensions\Angular.ng-template-0.1.4\server\node_modules\@angular\language-service\bundles\language-service.umd.js:50314:22)
    at getHover (C:\Users\UserName\.vscode\extensions\Angular.ng-template-0.1.4\server\node_modules\@angular\language-service\bundles\language-service.umd.js:50589:18)
    at LanguageServiceImpl.getHoverAt (C:\Users\UserName\.vscode\extensions\Angular.ng-template-0.1.4\server\node_modules\@angular\language-service\bundles\language-service.umd.js:50662:20)
    at C:\Users\UserName\.vscode\extensions\Angular.ng-template-0.1.4\server\editorServices.js:2705:68
    at time (C:\Users\UserName\.vscode\extensions\Angular.ng-template-0.1.4\server\editorServices.js:2687:22)
    at Object.getHoverAt (C:\Users\UserName\.vscode\extensions\Angular.ng-template-0.1.4\server\editorServices.js:2705:20)
    at C:\Users\UserName\.vscode\extensions\Angular.ng-template-0.1.4\server\server.js:171:30
[Error - 3:08:57 PM] Request textDocument/hover failed.
  Message: Request textDocument/hover failed with message: Cannot read property 'identifier' of null
  Code: -32603

This appears to be related to hovering over something the language service has no identifier for. I don't know yet if the bug is in this extension or in @angular/language-service

That's exactly what pops up! And yes, I've noticed that it pops up when you hover over a directive or something in the template with a red underline ....

@DavidTheProgrammer I can reproduce it! It seems to trigger when hovering over template variables. (e.g. #descriptionInput on an input in my case).

I'll verify that the dependency updates I created a PR for resolves it, if not I have a few ideas on how to fix it.
It does look like it's a bug with @angular/language-service. When hover text is requested from that service for template variables, it throws an exception.

@DBosley I tested it with your PR and I do not get this error anymore. Also my other issue is fixed with your dep update.

I found the issue in the angular project that relates to this:
https://github.com/angular/angular/issues/17972
It seems to have already been fixed by @chuckjaz. So my PR should close this bug.

Of course, there is still the issue that if there are any language-service errors, the output window will be focused. I'm not sure what the best way to resolve this will be going forward. I'll see if I can get Chuck to weigh in.

PR #138 should catch and handle all errors from the @angular/language-service when getting language-service data.

When I try to update this plug-in, I still get v. 0.1.4 on store.
I had to download manually vsix file to get latest. When I did, I see again same problem, output window got opened on its own.

I have not published 0.1.5 because it is broken. It requires minimist be loadable. I should have a version without this requirement on Wed or Thurs.

For resolution to the issue, please take a look at the OutputChannel interface at
github vscode. There is a show(preserveFocus?: boolean): void; where if preserveFocus is true, it doesn't take focus.

@ShiftySituation My code does not call that method at all (https://github.com/angular/vscode-ng-language-service/blob/master/client/src/extension.ts). This is call happens in the client library I am using which is provided by the vscode team.

@ShiftySituation The majority of "auto-open" issues should be resolved after the next release. Feel free to download the visx file from the releases tab if you want to get it early.

Very annoying, I hope it will be released a fix asap.

Actually this is not the only plugin that does this. I think VSCode should generally add option to disable popping out - we should just see like alert at the bottom, but not popping up panel

This is really really annoying indeed! =/

I find this infuriating, has the fixed not yet been released?

This just started happening to me. Very aggravating, since I use the Terminal window in VS Code heavily, and when I have that open it pops open the output window and changes to it constantly.

This is happening to me as well. The output window snaps open every few seconds with normal output. Killing VSCode and restarting helps for a few minutes.

Am also experiencing this bug, will have to disable the plugin I guess 😢

This is so annoying I think I will stop using this great extension if this is not fixed.

I am also facing this even though I select terminal as my tab and minimize the entire integrated terminal Angular Language Service Output still pops up while working on any file and disturbs.

+1 great VScode extension but output is super annoying and distracting

Ditto, irksome. I sure wish that it was fixed. I've encountered this issue in previous builds a few months back.

This is really frustrating, anyone have any idea how to prevent this from happening?

@joe307bad Try shutting down all instances of VS Code and then re-launching. I've found that occasionally (but not consistently) this works.

How is this not fixed yet?

I will be disabling the angular language service until this is fixed

I will migrate my app to React until this is fixed

@Alexintosh dear god, because of opening panel you will migrate your app to another framework?

really annoying! any workaround to stop this?

@DBosley maybe need reopen?

Happens whenever I open or save a file. Started since Angular Language Service was installed.

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