Skip to main content

Deployment issues

wrangler deploy fails with authentication error

Fix: Run wrangler login and complete the browser OAuth flow. Your session token is stored in ~/.wrangler/config/default.toml.

Worker deploys but requests return 500

Check live logs:
Common causes:

Bundle too large

or
Fix:
  1. Run npx wrangler deploy --dry-run --outdir dist to inspect what’s in the bundle
  2. Move large static assets out of the Worker and into R2
  3. Tree-shake unused imports

R2 bucket not found

Fix: Create the bucket and verify the binding name matches:
Then confirm wrangler.jsonc has:

Durable Object errors

Fix: Ensure wrangler.jsonc declares the DO class with the correct class name:
And that McpSession is a named export in src/index.ts.

Runtime issues

401 Unauthorized on every request

The Firebase JWT is missing, expired, or belongs to the wrong project. Fix:
  1. Verify FIREBASE_PROJECT_ID in the backend .env matches your Firebase project
  2. Confirm the AI client is sending the token in Authorization: Bearer <token>
  3. Check token expiry - Firebase JWTs expire after 1 hour

Session not found after reconnect

AI client receives 404 on a resumed session. This is expected - DO sessions evict after 30 minutes of inactivity. The client should start a new session by omitting the Mcp-Session-Id header (or using a new UUID).

Server not found in R2

Fix:
  1. Run superbox push again to republish the server metadata
  2. Verify the object key in R2: wrangler r2 object get superbox-mcp-registry my-server.json
  3. Check Back end logs for R2 write errors during push

Backend API issues

Go API crashes on startup

Fix: Ensure all required environment variables are set in .env:

security_helper.py or s3_helper.py not found

The Go API invokes these as subprocess commands. They must be on the PATH or in the working directory. Fix:
This installs the superbox package in editable mode, making both helpers available as module scripts.