Skip to content

Online features (leaderboard/multiplayer) fail through the portal proxy (400 / connect error) #7

Description

@roowus

Caught by the headless smoke test (TSPML_TRANSFORM=1). The game boots and renders through the proxy, but the console shows two errors from the game's own runtime networking:

  • 'Failed to load resource: the server responded with a status of 400 (Bad Request)'
  • 'Error: Failed to connect to server' from an XHR onreadystatechange (main.bundle.js)

These are the game's backend calls (leaderboard/session/multiplayer). The /api/proxy forwards Origin/Referer to the official desktop origin, but the backend still 400s — or it's a websocket the proxy doesn't terminate. NOT a transform issue (the transform hook fires fine; the game renders).

Scope: M8 (online/origin handling). Needs: identify which endpoints 400, confirm whether Origin-forwarding is sufficient or the backend checks more (cookies/signed requests), and decide whether websockets must be proxied. Reproduce: TSPML_TRANSFORM=1 pnpm --filter @tspml/portal dev, then pnpm --filter @tspml/portal smoke (or open localhost:3000 + DevTools).

Activity

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