react-google-adk: an event-stream response without a body throws a TypeError
Author: Kinfe123Created Sep 17, 2026Updated Sep 17, 2026
Labelsbug
Problem
A successful ADK response with the expected text/event-stream content type but no response body throws an internal Cannot read properties of null TypeError.
Reproduction
Return new Response(null, { status: 200, headers: { "Content-Type": "text/event-stream" } }) from the configured fetch call and start consuming the ADK stream.
Root cause
The response content type is validated, but parseSSEResponse uses response.body!.getReader() without validating that the body exists.
Proposed fix
Validate the response body before creating the reader and throw a package-level ADK response error that explains the missing stream body.
Verification
Add a focused client test asserting the stable error message for a successful event-stream response with a null body.
Source: assistant-ui/assistant-ui