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

Initializing js/ts language features never completes #79380

Closed
brunoscopelliti opened this issue Aug 18, 2019 · 26 comments
Closed

Initializing js/ts language features never completes #79380

brunoscopelliti opened this issue Aug 18, 2019 · 26 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@brunoscopelliti
Copy link

I've just installed version 1.37.1.
It seems there has been a regression on this issue: #68896.

@mjbvz
Copy link
Collaborator

mjbvz commented Aug 19, 2019

/needsMoreInfo

@mjbvz mjbvz self-assigned this Aug 19, 2019
@vscodebot vscodebot bot added the info-needed Issue requires more information from poster label Aug 19, 2019
@vscodebot
Copy link

vscodebot bot commented Aug 19, 2019

Thanks for creating this issue! We figured it's missing some basic information or in some other way doesn't follow our issue reporting guidelines. Please take the time to review these and update the issue.

Happy Coding!

@brunoscopelliti
Copy link
Author

Hi @mjbvz ,
What kind of info do you need?
The issue is exactly the same of #68896.

@electric-skeptic
Copy link

VS Code version: 1.37.1
Windows 7 Starter 32 bit

Extensions (problem exists with all disabled):
vscode-eslint dba 1.9.0
githistory don 0.4.6
gitlens eam 9.9.3
vscode-settings-cycler hoo 1.0.1
git-graph mhu 1.13.0
vscode-typescript-tslint-plugin ms- 1.2.2

Steps to reproduce:
open any JavaScript or TypeScript file

Symptoms:
The application starts responding very slowly and

"Initializing Js/TS language features"

appears in the statusbar, which never disappears.

As @brunoscopelliti mentioned the issue presents with the exact same symptoms as all of the other times it's been reported and closed previously (normally for insufficient information, or just locked with no explanation).

@mjbvz
Copy link
Collaborator

mjbvz commented Aug 19, 2019

Have you configured a custom TypeScript version in your workspace? Are you loading a file on a network drive?

@electric-skeptic
Copy link

Hi @mjbvz No, the files are all on the local hard drive. There aren't any workspace settings at all, nor have I made any effort to set up TypeScript beyond installing the TSLint extension.
It's also a clean install of VS Code on a laptop not previously used for any development

@mjbvz
Copy link
Collaborator

mjbvz commented Aug 20, 2019

Please try collecting the TS Server log:

  1. Set "typescript.tsserver.log": "verbose",
  2. Restart VS Code and reproduce the problem
  3. In VS Code, run the TypeScript: Open TS Server log command
  4. This should open a large log file called tsserver.log

If you can share the log, I can also take a look to see if anything stands out

⚠️Warning: The TypeScript log may include information from your workspace, including file paths and source code. If you have any concerns about posting this publicly on Github, just let me know and we can arrange something else. On our side, we only use these logs to investigate issues like this

@mjbvz
Copy link
Collaborator

mjbvz commented Aug 20, 2019

Also @electric-skeptic, open a separate issue

@remychvn
Copy link

remychvn commented Aug 20, 2019

I confirm, I encounter the same issue.
I'm not using typescript. I have only two vscode extensions (eslint, vetur)
Do I have to create another issue ?

@electric-skeptic
Copy link

I'm sure we all have the same symptoms, as of the same version. Opening new issues divides the attention each issue gets, so it seems like we should contribute data to the same issue, otherwise devs get annoyed and close them as duplicates, which even the bot is noticing, or due to lack of further detail. We end up with the situation where people can see dozens of inadequately addressed, closed issues about this problem and are complaining about poor issue moderation instead of contributing to progress on it.
I'll stop trying to help so @mjbvz can pursue it with OP, but I'll definitely abstain from opening another issue about it.

@mjbvz
Copy link
Collaborator

mjbvz commented Aug 20, 2019

Generic problems like this often have multiple different root causes and it is much easier for us to track each one individually. Otherwise we end up in exactly the situation we have now where multiple people chime in with +1 without providing any additional context and it is difficult to track their individual problems or follow up with them properly

So instead of complaining, please open a separate issue and share the logs on it as I requested

@brunoscopelliti
Copy link
Author

I am sorry, I cannot share the log cause it is proprietary code.

@mjbvz
Copy link
Collaborator

mjbvz commented Aug 21, 2019

@brunoscopelliti

  1. Have you configured a custom TypeScript version in your workspace?
  2. Are you loading a file on a network drive?
  3. Does this happen for all projects?
  4. If not, can you provide details on the type of project it does happen for
  5. Can you share the last 20 or so lines of the logs

@brunoscopelliti
Copy link
Author

Have you configured a custom TypeScript version in your workspace?

No

Are you loading a file on a network drive?

No

Does this happen for all projects?

Don't know, at the moment I'm working full time on a single project.

If not, can you provide details on the type of project it does happen for?

React web app, backend is in node

Can you share the last 20 or so lines of the logs

It's not that simple, cause I don't immediately notice the error. But I can try.

@mjbvz
Copy link
Collaborator

mjbvz commented Aug 22, 2019

Can you please try opening some other simple js projects to see if the issue is specific to the project you are working on?

Also, can you share the logs privately with us? Without logs or repo steps, it is not really possible to investigate this effectively

@brunoscopelliti
Copy link
Author

Also, can you share the logs privately with us?

How?
Next time the issue occur to me, I'll consider this option.

@atlefren
Copy link

I have this issue as well (if anyone is interested?)

Occurs in:

Version: 1.37.1 (user setup)
Commit: f06011a
Date: 2019-08-15T16:17:55.855Z
Electron: 4.2.7
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 10.0.18922

Using: WSL 2 with Ubuntu and the remote - WSL extension (0.39.2)

output of log: https://gist.github.com/atlefren/0d261c06fc609d32f43a1c016f8c2921

seems to work sometimes, other times not..

Also tried to reproduce in Insiders, but there the WSL remote is borked atm..

@mjbvz
Copy link
Collaborator

mjbvz commented Aug 26, 2019

@brunoscopelliti You can email them directly or a link to them if they are too large: matb AT microsoft. As I said, we only use the logs to diagnose issues like this

@atlefren
Copy link

Follow up:

Now testing with a fresh install of Insiders (1.38.0-insider) (all config wiped, both on win and wsl side). Code reports ts v 3.6.1-rc, but I've also tried the "workspace version" (3.3.3333).

Everything seemed to work fine untill npm install completed, which immediately triggered the "Initializing js/ts language features" message. I would not say I have an unreasonable amount of dependencies (for a typescript project), about 40 or so..

It seems like the log from ts server has this as its last line:

Info 200 [9:44:16.425] DirectoryWatcher:: Added:: WatchInfo: /mnt/d/code/wadmin/node_modules 1 Project: WatchType: node_modules for closed script infos in them

My guess is that the ts analyzer (or whatever it's called) has a hard time reading all the contents of node_modules due to some issue. Not sure if it's that fact that the folder is large (318 MB), or that WSL2 is slow, or that the disk itself is slow.

One thing worth mentioning is that the folder is on my win drive, mapped to wsl. Things seems to work as expected when I checkout the repo in wsl and run it from there. Thus: my guess is that the issue is related to the combination of a slow wsl2 disk access to a win drive and a (rather) large and complex node_modules

@sankar4n
Copy link

It is possible that you are experienceing this because of microsoft/TypeScript#21136. Thanks @mjbvz!

@atlefren
Copy link

@hisankaran Not sure if this question is directed at me, but unless some of my dependencies downloads this kind of file it is not the case.

@sankar4n
Copy link

@atlefren No, that was a general suggestion for anyone who are landing on this issue. I got the exact same logs that you posted, and my node_modules is excluded for explorer. my test dir had all sorts of sample videos and audios, I tried moving that away from project and it worked. So, may be you should try excluding your node_modules from explorer.

@atlefren
Copy link

@hisankaran I understand.

What do you mean by "excluded for explorer"?

@sankar4n
Copy link

sankar4n commented Sep 20, 2019

Sorry that was confusing. I mean, try watcher.exclude setting.
Screenshot 2019-09-20 at 9 46 37 AM

@atlefren
Copy link

Got you. My watcher exclude is similar to your screenshot, but thanks for the suggestion. In my case I am rather certain that this has something to to with WSL2 interop in some way

@mjbvz
Copy link
Collaborator

mjbvz commented Sep 20, 2019

Closing as we have not heard back from the OP recently and cannot investigate without more information

@mjbvz mjbvz closed this as completed Sep 20, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

6 participants