decolua/9router · error

MiMo bootstrap returned no JWT

Error message

MiMo bootstrap returned no JWT

What it means

After a successful (2xx) MiMo bootstrap call, the executor expects the JSON response to contain a jwt field. When data.jwt is missing or empty it throws this error — the endpoint answered but did not issue a token, so authenticated requests cannot be made.

Source

Thrown at open-sse/executors/mimo-free.js:99

    return cachedJwt;
  }

  const response = await proxyAwareFetch(BOOTSTRAP_URL, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "User-Agent": USER_AGENTS[Math.floor(Math.random() * USER_AGENTS.length)],
    },
    body: JSON.stringify({ client: generateFingerprint() }),
  }, proxyOptions);

  if (!response.ok) {
    throw new Error(`MiMo bootstrap failed: ${response.status}`);
  }

  const data = await response.json();
  if (!data.jwt) {
    throw new Error("MiMo bootstrap returned no JWT");
  }

  cachedJwt = data.jwt;
  jwtExpiresAt = parseJwtExp(data.jwt);
  return cachedJwt;
}

export class MimoFreeExecutor extends BaseExecutor {
  constructor() {
    super("mimo-free", PROVIDERS["mimo-free"]);
    this.sessionId = generateSessionId();
  }

  buildUrl() {
    return CHAT_URL;
  }

  buildHeaders(credentials, stream = true) {

View on GitHub (pinned to 90b52e06ff)

Solutions

  1. Update 9router to the latest version — response-shape changes are patched there first
  2. Log the raw bootstrap response body to see whether it is HTML (anti-bot/captcha) or a renamed field (e.g. token/access_token)
  3. Bypass proxies/VPNs that may trigger anti-bot mitigation and cause a challenge page instead of a JWT
  4. Clear any cached state and retry; a transiently misrouted response can succeed on a fresh attempt
  5. If the field was renamed upstream, patch the executor or wait for a 9router release supporting the new schema

Example fix

// before
throw new Error('MiMo bootstrap returned no JWT');
// after (diagnose the actual body)
throw new Error(`MiMo bootstrap returned no JWT: ${JSON.stringify(data).slice(0, 300)}`);
Defensive patterns

Strategy: fallback

Type guard

function hasJwt(data) {
  return data != null && typeof data === 'object' && typeof data.jwt === 'string' && data.jwt.length > 0;
}

Try / catch

try {
  jwt = await executor.jwt();
} catch (e) {
  if (String(e.message).includes('returned no JWT')) {
    // upstream answered but issued no token — switch account or await fix/update
    return failoverToAlternateProvider(req);
  }
  throw e;
}

Prevention

When it happens

Trigger: The bootstrap endpoint responds 200 with a body lacking jwt — e.g. an HTML challenge/interstitial, a changed response schema ({token: ...} instead of {jwt: ...}), a captcha/anti-bot page, or an empty body from a misrouted request.

Common situations: MiMo changed its bootstrap response shape (version drift); anti-bot mitigation returning 200 with an HTML page; a proxy rewriting the response; hitting a regional endpoint with a different schema.

Related errors


AI-assisted analysis of decolua/9router@90b52e06ff (2026-08-30). Data as JSON: /api/errors/34b115c420549096. Report an issue: GitHub.