-
Notifications
You must be signed in to change notification settings - Fork 4k
Description
What version of Bun is running?
1.2.20+6ad208bc3
What platform is your computer?
Darwin 24.6.0 arm64 arm
What steps can reproduce the bug?
@grpc/grpc-js server on Bun emits repeated empty HTTP/2 DATA frames and no trailers; Envoy aborts with PROTOCOL_ERROR
Bun version: 1.2.20
Envoy Proxy: v1.34.3
@grpc/grpc-js: 1.13.4
@grpc/proto-loader: 0.8.0
Observed from envoy-proxy logs (running in log-level=trace)
error reading frame: Too many consecutive frames with an empty payload upstream reset: protocol error
Created full local reproduce repository: https://github.com/pgilad/bun-grpc-empty-frames
What is the expected behavior?
Bun path should behave like Node: send one DATA frame with the gRPC message and HTTP/2 trailers (grpc-status: 0) followed by END_STREAM; Envoy should return 429.
What do you see instead?
Under Bun, Envoy observes many consecutive empty DATA frames and never receives proper trailers/END_STREAM, then aborts the stream with PROTOCOL_ERROR (“Too many consecutive frames with an empty payload”). Node does not exhibit this.
Additional information
- grpcurl may appear to “work” because it tolerates the empty DATA frames and waits for trailers; Envoy is stricter and enforces an empty-frame guardrail.
- This likely sits in Bun’s Node-compat http2 server implementation used by @grpc/grpc-js.