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

Cannot read properties of undefined (reading 'charCount') #59956

Open
ulugbekna opened this issue Sep 13, 2024 · 1 comment
Open

Cannot read properties of undefined (reading 'charCount') #59956

ulugbekna opened this issue Sep 13, 2024 · 1 comment
Labels
Needs More Info The issue still hasn't been fully clarified

Comments

@ulugbekna
Copy link

πŸ”Ž Search Terms

undefined (reading 'charCount')

πŸ•— Version & Regression Information

TS nightly v5.7.20240912

⏯ Playground Link

No response

πŸ’» Code

// Your code here

πŸ™ Actual behavior

Error in dev console

mainThreadExtensionService.ts:79 Error: <diagnostics> TypeScript Server Error (5.7.0-dev.20240912)
Cannot read properties of undefined (reading 'charCount')
TypeError: Cannot read properties of undefined (reading 'charCount')
    at _LineNode.walk (/Users/ulugbekna/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-5.7.20240912/node_modules/typescript/lib/typescript.js:194226:30)
    at _LineIndex.edit (/Users/ulugbekna/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-5.7.20240912/node_modules/typescript/lib/typescript.js:194126:17)
    at _ScriptVersionCache._getSnapshot (/Users/ulugbekna/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-5.7.20240912/node_modules/typescript/lib/typescript.js:193932:31)
    at _ScriptVersionCache.lineOffsetToPosition (/Users/ulugbekna/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-5.7.20240912/node_modules/typescript/lib/typescript.js:193951:17)
    at TextStorage.lineOffsetToPosition (/Users/ulugbekna/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-5.7.20240912/node_modules/typescript/lib/typescript.js:183664:22)
    at ScriptInfo.lineOffsetToPosition (/Users/ulugbekna/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-5.7.20240912/node_modules/typescript/lib/typescript.js:183979:29)
    at /Users/ulugbekna/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-5.7.20240912/node_modules/typescript/lib/typescript.js:190847:40
    at mapDefinedIterator (/Users/ulugbekna/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-5.7.20240912/node_modules/typescript/lib/typescript.js:2600:19)
    at mapDefinedIterator.next (<anonymous>)
    at _ProjectService.applyChangesToFile (/Users/ulugbekna/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-5.7.20240912/node_modules/typescript/lib/typescript.js:189645:16)
    at _ProjectService.applyChangesInOpenFiles (/Users/ulugbekna/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-5.7.20240912/node_modules/typescript/lib/typescript.js:189606:14)
    at updateOpen (/Users/ulugbekna/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-5.7.20240912/node_modules/typescript/lib/typescript.js:190836:29)
    at /Users/ulugbekna/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-5.7.20240912/node_modules/typescript/lib/typescript.js:193504:15
    at IpcIOSession.executeWithRequestId (/Users/ulugbekna/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-5.7.20240912/node_modules/typescript/lib/typescript.js:193493:14)
    at IpcIOSession.executeCommand (/Users/ulugbekna/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-5.7.20240912/node_modules/typescript/lib/typescript.js:193502:29)
    at IpcIOSession.onMessage (/Users/ulugbekna/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-5.7.20240912/node_modules/typescript/lib/typescript.js:193550:68)
    at process.<anonymous> (/Users/ulugbekna/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-5.7.20240912/node_modules/typescript/lib/tsserver.js:525:14)
    at process.emit (node:events:519:28)
    at emit (node:internal/child_process:951:14)
    at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
    at Function.create (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/typescript-language-features/dist/extension.js:1:473825)
    at v.dispatchResponse (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/typescript-language-features/dist/extension.js:1:467795)
    at v.dispatchMessage (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/typescript-language-features/dist/extension.js:1:466593)
    at ChildProcess.<anonymous> (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/typescript-language-features/dist/extension.js:1:466086)
    at ChildProcess.emit (node:events:519:28)
    at ChildProcess.emit (node:domain:488:12)
    at emit (node:internal/child_process:951:14)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)

πŸ™‚ Expected behavior

Doesn't throw

Additional information about the issue

No response

@Andarist
Copy link
Contributor

This is not an actionable issue. Please provide some repro case - ideally a short, self-contained, one.

@RyanCavanaugh RyanCavanaugh added the Needs More Info The issue still hasn't been fully clarified label Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs More Info The issue still hasn't been fully clarified
Projects
None yet
Development

No branches or pull requests

3 participants