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

Output Window gets opened when I type #128

Closed
bogacg opened this issue Jul 12, 2017 · 51 comments · Fixed by #136 or #138
Closed

Output Window gets opened when I type #128

bogacg opened this issue Jul 12, 2017 · 51 comments · Fixed by #136 or #138

Comments

@bogacg
Copy link

bogacg commented Jul 12, 2017

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.

@cvanlaw
Copy link

cvanlaw commented Jul 14, 2017

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

@mtycholaz
Copy link

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

@cvanlaw
Copy link

cvanlaw commented Jul 17, 2017

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.

@DBosley
Copy link
Contributor

DBosley commented Jul 18, 2017

This issue is preventing me from updating vscode

@RaviSankarRao
Copy link

These updates are becoming nightmare day by day :(

@ttugates
Copy link

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

@lemoinem
Copy link

You should stop grabbing focus. Pleaser refer to microsoft/vscode#31474 (comment) as to how to do it.

@DavidTheProgrammer
Copy link

@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

@DBosley
Copy link
Contributor

DBosley commented Jul 31, 2017

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.

@DBosley
Copy link
Contributor

DBosley commented Jul 31, 2017

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

@nickprivalov
Copy link

nickprivalov commented Aug 1, 2017

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

@DBosley
Copy link
Contributor

DBosley commented Aug 1, 2017

@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.

@nickprivalov
Copy link

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.

@DavidTheProgrammer
Copy link

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

@nickprivalov
Copy link

Yup, disregard what I said it still occurs.

@DBosley
Copy link
Contributor

DBosley commented Aug 1, 2017

@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?

@lemoinem
Copy link

lemoinem commented Aug 2, 2017

@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.

@DBosley
Copy link
Contributor

DBosley commented Aug 2, 2017

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.

@DBosley
Copy link
Contributor

DBosley commented Aug 3, 2017

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

@DavidTheProgrammer
Copy link

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 ....

@DBosley
Copy link
Contributor

DBosley commented Aug 3, 2017

@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.

@frederikschubert
Copy link

@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.

@DBosley
Copy link
Contributor

DBosley commented Aug 3, 2017

I found the issue in the angular project that relates to this:
angular/angular#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.

@DBosley
Copy link
Contributor

DBosley commented Aug 3, 2017

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

chuckjaz pushed a commit that referenced this issue Aug 4, 2017
Added VSCode tasks and launch options
Added scripts that follow the VSCode language service example more
closely
Fixes: #128 for errors now handled by @angular/language-service
Will need to add better exception handling to fix it in all cases

fixed issues with debugging locally
chuckjaz pushed a commit that referenced this issue Aug 4, 2017
Adding try/catch around @angular/language-service calls to avoid output window opening on its own.
@bogacg
Copy link
Author

bogacg commented Aug 8, 2017

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.

@ShiftySituation
Copy link

ShiftySituation commented Aug 28, 2017

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.

@chuckjaz
Copy link
Contributor

chuckjaz commented Aug 30, 2017

@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.

@DBosley
Copy link
Contributor

DBosley commented Aug 30, 2017

@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.

@Alexintosh
Copy link

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

@idchlife
Copy link

idchlife commented Sep 14, 2017

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

@murilobd
Copy link

This is really really annoying indeed! =/

@AndrewHuffman
Copy link

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

@kmaida
Copy link

kmaida commented Oct 12, 2017

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.

@AnalyzePlatypus
Copy link

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.

@Mastermindzh
Copy link

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

@Brampage
Copy link

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

@rupeshtiwari
Copy link

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.

@ShiftySituation
Copy link

@kobekoto
Copy link

kobekoto commented Nov 5, 2017

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

@CalvinDale
Copy link

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

@joe307bad
Copy link

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

@CalvinDale
Copy link

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

@stranger
Copy link

stranger commented Dec 5, 2017

How is this not fixed yet?

@RogierKonings
Copy link

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

@Alexintosh
Copy link

I will migrate my app to React until this is fixed

@idchlife
Copy link

idchlife commented Dec 7, 2017

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

@luizhsalazar
Copy link

really annoying! any workaround to stop this?

@verysimplenick
Copy link

@DBosley maybe need reopen?

@ewaschenko
Copy link

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

@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 Feb 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.