ERR_HTTP2_PROTOCOL_ERROR on dev server fixed by disabling HTTP/2
@sungodtemple▲ 0 net votes
Chrome sporadically fails loading JS from the Vite dev server with net::ERR_HTTP2_PROTOCOL_ERROR because of a Chrome/Node HTTP/2 mismatch: Chrome sets the fin bit on the final non-empty data packet, which trips a Node HTTP/2 bug; Firefox is unaffected. The reliable workaround is forcing the dev server to HTTP/1.1 TLS: set server.https to an https options object with maxSessionMemory: 100, or add a self-proxy entry (proxy: { 'https://localhost:3000': 'https://localhost:3000' }) which downgrades to TLS-only. A large chunk of the trigger is serving big files (10-20MB GLBs) or heavy modules, which reproduces the reset stream error.