{"record":{"id":"34b115c420549096","repo":"decolua/9router","slug":"mimo-bootstrap-returned-no-jwt","errorCode":null,"errorMessage":"MiMo bootstrap returned no JWT","messagePattern":"MiMo bootstrap returned no JWT","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"open-sse/executors/mimo-free.js","lineNumber":99,"sourceCode":"    return cachedJwt;\n  }\n\n  const response = await proxyAwareFetch(BOOTSTRAP_URL, {\n    method: \"POST\",\n    headers: {\n      \"Content-Type\": \"application/json\",\n      \"User-Agent\": USER_AGENTS[Math.floor(Math.random() * USER_AGENTS.length)],\n    },\n    body: JSON.stringify({ client: generateFingerprint() }),\n  }, proxyOptions);\n\n  if (!response.ok) {\n    throw new Error(`MiMo bootstrap failed: ${response.status}`);\n  }\n\n  const data = await response.json();\n  if (!data.jwt) {\n    throw new Error(\"MiMo bootstrap returned no JWT\");\n  }\n\n  cachedJwt = data.jwt;\n  jwtExpiresAt = parseJwtExp(data.jwt);\n  return cachedJwt;\n}\n\nexport class MimoFreeExecutor extends BaseExecutor {\n  constructor() {\n    super(\"mimo-free\", PROVIDERS[\"mimo-free\"]);\n    this.sessionId = generateSessionId();\n  }\n\n  buildUrl() {\n    return CHAT_URL;\n  }\n\n  buildHeaders(credentials, stream = true) {","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/decolua/9router/blob/90b52e06ffd666b7929554211474d01588f6b1f8/open-sse/executors/mimo-free.js#L81-L117","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Update 9router to the latest version — response-shape changes are patched there first","Log the raw bootstrap response body to see whether it is HTML (anti-bot/captcha) or a renamed field (e.g. token/access_token)","Bypass proxies/VPNs that may trigger anti-bot mitigation and cause a challenge page instead of a JWT","Clear any cached state and retry; a transiently misrouted response can succeed on a fresh attempt","If the field was renamed upstream, patch the executor or wait for a 9router release supporting the new schema"],"exampleFix":"// before\nthrow new Error('MiMo bootstrap returned no JWT');\n// after (diagnose the actual body)\nthrow new Error(`MiMo bootstrap returned no JWT: ${JSON.stringify(data).slice(0, 300)}`);","handlingStrategy":"fallback","validationCode":null,"typeGuard":"function hasJwt(data) {\n  return data != null && typeof data === 'object' && typeof data.jwt === 'string' && data.jwt.length > 0;\n}","tryCatchPattern":"try {\n  jwt = await executor.jwt();\n} catch (e) {\n  if (String(e.message).includes('returned no JWT')) {\n    // upstream answered but issued no token — switch account or await fix/update\n    return failoverToAlternateProvider(req);\n  }\n  throw e;\n}","preventionTips":["Keep 9router updated for MiMo response-schema changes","Log the bootstrap response body to detect anti-bot/HTML interstitials early","Avoid proxy chains that trigger anti-bot challenges","Maintain a fallback provider/account for free-tier instability"],"tags":["mimo","bootstrap","jwt","schema-change","anti-bot"],"backgroundTag":"jwt-token-missing","analyzedSha":"90b52e06ffd666b7929554211474d01588f6b1f8","analyzedAt":"2026-08-30T21:05:45.952Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}