Gemini Readable Streams API error

Hi, I am using the Gemini AI studio build feature, and I have encountered this error multiple times when running my app on mobile. The Gemini API doesn’t work on mobile, but it will work on desktop. It’s not working with readable streams. Does anyone have any idea how to fix this problem?

Oops! Something went wrong.
Failed to find restaurants. Original error: got status: 502 . {“error”:“Proxying failed”,“details”:“ReadableStream uploading is not supported”,“name”:“NotSupportedError”,"%2Fapi-proxy%2Fv1beta%2Fmodels%2Fgemini-2.5-flash-preview-04-17%3AgenerateContent%22%7D)

4 Likes

Hi,
Same here. Using Safari or Firefox. In AI Studio no problem when I am testing the app. After deploying I got the same problem: “a proxy server doesn’t support ReadableStream for request bodies, which the Gemini API’s Chat object might be using internally, even for chat.sendMessage. This is leading to a 502 error.”

1 Like

Hi, same here,
the problem appears to be when calling the proxy after deploying the app to Google Cloud using the deploys button, using the proxy in the service worker while calling the API from a client app.
The call only works from Chrome in Android and computers.

Just chiming in to confirm and amplify this issue, it really is killing the usefulness of Ai studio not being able to use any gemeni API requests on alternative browsers/platforms.

This is another thread with the same issue. I really hope someone see’s this and gets this bug out of the way of an otherwise excellent tool.

Some of my users are encountering same error when they click on a CTA that uses the Gemini API. It’s causing a bad experience for them.

1 Like

Just got this issue - works a dream under Google Chrome Desktop everywhere else it fails

getting the same error on two different apps. Anyone find a work around?