Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Closed
vitalics opened this issue Feb 11, 2021 · 3 comments
Closed

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

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

Comments

@vitalics
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 a typescript project
  2. wait for tsserver

TS Server Log
❗️ Please review and upload this log file to help us diagnose this crash:
/Users/vitaliharadkou/Library/Application Support/Code/logs/20210211T105914/exthost1/vscode.typescript-language-features/tsserver-log-4RjVl8/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 (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:39472:30)
    at ConfiguredProject.Project.enablePlugin (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:151962:24)
    at ConfiguredProject.enablePluginsWithOptions (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:152477:30)
    at ProjectService.loadConfiguredProject (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:154206:25)
    at ProjectService.createAndLoadConfiguredProject (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:154145:22)
    at ProjectService.createLoadAndUpdateConfiguredProject (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:154150:36)
    at ProjectService.assignProjectToOpenedScriptInfo (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:155055:44)
    at /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:155395:97
    at Object.flatMap (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:513:25)
    at ProjectService.applyChangesInOpenFiles (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:155395:41)
    at Session.handlers.ts.Map.ts.getEntries._a.<computed> (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:156413:46)
    at /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:158286:88
    at IOSession.Session.executeWithRequestId (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:158277:28)
    at IOSession.Session.executeCommand (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:158286:33)
    at IOSession.Session.onMessage (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:158310:35)
    at Interface.<anonymous> (/Applications/Visual Studio Code.app/Contents/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:35:15.302Z)
OS version: Darwin x64 20.3.0

System Info
Item Value
CPUs Intel(R) Core(TM) i5-8257U CPU @ 1.40GHz (8 x 1400)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 42, 16, 10
Memory (System) 16.00GB (0.16GB free)
Process Argv --crash-reporter-id 4cbc8c42-5515-4350-8df1-9fbbdfdd5e92
Screen Reader no
VM 0%
Extensions (72)
Extension Author (truncated) Version
cucumberautocomplete ale 2.15.1
aws-toolkit-vscode ama 1.20.0
icons-carbon ant 0.0.6
swagger-viewer Arj 3.0.1
atlascode atl 2.8.5
docs-view bie 0.0.9
markdown-preview-github-styles bie 0.1.6
bracket-pair-colorizer-2 Coe 0.2.0
vscode-mocha Com 0.1.1
vscode-svgviewer css 2.0.0
vscode-eslint dba 2.1.14
python-extension-pack don 1.6.0
vscode-wasm dts 1.3.1
gitlens eam 11.2.1
vscode-great-icons emm 2.1.64
vsc-material-theme-icons equ 1.2.2
prettier-vscode esb 5.9.1
nasc-touchbar fel 1.12.0
vscode-firefox-debug fir 2.9.1
shell-format fox 7.0.1
vscode-pull-request-github Git 0.23.0
cloudcode goo 1.8.0
vscode-mocha-test-adapter hbe 2.9.1
vscode-test-explorer hbe 2.19.5
vscode-drawio hed 1.3.0
rest-client hum 0.24.4
vscode-wasm-essentials jcm 0.1.0
vscode-wasm-syntax-lite jcm 0.3.0
vscode-peacock joh 3.9.1
chat kar 0.35.0
kite kit 0.138.0
vscode-js-annotations lan 0.11.0
MagicPython mag 1.1.0
vscode-typescript-to-json-schema mar 0.0.13
git-graph mhu 1.28.0
fluent-icons mig 0.0.5
dotenv mik 1.0.1
theme-monokai-pro-vscode mon 1.1.18
vscode-docker ms- 1.9.1
vscode-kubernetes-tools ms- 1.2.4
python ms- 2021.1.502429796
vscode-pylance ms- 2021.2.1
jupyter ms- 2020.12.414227025
remote-containers ms- 0.158.0
hexeditor ms- 1.4.0
js-debug-nightly ms- 2021.2.1017
vscode-js-profile-flame ms- 0.0.14
vscode-typescript-tslint-plugin ms- 1.3.3
vsliveshare ms- 1.0.3629
vsliveshare-audio ms- 0.1.91
vsliveshare-pack ms- 0.4.0
debugger-for-chrome msj 4.12.12
autodocstring njp 0.5.4
docthis oou 0.8.2
vscode-versionlens pfl 1.0.9
material-icon-theme PKi 4.5.0
material-product-icons PKi 1.0.1
polacode pnp 0.3.4
vscode-data-preview Ran 2.2.0
vscode-xml red 0.15.0
vscode-yaml red 0.15.0
LiveServer rit 5.6.1
robotframework-lsp rob 0.7.1
vscode-spotify shy 3.2.1
rf-intellisense Tom 2.8.0
pdf tom 1.1.0
vscode-rf-formatter tum 0.1.0
vscodeintellicode Vis 1.2.11
vscode-icons vsc 11.1.0
vscode-wakatime Wak 5.0.0
vscode-icons-mac way 7.25.3
vscode-import-cost wix 2.15.0

(1 theme extensions excluded)

A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30211402
pythonvsdeb440:30248342
pythonvsded773:30248341
pythonvspyt600cf:30251589

@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
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

3 participants
@IllusionMH @vitalics and others