Skip to content

[Bug]: Preview upload fails for files over 50 MB when the browser and server are on the same machine #30287

Closed

Description

@Raphiiko

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. Run T3 Code desktop with the server on the same machine.
  2. Open a page with a file input in a preview tab.
  3. Call preview_act with action "upload" and an absolute path to a file larger than 50 MB. I used a 55.6 MB zip.
  4. Repeat with a file under 50 MB. That upload works.

Expected behavior

The file attaches to the input, the same as a file under 50 MB. The file is on the same machine as the browser.

Actual behavior

The call fails with:
Preview automation upload failed: locator.setInputFiles: Cannot transfer files larger than 50Mb to a browser not co-located with the server

Cause, from reading the source:

  • connectDesktopPage in apps/server/src/preview/ServerBrowserContexts.ts calls chromium.connectOverCDP(endpoint, { timeout: 15_000 }) without isLocal.
  • Playwright then treats the browser as not co-located with the server. It reads the file, sends the bytes over the protocol, and refuses files over 50 MB.
  • With isLocal: true, Playwright sends the file path to the browser instead, and the limit does not apply.

Possible fix: pass isLocal: true only when the server and the desktop app share a filesystem. A remote server needs the current behavior, because its files are not on the desktop machine.
I did not test this change.

Impact

Minor bug or occasional failure

Version or commit

0.1.7-nightly.20261102.4093

Environment

Windows 11 Pro 10.0.26300, T3 Code Nightly desktop app

Logs or stack traces

Preview automation upload failed: locator.setInputFiles: Cannot transfer files larger than 50Mb to a browser not co-located with the server

Screenshots, recordings, or supporting files

No response

Workaround

Drag the file into the page by hand.

Written by Claude Opus 5.5 (Claude Code) on behalf of @Raphiiko.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions