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

Buffer deprecated warning #136874

Closed
alyssajotice opened this issue Nov 10, 2021 · 14 comments
Closed

Buffer deprecated warning #136874

alyssajotice opened this issue Nov 10, 2021 · 14 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug proxy Issues regarding network proxies verified Verification succeeded
Milestone

Comments

@alyssajotice
Copy link

alyssajotice commented Nov 10, 2021

Does this issue occur when all extensions are disabled?: Yes

Version: 1.63.0-insider (user setup)
Commit: a7104f1
Date: 2021-11-08T05:14:49.440Z
Electron: 13.5.1
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.22000

Steps to Reproduce:

  1. Run VS Code or VS Code Insiders with the flag --disable-extensions
  2. Observe developer tools console

Expected: No error messages or warnings

Actual: (node:22768) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.(Use Code - Insiders --trace-deprecation ... to show where the warning was created).

Running code-insiders --trace-deprecation results in this message: Warning: 'trace-deprecation' is not in the list of known options, but still passed to Electron/Chromium.

According to one of Live Share's commenters, this is where the issue may be coming from: microsoft/live-share#3331 (comment)

image

@mrnossiom
Copy link
Contributor

mrnossiom commented Nov 10, 2021

Try to pass --trace-deprecation as an NODE_OPTION. Like this:

$env:NODE_ENV="--trace-deprecation" code-insiders
// The dollar goes with the command...

I saw you were on Windows, but for Linux it is just NODE_OPTIONS="--trace-deprecation" code-insiders

@alyssajotice
Copy link
Author

$ set NODE_ENV="--trace-deprecation" code-insiders
$ NODE_ENV="--trace-deprecation" code-insiders
$ set NODE_OPTION="--trace-deprecation" code-insiders
$ code-insiders --trace-deprecation
Warning: 'trace-deprecation' is not in the list of known options, but still passed to Electron/Chromium.

Is there something else I should try?

@mrnossiom
Copy link
Contributor

Well if any of these don't work, idk.

@weinand weinand removed their assignment Nov 10, 2021
@bpasero
Copy link
Member

bpasero commented Nov 10, 2021

Probably #82524

@sandy081
Copy link
Member

I do not think it is related to #82524 because in the other, warning is shown only while installing the extension.

@sandy081 sandy081 removed their assignment Nov 11, 2021
@bpasero
Copy link
Member

bpasero commented Nov 11, 2021

Adding process.traceDeprecation = true; to the beginning of exensionHostProcess reveals this:

ERR [Extension Host] (node:3777) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
    at showFlaggedDeprecation (buffer.js:194:11)
    at new Buffer (buffer.js:281:3)
    at Object.<anonymous> (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/node_modules.asar/ftp/lib/connection.js:52:17)
    at Module.u._compile (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js:4:1316)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1155:10)
    at Module.load (internal/modules/cjs/loader.js:982:32)
    at Module._load (internal/modules/cjs/loader.js:823:14)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
    at Module.require (internal/modules/cjs/loader.js:1006:19)
    at h (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js:4:699)
    at Object.<anonymous> (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/node_modules.asar/get-uri/dist/ftp.js:16:31)
    at Module.u._compile (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js:4:1316)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1155:10)
    at Module.load (internal/modules/cjs/loader.js:982:32)
    at Module._load (internal/modules/cjs/loader.js:823:14)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
    at Module.require (internal/modules/cjs/loader.js:1006:19)
    at h (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js:4:699)
    at Object.<anonymous> (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/node_modules.asar/get-uri/dist/index.js:10:31)
    at Module.u._compile (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js:4:1316)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1155:10)
    at Module.load (internal/modules/cjs/loader.js:982:32)
    at Module._load (internal/modules/cjs/loader.js:823:14)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
    at Module.require (internal/modules/cjs/loader.js:1006:19)
    at h (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js:4:699)
    at Object.<anonymous> (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/node_modules.asar/vscode-proxy-agent/out/agent.js:17:35)
    at Module.u._compile (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js:4:1316)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1155:10)
    at Module.load (internal/modules/cjs/loader.js:982:32)
    at Module._load (internal/modules/cjs/loader.js:823:14)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
    at Module.require (internal/modules/cjs/loader.js:1006:19)
    at h (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js:4:699)
    at Object.<anonymous> (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/node_modules.asar/vscode-proxy-agent/out/index.js:40:30)
    at Module.u._compile (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js:4:1316)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1155:10)
    at Module.load (internal/modules/cjs/loader.js:982:32)
    at Module._load (internal/modules/cjs/loader.js:823:14)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
    at Module.require (internal/modules/cjs/loader.js:1006:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at r (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js:5:101)
    at e.load (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js:4:1723)
    at e.load (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js:3:10695)
    at d (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js:5:10300)
    at i._loadModule (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js:5:10430)
    at i._resolve (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js:6:452)
    at i.defineModule (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js:5:6142)
    at v (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js:6:1702)
    at g (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js:4:2557)
    at Object.<anonymous> (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:106:58294)
    at Object.<anonymous> (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:116:32793)
    at e._createAndEvalScript (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js:4:2601)
    at /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js:4:2240
    at h (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js:4:4192)
    at /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js:4:4386
    at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:63:3)

@bpasero
Copy link
Member

bpasero commented Nov 11, 2021

@chrmarti maybe we can fix this in our vscode-proxy-agent

@chrmarti
Copy link
Collaborator

Also tracked as TooTallNate/node-get-uri#18 and mscdex/node-ftp#255.

@chrmarti chrmarti added bug Issue identified by VS Code Team member as probable bug proxy Issues regarding network proxies upstream Issue identified as 'upstream' component related (exists outside of VS Code) labels Nov 15, 2021
@kanlukasz
Copy link

Some time ago your bot closed my issue about this (I still don't know why ...)
Here ---> #123180

@Angelo-yu
Copy link

[error] [Extension Host] (node:61654) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use Code Helper (Renderer) --trace-deprecation ... to show where the warning was created)

I have also encountered the same problem, I am using a Macbook Pro with M1 chip, the system is the latest macOS Monterey 12.0.1 (21A559) VS Code version 1.62.3, I tried to delete all the extensions, but the problem still exists.
My English is not very good, I used the translation tool to translate the above text, if there is inaccurate expression, please forgive me!

@Angelo-yu
Copy link

截屏2021-11-24 14 52 59

@jasonwilliams
Copy link
Contributor

jasonwilliams commented Nov 25, 2021

Also tracked as TooTallNate/node-get-uri#18 and mscdex/node-ftp#255.

Looks like that node-ftp project is dead. Despite there being a fix and PR, nothing has been merged since 2015. I don’t see an alternative either.

@chrmarti
Copy link
Collaborator

Looking closer, we might not actually need node-get-uri. I'll investigate.

chrmarti added a commit that referenced this issue Feb 4, 2022
@chrmarti chrmarti removed the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Feb 4, 2022
@bpasero
Copy link
Member

bpasero commented Feb 4, 2022

👏 👏 👏

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug proxy Issues regarding network proxies verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

10 participants