jishi / node-sonos-http-api

An HTTP API bridge for Sonos easing automation. Hostable on any node.js capable device, like a raspberry pi or similar.
http://jishi.github.io/node-sonos-http-api/
MIT License
1.83k stars 462 forks source link

Buffer() is deprecated #875

Closed crissmil closed 2 months ago

crissmil commented 10 months ago

Hi Joshi!

Please assist on below error after latest Sonos update:

2023-08-29T06:47:00.430Z ERROR { error: "action 'living%20room' not found" } (node:12959) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. (Use node --trace-deprecation ... to show where the warning was created) 2023-08-29T06:47:11.791Z ERROR { error: "action 'living%20room' not found" }

jishi commented 10 months ago

The buffer error is unrelated to your problem.

The command you are sending are either interpreted wrong, or you are sending an faulty command.

It shouldn't parse living room as an action, but rather a room. Show me what you are calling.

On Tue, 29 Aug 2023, 08:50 crissmil, @.***> wrote:

Hi Joshi!

Please assist on below error after latest Sonos update:

2023-08-29T06:47:00.430Z ERROR { error: "action 'living%20room' not found" } (node:12959) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. (Use node --trace-deprecation ... to show where the warning was created) 2023-08-29T06:47:11.791Z ERROR { error: "action 'living%20room' not found" }

— Reply to this email directly, view it on GitHub https://github.com/jishi/node-sonos-http-api/issues/875, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYE2I2MOTGGKURHSZZWRTDXXWGKFANCNFSM6AAAAAA4COLMFY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

crissmil commented 10 months ago

Thanks for your prompt reply. I found the problem. It was Home app from my iPhone which changed the Sonos rooms names. Changed back to previous names fixed the problem.

But before this I replaced 'new Buffer' with 'Buffer.from' into below 2 files and got rid of deprecated Buffer(): spotifyDef.js sonos-http-api.js