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

Affected by vscode/issues/144962 #31

Closed
perrito666 opened this issue Apr 1, 2022 · 4 comments
Closed

Affected by vscode/issues/144962 #31

perrito666 opened this issue Apr 1, 2022 · 4 comments

Comments

@perrito666
Copy link

This extension seems to be affected by:

microsoft/vscode#144962

[Extension Host] - error while downloading latest XXXX TypeError: The "streams" argument must be specified
	at new NodeError (node:internal/errors:371:5)
	at pipelineImpl (node:internal/streams/pipeline:181:11)
	at node:stream/promises:26:5
	at new Promise (<anonymous>)
	at Object.pipeline [as pipelineAsync] (node:stream/promises:17:10)
	at d.<anonymous> (c:\Users\With Space\.vscode\extensions\mindaro-dev.file-downloader-1.0.11\dist\extension.js:1:39546)
	at Generator.next (<anonymous>)
	at s (c:\Users\With Space\.vscode\extensions\mindaro-dev.file-downloader-1.0.11\dist\extension.js:1:38253)
	at processTicksAndRejections (node:internal/process/task_queues:96:5)

the relevant snippet, from our extension, in TS

import { getApi, FileDownloader } from '@microsoft/vscode-file-downloader-api';

// [...]

    const progressCallback = (
          downloadedBytes: number,
          totalBytes: number | undefined,
        ) => {
          if (this._output) {
            this._output(
              `Downloaded ${downloadedBytes}/${totalBytes}% of LSP`,
              80,
            );
          }
          console.log(`Downloaded ${downloadedBytes}/${totalBytes}% of LSP`);
        };

        // download new binary
        const xxxFilePath = DL_ROOT_URI + xxxFileName;
        getApi()
          .then((fileDownloader: FileDownloader) => {
            fileDownloader
              .downloadFile(
                Uri.parse(xxxFilePath),
               xxxFileName,
                extensionContext,
                cancellationToken,
                progressCallback,
              )
@Gaming32
Copy link

Gaming32 commented Apr 2, 2022

This could be fixed by adding the workaround from NaturalCycles/nodejs-lib@3640c12 to src/utility/Stream.ts.

@pcj
Copy link

pcj commented Apr 21, 2022

Seeing this as well. This is a big problem for extensions that depend on this one. Any update?

daniv-msft added a commit that referenced this issue Apr 22, 2022
fix(#31): workaround from Gaming32 + updated dependencies
@daniv-msft
Copy link
Collaborator

Sorry for the slow reply. The PR looks good, thanks @prb28. We'll trigger a new deployment early next week to reduce potential risks before the weekend.

@daniv-msft
Copy link
Collaborator

The fix was released earlier this afternoon. Thanks again @prb28! I'm closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants