trezor / trezor-suite

Trezor Suite Monorepo
https://trezor.io/trezor-suite
Other
708 stars 247 forks source link

Deprecation warning during Suite launch from command line #9224

Open filipponeri opened 1 year ago

filipponeri commented 1 year ago

Describe the bug when launching Trezor Suite on Ubuntu 22.04 from the command line I receive the following Deprecation Warning. How do I deal with it? Thanks!

./Trezor-Suite-23.8.1-linux-x86_64.AppImage (node:1016272) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. (Use trezor-suite --trace-deprecation ... to show where the warning was created)

Info:

How to reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

RabbitHole26 commented 1 year ago

Hello @matejkriz,

I am experiencing this issue as well. Does this affect the security of the suite software in any significant capacities? I suppose it doesn't since the .AppImage file is still hosted on your website but I rather check before hooking up the device.

Thank you.

doolio commented 11 months ago

Also see this on Debian 11.

matejkriz commented 11 months ago

Thank you for your reports! This warning is nothing new and we do not use that deprecated API directly in our codebase, but one of our old dependency use it. We do not know about any abuse of this old API.

Here is some explanation of the context of the warning: https://nodesource.com/blog/understanding-the-buffer-deprecation-in-node-js-10/

@mroz22 The warning during app start comes from usage of bytebuffer dependency, can we replace it with something better maintained? https://github.com/trezor/trezor-suite/blob/develop/packages/protobuf/src/encode.ts/#L74

matejkriz commented 11 months ago

BTW it's not linux related, it can be seen on any platform running Suite from command line

mroz22 commented 11 months ago

in general, bytebuffer should be replacable. We should do it.