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

Deno LSP panicks if VSCode window has unsaved newly created TypeScript files #27551

Open
kLiHz opened this issue Jan 4, 2025 · 1 comment
Open

Comments

@kLiHz
Copy link

kLiHz commented Jan 4, 2025

Version: Deno 2.1.4 (stable and canary)

How to reproduce:

  • Install Deno
  • Install Deno extension in Visual Studio Code (either stable or insider)
  • Create a new window in Visual Studio Code
  • Create a file (e.g click "New File")
  • Set file source type (e.g. click "Select a language") to "TypeScript"
  • Got "The Deno Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information."

The output:

Starting Deno language server...
  version: 2.1.4+7cabd02 (release, x86_64-pc-windows-msvc)
  executable: C:\Users\Henry\.deno\bin\deno.EXE
Connected to "Visual Studio Code" 1.96.2
Enabling import suggestions for: https://deno.land
Refreshing configuration tree...

============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.

Platform: windows x86_64
Version: 2.1.4+7cabd02
Args: ["C:\\Users\\Henry\\.deno\\bin\\deno.EXE", "lsp"]

thread 'main' panicked at C:\a\deno\deno\resolvers\node\package_json.rs:69:41:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[Info  - 1:04:38 PM] Connection to server got closed. Server will restart.

(duaplicated outputs omitted...)

[Error - 1:04:39 PM] The Deno Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
Error retrieving config tasks: Error: Client is not running
Screenshot

image

I first encountered this bug a while ago, but at that time I couldn't locate its cause. Recently I just accidentally found the way to reproduce it so I'm filing this issue.

@kLiHz
Copy link
Author

kLiHz commented Jan 10, 2025

With RUST_BACKTRACE=1 it still didn't give much information, and with RUST_BACKTRACE=full:

Starting Deno language server...
  version: 2.1.4+7cabd02 (release, x86_64-pc-windows-msvc)
  executable: C:\Users\Henry\.deno\bin\deno.EXE
Connected to "Visual Studio Code - Insiders" 1.97.0-insider
Enabling import suggestions for: https://deno.land
Refreshing configuration tree...

============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.

Platform: windows x86_64
Version: 2.1.4+7cabd02
Args: ["C:\\Users\\Henry\\.deno\\bin\\deno.EXE", "lsp"]

thread 'main' panicked at C:\a\deno\deno\resolvers\node\package_json.rs:69:41:
called `Option::unwrap()` on a `None` value
stack backtrace:
   0:     0x7ff7b95506e5 - node_api_get_module_file_name
   1:     0x7ff7b7ca9e69 - uv_mutex_destroy
   2:     0x7ff7b952bd97 - node_api_get_module_file_name
   3:     0x7ff7b9553fa1 - node_api_get_module_file_name
   4:     0x7ff7b9553b0d - node_api_get_module_file_name
   5:     0x7ff7b7b12cf6 - uv_mutex_destroy
   6:     0x7ff7b9554acb - node_api_get_module_file_name
   7:     0x7ff7b955493f - node_api_get_module_file_name
   8:     0x7ff7b95548cf - node_api_get_module_file_name
   9:     0x7ff7b95548b6 - node_api_get_module_file_name
  10:     0x7ff7bb053164 - CrashForExceptionInNonABICompliantCodeRange
  11:     0x7ff7bb05321d - CrashForExceptionInNonABICompliantCodeRange
  12:     0x7ff7bb05365e - CrashForExceptionInNonABICompliantCodeRange
  13:     0x7ff7b716a43d - uv_mutex_destroy
  14:     0x7ff7b716a2a6 - uv_mutex_destroy
  15:     0x7ff7b7152ac1 - uv_mutex_destroy
  16:     0x7ff7b7152bb5 - uv_mutex_destroy
  17:     0x7ff7b782fd3b - uv_mutex_destroy
  18:     0x7ff7b782fa65 - uv_mutex_destroy
  19:     0x7ff7b7828cb5 - uv_mutex_destroy
  20:     0x7ff7b7b3819a - uv_mutex_destroy
  21:     0x7ff7b71939bf - uv_mutex_destroy
  22:     0x7ff7b76a3fab - uv_mutex_destroy
  23:     0x7ff7b74b2306 - uv_mutex_destroy
  24:     0x7ff7b74b2306 - uv_mutex_destroy
  25:     0x7ff7b714f91a - uv_mutex_destroy
  26:     0x7ff7b7afa541 - uv_mutex_destroy
  27:     0x7ff7b7294f05 - uv_mutex_destroy
  28:     0x7ff7b7bcdf75 - uv_mutex_destroy
  29:     0x7ff7b7460ce4 - uv_mutex_destroy
  30:     0x7ff7b7b14e45 - uv_mutex_destroy
  31:     0x7ff7b7279d1c - uv_mutex_destroy
  32:     0x7ff7b7bce057 - uv_mutex_destroy
  33:     0x7ff7bafed1fc - CrashForExceptionInNonABICompliantCodeRange
  34:     0x7ff8355b7374 - BaseThreadInitThunk
  35:     0x7ff8360dcc91 - RtlUserThreadStart
[Info  - 12:02:17 AM] Connection to server got closed. Server will restart.

(duaplicated outputs omitted...)

@kLiHz kLiHz changed the title Deno keep panicks on VSCode window with an unsaved new TypeScript file Deno LSP panicks if VSCode window has unsaved newly created TypeScript files Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant