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 #116229

Closed
EdNutting opened this issue Feb 9, 2021 · 3 comments
Closed

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

EdNutting opened this issue Feb 9, 2021 · 3 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@EdNutting
Copy link

Issue Type: Bug

❗️❗️❗️ Please fill in the sections below to help us diagnose the issue ❗️❗️❗️

TypeScript Version: 4.1.4

Steps to reproduce crash

  1. Open VSCode
  2. Open any typescript file

TS Server Log
❗️ Please review and upload this log file to help us diagnose this crash:
c:\Users\Edward\AppData\Roaming\Code\logs\20210209T200644\exthost1\vscode.typescript-language-features\tsserver-log-8FuB3K\tsserver.log
The log file may contain personal data, including full paths and source code from your workspace. You can scrub the log file to remove paths or other personal information.

TS Server Error Stack
Server: semantic

TypeError: Cannot read property 'indexOf' of undefined
    at Object.parsePackageName (c:\Program Files\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:39472:30)
    at ConfiguredProject.Project.enablePlugin (c:\Program Files\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:151962:24)
    at ConfiguredProject.enablePluginsWithOptions (c:\Program Files\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:152477:30)
    at ProjectService.loadConfiguredProject (c:\Program Files\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:154206:25)
    at ProjectService.createAndLoadConfiguredProject (c:\Program Files\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:154145:22)
    at ProjectService.createLoadAndUpdateConfiguredProject (c:\Program Files\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:154150:36)
    at ProjectService.assignProjectToOpenedScriptInfo (c:\Program Files\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:155055:44)
    at c:\Program Files\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:155395:97
    at Object.flatMap (c:\Program Files\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:513:25)
    at ProjectService.applyChangesInOpenFiles (c:\Program Files\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:155395:41)
    at Session.handlers.ts.Map.ts.getEntries._a.<computed> (c:\Program Files\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:156413:46)
    at c:\Program Files\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:158286:88
    at IOSession.Session.executeWithRequestId (c:\Program Files\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:158277:28)
    at IOSession.Session.executeCommand (c:\Program Files\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:158286:33)
    at IOSession.Session.onMessage (c:\Program Files\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:158310:35)
    at Interface.<anonymous> (c:\Program Files\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.19041

System Info
Item Value
CPUs Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz (8 x 4008)
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.95GB (5.11GB free)
Process Argv --crash-reporter-id f4e668a8-79a8-4123-add5-f7ce34822cd3
Screen Reader no
VM 0%
Extensions (25)
Extension Author (truncated) Version
vscode-css-formatter aes 1.0.1
vscode-color ans 0.4.5
markdown-preview-github-styles bie 0.1.6
vscode-eslint dba 2.1.14
prettier-vscode esb 5.9.1
vscode-pull-request-github Git 0.23.0
vscode-graphql Gra 0.3.15
todo-tree Gru 0.0.196
vscode-test-explorer hbe 2.19.5
vscode-guid hea 1.4.20
vscode-docker ms- 1.9.1
remote-containers ms- 0.158.0
remote-ssh ms- 0.63.0
remote-ssh-edit ms- 0.63.0
remote-wsl ms- 0.53.3
vscode-remote-extensionpack ms- 0.20.0
vsliveshare ms- 1.0.3629
vsliveshare-audio ms- 0.1.91
vsliveshare-pack ms- 0.4.0
vscode-xml red 0.15.0
vscode-yaml red 0.14.0
rewrap stk 1.13.0
html-preview-vscode tht 0.2.5
pdf tom 1.1.0
selectline-statusbar tom 0.0.2
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30211401
vstry914:30250197
pythonvsdeb440:30248342
pythonvsded773:30248341
pythonvspyt875:30251590

@EdNutting
Copy link
Author

EdNutting commented Feb 9, 2021

@danielwhite-aws
Copy link

TypeScript 4.1.4 now can make an additional call to parsePackageName - microsoft/TypeScript#42712 - that apparently isn't appropriately guarded and throws.

@mjbvz
Copy link
Contributor

mjbvz commented Feb 9, 2021

Duplicate of #116219

@mjbvz mjbvz marked this as a duplicate of #116219 Feb 9, 2021
@mjbvz mjbvz closed this as completed Feb 9, 2021
@mjbvz mjbvz added the *duplicate Issue identified as a duplicate of another issue(s) label Feb 9, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Mar 26, 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