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

TS Server fatal error: Cannot read property 'indexOf' of undefined #116439

Closed
VincentH375 opened this issue Feb 11, 2021 · 2 comments
Closed

TS Server fatal error: Cannot read property 'indexOf' of undefined #116439

VincentH375 opened this issue Feb 11, 2021 · 2 comments
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@VincentH375
Copy link

Issue Type: Bug

TypeScript Version: 4.1.4

Steps to reproduce crash

  1. Start VSCode
  2. Open a .tsx file
  3. The TS server tries to start and then came with the message : The TypeScript language service died 5 times right after it got started. The service will not be restarted.

TS Server Log
attached

TS Server Error Stack
Server: semantic

TypeError: Cannot read property 'indexOf' of undefined
    at Object.parsePackageName (c:\Users\username\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:39472:30)
    at ConfiguredProject.Project.enablePlugin (c:\Users\username\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:151962:24)
    at ConfiguredProject.enablePluginsWithOptions (c:\Users\username\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:152477:30)
    at ProjectService.loadConfiguredProject (c:\Users\username\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:154206:25)
    at ProjectService.createAndLoadConfiguredProject (c:\Users\username\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:154145:22)
    at ProjectService.createLoadAndUpdateConfiguredProject (c:\Users\username\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:154150:36)
    at ProjectService.assignProjectToOpenedScriptInfo (c:\Users\username\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:155055:44)
    at c:\Users\username\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:155395:97
    at Object.flatMap (c:\Users\username\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:513:25)
    at ProjectService.applyChangesInOpenFiles (c:\Users\username\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:155395:41)
    at Session.handlers.ts.Map.ts.getEntries._a.<computed> (c:\Users\username\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:156413:46)
    at c:\Users\username\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:158286:88
    at IOSession.Session.executeWithRequestId (c:\Users\username\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:158277:28)
    at IOSession.Session.executeCommand (c:\Users\username\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:158286:33)
    at IOSession.Session.onMessage (c:\Users\username\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:158310:35)
    at Interface.<anonymous> (c:\Users\username\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:160520:27)
    at Interface.emit (events.js:315:20)
    at Interface._onLine (readline.js:329:10)
    at Interface._normalWrite (readline.js:474:12)
    at Socket.ondata (readline.js:186:10)
    at Socket.emit (events.js:315:20)
    at addChunk (_stream_readable.js:295:12)
    at readableAddChunk (_stream_readable.js:271:9)
    at Socket.Readable.push (_stream_readable.js:212:10)
    at Pipe.onStreamRead (internal/stream_base_commons.js:186:23)

VS Code version: Code 1.53.1 (5d424b8, 2021-02-08T23:29:42.785Z)
OS version: Windows_NT x64 10.0.19042

System Info
Item Value
CPUs Intel(R) Core(TM) i7-4712MQ CPU @ 2.30GHz (8 x 2295)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.88GB (9.04GB free)
Process Argv --crash-reporter-id ce43acf3-9c7d-4ce9-9822-2d01431bfd63
Screen Reader no
VM 0%
Extensions (11)
Extension Author (truncated) Version
insertnumbers Asu 0.9.1
emojisense bie 0.8.0
simple-react-snippets bur 1.2.3
vscode-eslint dba 2.1.14
es7-react-js-snippets dsz 3.1.0
prettier-vscode esb 5.9.1
code-runner for 0.11.2
emoji-code idl 0.10.0
node-debug2 ms- 1.42.5
debugger-for-chrome msj 4.12.12
vscode-react-native msj 1.4.0
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30211401
vstry914:30250197
pythonvsdeb440:30248342
pythonvsded773:30248341
vstes516:30244333
pythonvspyt875:30251590

tsserver.log

@IllusionMH
Copy link
Contributor

/duplicate of #116219
Fix should go out with VS Code 1.53.2

@github-actions github-actions bot locked and limited conversation to collaborators Mar 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

3 participants
@IllusionMH @VincentH375 and others