You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clone the demo repo git clone https://github.com/pablojimpas/demo-bug-grpc.
Install dependencies: bun install.
Generate Protocol Buffers code: bun run generate.
Run the program bun run index.ts
What is the expected behavior?
The gRPC calls succeeds and the response message appears in the terminal. This works with Node (I'm testing with Node v18.20.4).
I've included two scripts in the package.json to help debugging this: bun run build-bun and bun run build-node to generate bundles for Bun and Node targets.
Running node bundle-node.js and node bundle-bun.js works, but Bun fails with both bun bundle-node.js and bun bundle-bun.js.
What do you see instead?
An error occurs related to a premature close of a stream (ERR_STREAM_PREMATURE_CLOSE):
15947 | return message.length ? `[${codeToString(code)}] ${message}` : `[${codeToString(code)}]`;
15948 | }
15949 |
15950 | class ConnectError extends Error {
15951 | constructor(message, code = Code.Unknown, metadata, outgoingDetails, cause) {
15952 | super(createMessage(message, code));
^
ConnectError: [unknown] Premature close
code: "2"
at new ConnectError (/home/pablo/demo-grpc/bundle-node.js:15952:5)
at from (/home/pablo/demo-grpc/bundle-node.js:15969:14)
at abort (/home/pablo/demo-grpc/bundle-node.js:19624:30)
430 | }
431 | function E(code, message, Base) {
432 | if (!Base)
433 | Base = Error;
434 |
435 | constructor(...args) {
^
error: Premature close
code: "ERR_STREAM_PREMATURE_CLOSE"
at new NodeError (node:stream:435:20)
at node:stream:1014:23
Additional information
This might be an issue related to HTTP2, but I don't know the details of the implementation, notice that I'm using @connectrpc/connect instead of @grpc/grpc-js for the gRPC client.
The text was updated successfully, but these errors were encountered:
What version of Bun is running?
1.1.29+6d43b3662
What platform is your computer?
Linux 6.10.10-artix1-1 x86_64 unknown
What steps can reproduce the bug?
git clone https://github.com/pablojimpas/demo-bug-grpc
.bun install
.bun run generate
.bun run index.ts
What is the expected behavior?
The gRPC calls succeeds and the response message appears in the terminal. This works with Node (I'm testing with Node v18.20.4).
I've included two scripts in the
package.json
to help debugging this:bun run build-bun
andbun run build-node
to generate bundles for Bun and Node targets.Running
node bundle-node.js
andnode bundle-bun.js
works, but Bun fails with bothbun bundle-node.js
andbun bundle-bun.js
.What do you see instead?
An error occurs related to a premature close of a stream (
ERR_STREAM_PREMATURE_CLOSE
):Additional information
This might be an issue related to HTTP2, but I don't know the details of the implementation, notice that I'm using
@connectrpc/connect
instead of@grpc/grpc-js
for the gRPC client.The text was updated successfully, but these errors were encountered: