From bb52717c9514cfde9fd82cf019c16253d66aa375 Mon Sep 17 00:00:00 2001 From: Honey Date: Sun, 10 May 2026 18:01:12 +0200 Subject: [PATCH] fix: force HTTP/1.1 via ALPNProtocols to prevent h2 framing mismatch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit api.spotify.com negotiates HTTP/2 via TLS ALPN but https.request uses HTTP/1.1 framing — the protocol mismatch silently hangs the connection. wget on Alpine doesn't advertise h2 so it works fine. ALPNProtocols: ['http/1.1'] forces HTTP/1.1 on both ends. Co-Authored-By: Claude Sonnet 4.6 --- backend/novasonic-server.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/novasonic-server.js b/backend/novasonic-server.js index 410ed14..48edaea 100644 --- a/backend/novasonic-server.js +++ b/backend/novasonic-server.js @@ -78,6 +78,9 @@ function _fetchTimeout(url, opts = {}, ms = 10000) { hostname: u.hostname, port: 443, path: u.pathname + u.search, method: opts.method || 'GET', + // Force HTTP/1.1 — api.spotify.com negotiates h2 via ALPN but + // https.request uses HTTP/1.1 framing, causing a silent hang. + ALPNProtocols: ['http/1.1'], headers: { 'User-Agent': 'NovaSonic/1.0', 'Accept': 'application/json',