vite preview
sometimes throw ERR_HTTP2_INVALID_STREAM
when running end-to-end tests with Playwright
#15987
-
👋 We run the tests using Playwright on GitLab pipelines in the System infoSystem:
OS: Linux 5.13 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
CPU: (4) x64 AMD EPYC 7R13 Processor
Memory: 14.39 GB / 15.28 GB
Container: Yes
Shell: 5.1.16 - /bin/bash
Binaries:
Node: 20.10.0 - /usr/bin/node
Yarn: 1.22.21 - /usr/bin/yarn
npm: 10.2.3 - /usr/bin/npm
npmPackages:
@vitejs/plugin-react-swc: ^3.5.0 => 3.5.0
vite: ^5.0.2 => 5.0.2 A semi-complete log of this exception[WebServer] node:internal/http2/core:2762
throw new ERR_HTTP2_INVALID_STREAM();
^
Error [ERR_HTTP2_INVALID_STREAM]: The stream has been destroyed
at ServerHttp2Stream.respond (node:internal/http2/core:2762:13)
at [begin-send] (node:internal/http2/compat:836:19)
at Http2ServerResponse.writeHead (node:internal/http2/compat:711:21)
at start (file:///builds/<some-path>/node_modules/vite/dist/node/chunks/dep-ErEj4WmL.js:65537:23)
at res.write (file:///builds/<some-path>/node_modules/vite/dist/node/chunks/dep-ErEj4WmL.js:65552:17)
at ReadStream.ondata (node:internal/streams/readable:985:22)
at ReadStream.emit (node:events:514:28)
at addChunk (node:internal/streams/readable:545:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:495:3)
at Readable.push (node:internal/streams/readable:375:5) {
code: 'ERR_HTTP2_INVALID_STREAM'
} Unfortunately I haven't been able to reproduce this in a stable fashion either locally or in CI. And before finding a work around (more on that below) we just restarted the tests and that (🤞) works most of the time. It seems like the exception stems from this code:
As a workaround we run Since I know little about streams I'm not sure how to remedy the situation... but the first things that spring to my mind is:
But I'm sure someone with better understanding of streams can come up with better solutions 🙏 Thankful for any help I can get! Initially I intended to create a issue but considering I cant come up with a reproduction that is stable, I turn to you 😊
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
lukeed/polka#221