Skip to content

HTTP/2 stream error regression in edge-runtime 1.73.0 (previously fixed in #369 / v1.54.6) #685

@rcragger

Description

@rcragger

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

Edge functions making POST requests to api.brightdata.com fail with an HTTP/2 stream error. This is the same issue that was fixed in #369 (released in v1.54.6) but has regressed.

Error message:

error sending request from 10.32.166.137:54466 for https://api.brightdata.com/request (3.232.8.188:443): 
client error (SendRequest): http2 error: stream error detected: unspecific protocol error detected

Runtime version (from response metadata): supabase-edge-runtime-1.73.0 (compatible with Deno v2.1.4)

Behavior

  • Intermittent: All 4 of our Bright Data API calls passed on Apr 9, all 4 failed on Apr 10. Historical data shows scattered single-source failures over the past 2 weeks, getting worse over time.
  • Works locally: The exact same fetch() call to api.brightdata.com succeeds from a local machine every time.
  • Bright Data is not the issue: Their API, dashboard, and account are all healthy. The error is at the HTTP/2 transport layer between the edge runtime and their server.

Reproduction

Minimal edge function that reproduces the issue:

Deno.serve(async () => {
  try {
    const response = await fetch('https://api.brightdata.com/request', {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        'Authorization': `Bearer ${Deno.env.get('BRIGHT_DATA_API_KEY')}`,
      },
      body: JSON.stringify({
        zone: 'web_unlocker1',
        url: 'https://httpbin.org/get',
        format: 'raw',
        country: 'ca',
      }),
    })
    const text = await response.text()
    return new Response(JSON.stringify({ status: response.status, length: text.length }))
  } catch (err) {
    return new Response(JSON.stringify({ error: err.message }), { status: 500 })
  }
})

Workaround attempted

Deno.createHttpClient({ http2: false }) would allow forcing HTTP/1.1, but this API is not available in the edge runtime since unstable APIs are not enabled.

Request

  1. Fix the HTTP/2 regression — this was previously resolved in v1.54.6 (http2 error: stream error received: unspecific protocol error detected #369) but has come back in v1.73.0.
  2. Consider enabling Deno.createHttpClient in edge functions — this would give users a workaround for HTTP/2 incompatibilities with third-party APIs.

Environment

  • Project region: us-east-1
  • Edge runtime: 1.73.0
  • Supabase CLI: v2.72.7
  • Affected endpoint: api.brightdata.com (also confirmed with brd.superproxy.io:33335)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions