Skip to content

Extension direct fallback decodes binary media into an unused text copy #53

Closed

Description

@wolfgang-aura

Impact: when a proxied response passes Chrome's 64 MiB message limit (any MP4 over ~48 MB, whose base64 alone is too large), compat.js falls back to directHttpRequest. That function always sets responseText: new TextDecoder().decode(buffer), even for responseType: 'arraybuffer'. For a 52 MB video that is a ~52-million-character string held next to the buffer, which nothing reads. The proxy path already omits responseText for binary replies (#13), so the two paths also disagree.

Evidence: live run 2026-10-05, v1.6.7 in Brave 154. A 51,986,124-byte MP4 (1080p variant of x.com/TuckerCarlson/status/1666203439146172419) came back through the fallback with responseText set; a 31 MB file through the proxy came back without it.

Next action: set responseText only for text responses, matching the proxy path; add a regression assert in test/extension.test.mjs.

Activity

  1. wolfgang-aura commented on Oct 5, 2026

    @wolfgang-aura
    OwnerAuthor

    Fixed in e81a1c0 (PR #54), released as v1.6.8 (72777ef, PR #55).

    Live-verified 2026-10-05: the fixed compat.js loaded into Brave 154 through the chrome-devtools MCP. The 51,986,124-byte MP4 that went through the direct fallback now arrives as an ArrayBuffer of that size with no responseText. The owner's Brave reports extension v1.6.8 after --reload, and raw main serves @version 1.6.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions