Bug Description
On some domains, over TLS, http/2 web socket connects fail without a good explanation. Consistently reproducing w the domain in the example.
Reproduction
Standalone reproduction script:
import { Agent, WebSocket } from 'undici'
// turning this flag off, prints success
const dispatcher = new Agent({ allowH2: true })
const url = 'wss://web.whatsapp.com/ws/chat'
const ws = new WebSocket(url, { dispatcher })
ws.onopen = () => {
console.log('Success!')
ws.close()
}
ws.onerror = (err) => {
console.log('error', err)
}
ws.onclose = ev => {
console.log('close code', ev.code)
}
Steps to reproduce (if not using the script above):
Run the script above.
Expected Behavior
Successful connect
Actual Behavior
Disconnects w 1006
Environment
- OS: MacOS 26
- Node.js version: 26.1.0
- undici version: 8.x.x
Bug Description
On some domains, over TLS, http/2 web socket connects fail without a good explanation. Consistently reproducing w the domain in the example.
Reproduction
Standalone reproduction script:
Steps to reproduce (if not using the script above):
Run the script above.
Expected Behavior
Successful connect
Actual Behavior
Disconnects w 1006
Environment