microsoft / microsoft/vscode-languageserver-node

`finally` is not a function error hit with `_getServerWorkingDir`

Open
#1,653 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
1.8k
Forks
404
Avg merge
2d 8h
Merged PRs (30d)
14

Description

TypeError this._getServerWorkingDir(...).then(...).finally is not a function 
    extension.js:1:395787 d.createMessageTransports
    extension.js:1:226888 d.createConnection
    extension.js:1:217342 d.start
    extension.js:1:130234 _

https://github.com/microsoft/vscode-languageserver-node/blob/df56e720c01c6e2d7873733807418f6ce33187ad/client/src/node/main.ts#L573-L589

I see this error in the telemetry of our VS Code extension. If I try to search the error on the Internet, I can find a single StackOverflow post talking about the same thing. I have looked at the code and tried writing a small JavaScript program but can't quite figure out in what case this might happen. We are on 9.0.1 of vscode-languageclient.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with client/src/node/main.ts lines 573-589 and inspect the _getServerWorkingDir promise chain, then compare it with the reported vscode-languageclient 9.0.1 environment. Reproduce the error in the affected runtime or extension context and establish which condition yields a value without finally; done means the cause is confirmed and the failure is prevented or covered by an appropriate regression check.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.