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() deprecation warning when installing a vsix through the command line #67534

Closed
chrmarti opened this issue Jan 30, 2019 · 13 comments · Fixed by #74365
Closed

Buffer() deprecation warning when installing a vsix through the command line #67534

chrmarti opened this issue Jan 30, 2019 · 13 comments · Fixed by #74365
Assignees
Labels
extensions Issues concerning extensions
Milestone

Comments

@chrmarti
Copy link
Collaborator

Issue Type: Bug

image

VS Code version: Code - Insiders 1.31.0-insider (2c987b2, 2019-01-30T06:17:39.118Z)
OS version: Darwin x64 18.0.0

System Info
Item Value
CPUs Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz (8 x 2200)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: enabled
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 2, 2, 2
Memory (System) 16.00GB (0.10GB free)
Process Argv
Screen Reader no
VM 22%
Extensions (29)
Extension Author (truncated) Version
unique-lines bib 1.0.0
ssh chr 0.0.4
vscode-eslint dba 1.8.0
Spot der 0.4.0
ghlink dt 1.0.2
remotehub eam 0.2.0
EditorConfig Edi 0.12.7
tslint eg2 1.0.42
git-project-manager fel 1.7.1
vscode-pull-request-github Git 0.3.2
rest-client hum 0.21.1
solidity Jua 0.0.49
theme-karyfoundation-themes kar 18.2.1
graphql-for-vscode kum 1.13.0
vscode-azureappservice ms- 0.11.0
vscode-azurefunctions ms- 0.13.1
vscode-cosmosdb ms- 0.9.1
azure-account ms- 0.8.0
azurecli ms- 0.4.2
cpptools ms- 0.21.0
github-issues-prs ms- 0.9.1
debugger-for-chrome msj 4.11.1
vscode-docker Pet 0.5.1
vscode-versionlens pfl 0.22.0
vscode-workspacecontains-canary rob 0.0.2
vscode-open-in-github sys 1.10.1
ayu tea 0.17.0
vscodeintellicode Vis 1.1.2
azure-iot-toolkit vsc 2.2.0
@bpasero
Copy link
Member

bpasero commented Jan 30, 2019

This is coming as deprecation from our Electron update. If its unclear where this deprecation is coming from, I can help to print a stack from the place where it happens (this requires Electron 4 though from our exploration builds).

@sandy081
Copy link
Member

The stack trace would be helpful to know.

@bpasero
Copy link
Member

bpasero commented Jan 30, 2019

@chrmarti @sandy081 to this:

  • open command line
  • export NODE_OPTIONS=--throw-deprecation
  • use code-exploration

Exploration:

@chrmarti
Copy link
Collaborator Author

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:160:11)
at new Buffer (buffer.js:175:3)
at fromRandomAccessReader (/Applications/Visual Studio Code - Exploration.app/Contents/Resources/app/node_modules.asar/yauzl/index.js:103:16)
at /Applications/Visual Studio Code - Exploration.app/Contents/Resources/app/node_modules.asar/yauzl/index.js:55:5
at FSReqWrap.oncomplete (fs.js:155:5)

@sandy081
Copy link
Member

This is coming from yauzl lib. @bpasero Will this gets fixed upstream?

@bpasero
Copy link
Member

bpasero commented Jan 30, 2019

@sandy081 I suggest you check if there is a newer version of yauzl lib that has this fixed. It should get fixed if a popular node lib wants to support node 10

@sandy081
Copy link
Member

@bpasero I do not see this warning when running from sources? How can I repro this on dev?

@bpasero
Copy link
Member

bpasero commented Feb 13, 2019

@sandy081 it should show up, I saw it in devtools at least, but never from the comand line.

@tristanbarcelon
Copy link

tristanbarcelon commented Apr 12, 2019

I can confirm that this is still happening for me when using code.cmd on Windows to install latest versions of following extensions: ms-azure-devops.azure-pipelines, ms-vscode.powershell, ms-mssql.mssql, ms-vsts.team, ms-vscode.csharp, ms-vscode.azure-account, peterjausovec.vscode-docker, davidanson.vscode-markdownlint, eamodio.gitlens, qezhu.gitlink, yzhang.markdown-all-in-one.

code.cmd : (node:7192) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), 
or Buffer.from() methods instead.

In case this is needed, here's my environment info:

nodejs 8.9.3
npm 5.5.1
windows server 1607 10.0.14393.2791
vscode system installer 1.33.1

@sandy081 sandy081 modified the milestones: April 2019, May 2019 Apr 12, 2019
@shubh3695
Copy link

shubh3695 commented Apr 30, 2019

I too can confirm the existence of the issue
(node:1592) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
nodejs 10.9.0
npm 6.2.0
vscode system installer 1.33.1

@David-Else
Copy link

When I install extensions on the command line in Fedora 30:

Found 'ban.spellright' in the marketplace.
Installing...
(node:11254) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Extension 'ban.spellright' v3.0.38 was successfully installed!
Found 'bierner.comment-tagged-templates' in the marketplace.
Installing...
(node:11280) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Extension 'bierner.comment-tagged-templates' v0.2.1 was successfully installed!
Found 'dbaeumer.vscode-eslint' in the marketplace.
Installing...

@kitforbes
Copy link

On WIndows 10:

code --version
1.34.0
a622c65b2c713c890fcf4fbf07cf34049d5fe758
x64
'EditorConfig.EditorConfig','hashhar.gitattributes','jirkafajfr.vscode-kitchen','mauve.terraform','ms-python.python','ms-vscode.cpptools','ms-vscode.csharp','Pendrica.chef','vscoss.vscode-ansible','waderyan.gitblame','wholroyd.jinja' |
    % { code --install-extension $_ }
Installing extensions...
Installing extension 'editorconfig.editorconfig' v0.13.0...
(node:18360) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Extension 'editorconfig.editorconfig' v0.13.0 was successfully installed.
Installing extensions...
Installing extension 'hashhar.gitattributes' v0.4.1...
(node:1664) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Extension 'hashhar.gitattributes' v0.4.1 was successfully installed.
Installing extensions...
Installing extension 'jirkafajfr.vscode-kitchen' v0.5.0...
(node:7060) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Extension 'jirkafajfr.vscode-kitchen' v0.5.0 was successfully installed.
Installing extensions...
Installing extension 'mauve.terraform' v1.3.11...
(node:9464) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Extension 'mauve.terraform' v1.3.11 was successfully installed.
Installing extensions...
Installing extension 'ms-python.python' v2019.4.12954...
(node:11280) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Extension 'ms-python.python' v2019.4.12954 was successfully installed.
Installing extensions...
Installing extension 'ms-vscode.cpptools' v0.23.1...
(node:10328) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Extension 'ms-vscode.cpptools' v0.23.1 was successfully installed.
Installing extensions...
Installing extension 'ms-vscode.csharp' v1.19.1...
(node:16184) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Extension 'ms-vscode.csharp' v1.19.1 was successfully installed.
Installing extensions...
Installing extension 'pendrica.chef' v0.7.1...
(node:6276) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Extension 'pendrica.chef' v0.7.1 was successfully installed.
Installing extensions...
Installing extension 'vscoss.vscode-ansible' v0.5.2...
(node:7520) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Extension 'vscoss.vscode-ansible' v0.5.2 was successfully installed.
Installing extensions...
Installing extension 'waderyan.gitblame' v2.7.0...
(node:3320) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Extension 'waderyan.gitblame' v2.7.0 was successfully installed.
Installing extensions...
Installing extension 'wholroyd.jinja' v0.0.8...
(node:168) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Extension 'wholroyd.jinja' v0.0.8 was successfully installed.

@DanTup
Copy link
Contributor

DanTup commented May 23, 2019

FWIW I see this showing up inside Code in the developer tools now during normal use, if I installed from a VSIX (through the command palette). That is, the error is occurring during extension usage, not just during installation.

Screenshot 2019-05-23 at 11 43 56 am

In the packed version of my extension, there is no instance of "Buffer()" in the code, so I don't think it's my code directly triggering it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
extensions Issues concerning extensions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants