Skip to content

Presets / Issue with Node22 #451

Closed
Closed

Description

@xoph1319

Running into a strange issue that I think has to do with the upgrade to Node22.

Here is my settings.json file (sanitized):
{ "port": 5005, "ip": "0.0.0.0", "announceVolume": 40, "library": { "randomQueueLimit": 50 }, "pandora": { "username": "username", "password": "password" } }

Here's what happening...

  1. I try to hit the Sonos NodeJS API that I spun up.
  2. curl http://192.168.55.58:5005/Office/play returns a HTTP/200 response and a {"status":"success"} json. Great!
  3. However, if I try to access the predefined Pandora service using curl -vvv http://192.168.55.58:5005/Office/pandora/play/%22wake%20up%20radio%22 I get an empty response from the server.
    $ curl -vvv http://192.168.55.58:5005/Office/pandora/play/%22wake%20up%20radio%22 11:19:05.683999 [0-x] == Info: [READ] client_reset, clear readers 11:19:05.685333 [0-0] == Info: [SETUP] added 11:19:05.685435 [0-0] == Info: Trying 192.168.55.58:5005... 11:19:05.685887 [0-0] == Info: [SETUP] Curl_conn_connect(block=0) -> 0, done=0 11:19:05.687098 [0-0] == Info: [SETUP] Curl_conn_connect(block=0) -> 0, done=1 11:19:05.687204 [0-0] == Info: Connected to 192.168.55.58 (192.168.55.58) port 5005 11:19:05.687310 [0-0] == Info: using HTTP/1.x 11:19:05.687439 [0-0] => Send header, 125 bytes (0x7d) 0000: GET /Office/pandora/play/%22wake%20up%20radio%22 HTTP/1.1 003b: Host: 192.168.55.58:5005 0055: User-Agent: curl/8.13.0 006e: Accept: */* 007b: 11:19:05.687996 [0-0] == Info: Request completely sent off 11:19:06.135320 [0-0] == Info: [WRITE] xfer_write_resp(len=0, eos=1) -> 0 11:19:06.136730 [0-0] == Info: Empty reply from server 11:19:06.137788 [0-0] == Info: [WRITE] [OUT] done 11:19:06.139097 [0-0] == Info: shutting down connection #0 curl: (52) Empty reply from server
  4. When I look at the logs from the server, I see the following...
    > sonos-http-api@1.7.0 start 2025-05-12T16:00:33.269Z INFO Presets loaded: {} node:internal/crypto/cipher:121 ^ at Decipheriv.createCipherBase (node:internal/crypto/cipher:121:19) at new Decipheriv (node:internal/crypto/cipher:278:3) at /app/node_modules/anesidora/encryption.js:30:29 at decryptSyncTime (/app/node_modules/anesidora/anesidora.js:49:36) at Request._callback (/app/node_modules/anesidora/anesidora.js:41:24) at Request.emit (node:events:518:28) at Request.<anonymous> (/app/node_modules/request/request.js:1157:10) at Request.emit (node:domain:489:12) at Object.onceWrapper (node:events:632:28) at IncomingMessage.emit (node:domain:489:12) at process.processTicksAndRejections (node:internal/process/task_queues:90:21) { reason: 'unsupported', }
  5. I have a debian VM runs Node 20.19.0. I do not see this behavior on that server.

Activity

  1. chrisns commented on Oct 23, 2026

    @chrisns
    Owner

    Hi @xoph1319, I'm sorry. This slipped past me and it's taken far too long to reply.

    I've looked at it now and your diagnosis was right. It isn't the Node version itself. The Pandora library (anesidora) decrypts with Blowfish, which OpenSSL 3 treats as a legacy algorithm. It throws unsupported, nothing catches it, and the process dies. That's the empty reply you saw. It still happens on Node 24 and 26, and on the plain Alpine Node 20 image. I'd guess your Debian VM's OpenSSL config enables the legacy provider, which is why it worked there.

    I've merged #577, which sets NODE_OPTIONS=--openssl-legacy-provider in the image. That fixed the Blowfish call in my test, so the next image build should no longer crash. I couldn't test a live Pandora login, so I can't promise the whole route works. Pandora's API may have changed since you reported this. If you still see a problem after pulling the new image, please say and I'll dig further.

    The proper fix has to land in the upstream project (jishi/node-sonos-http-api).

    Thanks for the clear write-up, and sorry again for the wait.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions