Skip to content

Cannot read property 'length' of undefined #18188

@lukasz-karolewski

Description

@lukasz-karolewski

VS Code version

1.63.1

Extension version

2021.12.1559732655

OS type

Windows

OS version

windows 11 fully updated, running wsl 2 on ubuntu 20.10, running remote container extension using python image

Python distribution

python.org

Python version

3.9.9

Language server

Pylance

Expected behaviour

ideally python extension doesn't crash, and it worked before

Actual behaviour

[renderer1] [error] Cannot read property 'length' of undefined: TypeError: Cannot read property 'length' of undefined
at /root/.vscode-server/extensions/ms-python.python-2021.12.1559732655/out/client/extension.js:67:257359
at p (/root/.vscode-server/extensions/ms-python.python-2021.12.1559732655/out/client/extension.js:67:262355)
at async z.provideCompletionItems (/root/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/out/vs/server/remoteExtensionHostProcess.js:95:101516)

Steps to reproduce

is triggered by code suggestions with any python code and then it crashes the extension.

in a new window, new file type from datetime import and trigger code suggestion, no suggestions are show and extension is crashed

Also found this microsoft/vscode#110467 but i don't have two versions installed at the same time, and I've checked inside the container too.

Logs

[Info - 7:21:53 AM] Pylance language server 2021.12.2 (pyright 211ebe44) starting
[Info - 7:21:53 AM] Server root directory: /root/.vscode-server/extensions/ms-python.vscode-pylance-2021.12.2/dist
[Info - 7:21:53 AM] No configuration file found.
[Info - 7:21:53 AM] No pyproject.toml file found.
[Info - 7:21:53 AM] Setting pythonPath for service "workspace": "/usr/local/bin/python"
[Warn - 7:21:53 AM] stubPath /workspace/typings is not a valid directory.
[Info - 7:21:53 AM] Assuming Python version 3.9
[Info - 7:21:53 AM] Assuming Python platform Linux
[Warn - 7:21:53 AM] Exception received when installing file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Warn - 7:21:53 AM] Exception received when installing file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Warn - 7:21:53 AM] Exception received when installing file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Info - 7:21:53 AM] Searching for source files
[Info - 7:21:53 AM] Found 220 source files
[Info - 7:21:53 AM] Background analysis(1) root directory: /root/.vscode-server/extensions/ms-python.vscode-pylance-2021.12.2/dist
[Info - 7:21:53 AM] Background analysis(1) started

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

area-editor-*User-facing catch-allbugIssue identified by VS Code Team member as probable bugregressionBug didn't exist in a previous releaseverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions