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

Closed
levani opened this issue Feb 9, 2021 · 10 comments · Fixed by microsoft/TypeScript#42717
Closed

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

levani opened this issue Feb 9, 2021 · 10 comments · Fixed by microsoft/TypeScript#42717
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release upstream Issue identified as 'upstream' component related (exists outside of VS Code) verified Verification succeeded

Comments

@levani
Copy link

levani commented Feb 9, 2021

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.
2.
3.

TS Server Log
❗️Server logging disabled. To help us fix crashes like this, please enable logging by setting:

"typescript.tsserver.log": "verbose"

After enabling this setting, future crash reports will include the server log.

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) i9-9980HK CPU @ 2.40GHz (16 x 2400)
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) 3, 3, 3
Memory (System) 32.00GB (1.91GB free)
Process Argv --crash-reporter-id c98f3a22-2ed7-43bf-89fe-cd320d76ddb2
Screen Reader no
VM 0%
Extensions (24)
Extension Author (truncated) Version
bracket-pair-colorizer Coe 1.0.61
vscode-eslint dba 2.1.14
gitlens eam 11.2.1
json-tools eri 1.0.2
auto-close-tag for 0.5.10
code-runner for 0.11.2
vscode-graphql Gra 0.3.15
todo-tree Gru 0.0.196
rest-client hum 0.24.4
vscode-peacock joh 3.9.1
vscode-styled-components jpo 1.5.0
git-graph mhu 1.28.0
dotenv mik 1.0.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
debugger-for-chrome msj 4.12.12
vscode-react-native msj 1.3.0
code-spell-checker str 1.10.2
vscodeintellicode Vis 1.2.11
vscode-icons vsc 11.1.0
material-theme zhu 3.9.13
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspyt653:30253241
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30211402
pythonvsdeb440:30248342
pythonvsded773:30248341
pythonvspyt875:30251590

@mjbvz mjbvz self-assigned this Feb 9, 2021
@mjbvz
Copy link
Contributor

mjbvz commented Feb 9, 2021

@sheetalkamat @DanielRosenwasser This looks like it may be related to the changes in 4.1.4

@sheetalkamat
Copy link
Member

What is tsconfig file? Plugin needs to have name. so we are not checking for undefined name but we could

@daniel-white
Copy link

@mjbvz
Copy link
Contributor

mjbvz commented Feb 9, 2021

@sheetalkamat #116233 has a server log. I think the issue are entries like this:

"plugins": [
   {
    "transform": "rbxts-transformer-t"
   },
   {
    "transform": "rbxts-transform-env"
   }
  ],

@mjbvz mjbvz added the candidate Issue identified as probable candidate for fixing in the next release label Feb 9, 2021
@mjbvz mjbvz added this to the January 2021 Recovery 2 milestone Feb 9, 2021
sheetalkamat added a commit to microsoft/TypeScript that referenced this issue Feb 9, 2021
sheetalkamat added a commit to microsoft/TypeScript that referenced this issue Feb 9, 2021
sheetalkamat added a commit to microsoft/TypeScript that referenced this issue Feb 9, 2021
sheetalkamat added a commit to microsoft/TypeScript that referenced this issue Feb 9, 2021
sheetalkamat added a commit to microsoft/TypeScript that referenced this issue Feb 9, 2021
sheetalkamat added a commit to microsoft/TypeScript that referenced this issue Feb 9, 2021
sheetalkamat added a commit to microsoft/TypeScript that referenced this issue Feb 9, 2021
sheetalkamat added a commit to microsoft/TypeScript that referenced this issue Feb 9, 2021
sheetalkamat added a commit to microsoft/TypeScript that referenced this issue Feb 9, 2021
sheetalkamat added a commit to microsoft/TypeScript that referenced this issue Feb 9, 2021
sheetalkamat added a commit to microsoft/TypeScript that referenced this issue Feb 9, 2021
sheetalkamat added a commit to microsoft/TypeScript that referenced this issue Feb 9, 2021
@HolgerJeromin
Copy link

This will not get in a TS 3.9.x hotfix?
@sheetalkamat @DanielRosenwasser

@DanielRosenwasser
Copy link
Member

3.9.9 should have the fix - are you not seeing that?

@HolgerJeromin
Copy link

3.9.9 should have the fix - are you not seeing that?

I was on my mobile browser and too blind to find the release. Sorry for the noise and thanks a lot!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release upstream Issue identified as 'upstream' component related (exists outside of VS Code) verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants