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

VS Code extension causing JS/TS language service crashes last couple of days #2489

Open
ahkelly opened this issue Sep 6, 2024 · 4 comments
Labels
awaiting submitter bug Something isn't working

Comments

@ahkelly
Copy link

ahkelly commented Sep 6, 2024

Describe the bug

type intellisense is perpetually in "loading state" and the VS code typescript plugin is repeatedly crashing returning ultimately the following notice.

"The JS/TS language service crashed 5 times in the last 5 Minutes. This may be caused by a plugin contributed by one of these extensions: svelte.svelte-vscode Please try disabling these extensions before filing an issue against VS Code."

image

image

Reproduction

Install vs code in wsl ubuntu and a normal svelte install with default options (svelte 4) using javascript with JSDoc checking.

jsconfig.json

{
	"extends": "./.svelte-kit/tsconfig.json",
	"compilerOptions": {
		"allowJs": true,
		"checkJs": true,
		"esModuleInterop": true,
		"forceConsistentCasingInFileNames": true,
		"resolveJsonModule": true,
		"skipLibCheck": true,
		"sourceMap": true,
		"strict": true,
		"moduleResolution": "bundler"
	}
	// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
	// except $lib which is handled by https://kit.svelte.dev/docs/configuration#files
	//
	// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
	// from the referenced tsconfig.json - TypeScript does not merge them in
}

Expected behaviour

Normal behaviour is the language server not crashing in vs code.

System Info

  • OS: WSL: Ubuntu-22.04
  • IDE: VSCode
  • svelte-vscode v109.0.0

Which package is the issue about?

Svelte for VS Code extension

Additional Information, eg. Screenshots

No response

@ahkelly ahkelly added the bug Something isn't working label Sep 6, 2024
@jasonlyu123
Copy link
Member

I can't reproduce this can you follow this instruction to get the log of TSServer and see if there is any error in it? https://github.com/microsoft/TypeScript/wiki/Getting-logs-from-TS-Server-in-VS-Code

@ahkelly
Copy link
Author

ahkelly commented Sep 7, 2024

Hallelujah! I believe I have found the culprit. I took a look at any major changes I may have made in last few days that could have also contributed to it and I remembered I started integrating google cloud apis into our application which I disabled because at build time I was getting the ugly circular reference node error as mentioned and unresolved here

googleapis/google-auth-library-nodejs#1539

I reverted my code but left the packages installed so I could get back to this once finding a resolution. These packages (all from google) were

  • @google-analytics/data
  • googleapis
  • @googleapis/searchconsole

I removed them today completely and restarted vs code and presto problem solved so they were clashing with this extension (not sure which one or all of them)

@jasonlyu123
Copy link
Member

I still can't reproduce the problem with all three libraries installed. But seems like you have solved your issue so I'll close this in a few days if there is no further info we can investigate.

@ahkelly
Copy link
Author

ahkelly commented Sep 10, 2024

OK, So the issue does still pop-up from time to time but not always like it was before I uninstalled the aforementioned packages.
The only somewhat consistent thing I can see that "may" be the cause is that whenever I have some invalid JavaScript code (invalid expression or function for example) this seems to trigger the freak out if I leave the code uncorrected for an extended period of time.

Info 1319 [15:38:25.490] Starting updateGraphWorker: Project: /home/andrewk/sites/cj-app-sveltekit/jsconfig.json
Err 1320  [15:38:25.490] Exception on executing command {
  "seq": 119,
  "type": "request",
  "command": "quickinfo",
  "arguments": {
    "file": "/home/andrewk/sites/cj-app-sveltekit/src/routes/app/api/report/purchase_order/+server.js",
    "line": 21,
    "offset": 28
  }
}:

    Debug Failure. False expression.

Sounds like it may be something unique to my installation so probably not worth looking any further until I can reliably find more reproduction steps and I am not going to spam you with the tons of log data that has been generated as most of it is INFO lines and I don't see much in there that stands out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting submitter bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants