Budibase/budibase · error

Streaming not supported in this browser

Error message

Streaming not supported in this browser

What it means

generateTables streams the AI response via Server-Sent Events and calls response.body.getReader(). If the browser (or fetch polyfill used by the environment) provides no ReadableStream body, `reader` is undefined and this error is thrown because streaming cannot proceed.

Source

Thrown at packages/frontend-core/src/api/ai.ts:94

    })
  },

  generateJs: async req => {
    return await API.post({
      url: "/api/ai/js",
      body: req,
    })
  },

  generateTables: async (req, onProgress) => {
    return await API.post({
      url: "/api/ai/tables",
      body: req,
      parseResponse: async response => {
        try {
          const reader = response.body?.getReader()
          if (!reader) {
            throw new Error("Streaming not supported in this browser")
          }

          const decoder = new TextDecoder()
          let buffer = ""
          let finalResponse: GenerateTablesResponse | undefined

          while (true) {
            const { done, value } = await reader.read()
            if (done) {
              break
            }
            buffer += decoder.decode(value, { stream: true })

            let boundary = buffer.indexOf(SSE_EVENT_DELIMITER)
            while (boundary !== -1) {
              const eventChunk = buffer.slice(0, boundary)
              buffer = buffer.slice(boundary + SSE_EVENT_DELIMITER.length)

View on GitHub (pinned to a81a902e9a)

Solutions

  1. Upgrade to a modern browser with ReadableStream support for response.body.getReader().
  2. Remove any fetch polyfill that strips streaming support, or configure undici/native fetch.
  3. Implement a non-streaming fallback path or surface a browser-support message to users.
  4. Check fetch response headers/feature detection (`response.body` exists) before enabling AI table generation in the UI.

Example fix

// before
const reader = response.body?.getReader()
// after
if (typeof response.body?.getReader !== "function") {
  // fallback: await response.json() via non-streaming endpoint
  return nonStreamingGenerateTables(req)
}
const reader = response.body.getReader()
Defensive patterns

Strategy: fallback

Validate before calling

const streamingSupported = typeof Response !== "undefined" && typeof Response.prototype?.body?.getReader === "function"

Type guard

function supportsStreaming(res: Response): res is Response & { body: ReadableStream } {
  return res.body != null && typeof res.body.getReader === "function"
}

Try / catch

try {
  return await generateTables(req)
} catch (e) {
  if (e.message === "Streaming not supported in this browser") {
    return nonStreamingGenerateTables(req)
  }
  throw e
}

Prevention

When it happens

Trigger: Calling buildAIEndpoints.generateTables (POST /api/ai/tables) in a browser or polyfilled fetch environment where response.body is undefined (older browsers, some React Native runtimes, certain polyfills, IE-class browsers).

Common situations: Legacy browser support gaps (no ReadableStream), fetch polyfills that don't implement streaming bodies, WebViews with stream support disabled, testing environments (jsdom) whose fetch returns non-streaming responses.

Related errors


AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29). Data as JSON: /api/errors/2cebc122d89ab586. Report an issue: GitHub.