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

Closed
nikksan opened this issue Mar 5, 2021 · 3 comments
Closed

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

nikksan opened this issue Mar 5, 2021 · 3 comments
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@nikksan
Copy link

nikksan commented Mar 5, 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 (/home/rtg/code/backend/betting-api/node_modules/typescript/lib/tsserver.js:39472:30)
    at ConfiguredProject.Project.enablePlugin (/home/rtg/code/backend/betting-api/node_modules/typescript/lib/tsserver.js:151962:24)
    at ConfiguredProject.enablePluginsWithOptions (/home/rtg/code/backend/betting-api/node_modules/typescript/lib/tsserver.js:152477:30)
    at ProjectService.loadConfiguredProject (/home/rtg/code/backend/betting-api/node_modules/typescript/lib/tsserver.js:154206:25)
    at ProjectService.createAndLoadConfiguredProject (/home/rtg/code/backend/betting-api/node_modules/typescript/lib/tsserver.js:154145:22)
    at ProjectService.createLoadAndUpdateConfiguredProject (/home/rtg/code/backend/betting-api/node_modules/typescript/lib/tsserver.js:154150:36)
    at ProjectService.assignProjectToOpenedScriptInfo (/home/rtg/code/backend/betting-api/node_modules/typescript/lib/tsserver.js:155055:44)
    at /home/rtg/code/backend/betting-api/node_modules/typescript/lib/tsserver.js:155395:97
    at Object.flatMap (/home/rtg/code/backend/betting-api/node_modules/typescript/lib/tsserver.js:513:25)
    at ProjectService.applyChangesInOpenFiles (/home/rtg/code/backend/betting-api/node_modules/typescript/lib/tsserver.js:155395:41)
    at Session.handlers.ts.Map.ts.getEntries._a.<computed> (/home/rtg/code/backend/betting-api/node_modules/typescript/lib/tsserver.js:156413:46)
    at /home/rtg/code/backend/betting-api/node_modules/typescript/lib/tsserver.js:158286:88
    at IOSession.Session.executeWithRequestId (/home/rtg/code/backend/betting-api/node_modules/typescript/lib/tsserver.js:158277:28)
    at IOSession.Session.executeCommand (/home/rtg/code/backend/betting-api/node_modules/typescript/lib/tsserver.js:158286:33)
    at IOSession.Session.onMessage (/home/rtg/code/backend/betting-api/node_modules/typescript/lib/tsserver.js:158310:35)
    at Interface.<anonymous> (/home/rtg/code/backend/betting-api/node_modules/typescript/lib/tsserver.js:160520:27)
    at Interface.emit (events.js:223:5)
    at Interface._onLine (readline.js:315:10)
    at Interface._normalWrite (readline.js:460:12)
    at Socket.ondata (readline.js:172:10)
    at Socket.emit (events.js:223:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at Socket.Readable.push (_stream_readable.js:224:10)
    at Pipe.onStreamRead (internal/stream_base_commons.js:181:23)

VS Code version: Code 1.50.1 (d2e414d, 2020-10-13T14:44:48.716Z)
OS version: Linux x64 4.15.0-135-generic

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz (8 x 3000)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: unavailable_off
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) 4, 3, 2
Memory (System) 15.56GB (5.49GB free)
Process Argv --no-sandbox --unity-launch /home/rtg/code/backend/betting-api --crash-reporter-id 189f02e3-cb9c-4fd8-b3fc-cc12bc3cb72a
Screen Reader no
VM 0%
DESKTOP_SESSION ubuntu
XDG_CURRENT_DESKTOP Unity
XDG_SESSION_DESKTOP ubuntu
XDG_SESSION_TYPE x11
Extensions (22)
Extension Author (truncated) Version
xml Dot 2.5.1
es7-react-js-snippets dsz 3.1.0
tslint eg2 1.0.44
php-debug fel 1.14.0
php-intellisense fel 2.3.14
composer ika 0.7.1
vscode-phpfmt kok 1.0.30
node-module-intellisense lei 1.5.0
vscode-azureresourcegroups ms- 0.3.0
vscode-docker ms- 1.9.0
mssql ms- 1.10.1
python ms- 2021.1.502429796
jupyter ms- 2021.2.576440691
azure-account ms- 0.9.6
typescript-javascript-grammar ms- 0.0.55
subtle-brackets raf 3.0.0
vscode-yaml red 0.16.0
LiveServer rit 5.6.1
code-settings-sync Sha 3.4.3
code-spell-checker str 1.9.2
gitblame wad 6.0.2
vscode-proto3 zxh 0.5.3

(1 theme extensions excluded)

@IllusionMH
Copy link
Contributor

/duplicate of #116219

Please update your VS Code - fix was released 2 versions ago

@github-actions github-actions bot locked and limited conversation to collaborators Apr 19, 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 @nikksan and others