{"record":{"id":"3ba196edc8dbab1f","repo":"decolua/9router","slug":"no-authorization-code-received","errorCode":null,"errorMessage":"No authorization code received","messagePattern":"No authorization code received","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/lib/oauth/services/antigravity.js","lineNumber":278,"sourceCode":"        }, 300000);\n\n        const checkInterval = setInterval(() => {\n          if (callbackParams) {\n            clearInterval(checkInterval);\n            clearTimeout(timeout);\n            resolve();\n          }\n        }, 100);\n      });\n\n      close();\n\n      if (callbackParams.error) {\n        throw new Error(callbackParams.error_description || callbackParams.error);\n      }\n\n      if (!callbackParams.code) {\n        throw new Error(\"No authorization code received\");\n      }\n\n      spinner.start(\"Exchanging code for tokens...\");\n\n      // Exchange code for tokens\n      const tokens = await this.exchangeCode(callbackParams.code, redirectUri);\n\n      spinner.text = \"Fetching user info...\";\n\n      // Get user info\n      const userInfo = await this.getUserInfo(tokens.access_token);\n\n      spinner.text = \"Loading Code Assist configuration...\";\n\n      // Load Code Assist to get project ID and tier\n      const { projectId, tierId } = await this.loadCodeAssist(tokens.access_token);\n\n      if (!projectId) {","sourceCodeStart":260,"sourceCodeEnd":296,"githubUrl":"https://github.com/decolua/9router/blob/90b52e06ffd666b7929554211474d01588f6b1f8/src/lib/oauth/services/antigravity.js#L260-L296","documentation":"Thrown by AntigravityService.connect when the OAuth callback arrived without an `error` parameter but also without a required `code` parameter. The local callback server captured the redirect, but Google's response carried no authorization code, so the token exchange cannot proceed. Unlike error 244, this is an unexpected/malformed callback rather than an explicit denial.","triggerScenarios":"Callback URL hit directly by the user's browser (manual navigation) with no query params; partial redirects where Google dropped the code; a proxy or browser extension stripping query parameters; state/fragment confusion in custom redirect handling.","commonSituations":"User bookmarking/pasting the localhost callback URL into a fresh tab; aggressive privacy extensions rewriting the redirect; running the flow behind a corporate proxy that mangles query strings.","solutions":["Re-run the connect command and complete the Google login in the browser window it opens — don't navigate to the callback URL manually","Disable browser extensions/ad-blockers that may strip query parameters and retry","Check that no corporate proxy sits between the browser and the localhost callback server","If it reproduces, log callbackParams in connect() to see what the callback server actually received"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (!callbackParams.code && !callbackParams.error) {\n  throw new Error(`Callback missing both code and error. Received keys: ${Object.keys(callbackParams).join(',')}`);\n}","typeGuard":"function hasAuthCode(params) { return params != null && typeof params.code === 'string' && params.code.length > 0; }","tryCatchPattern":"try {\n  await service.connect();\n} catch (e) {\n  if (e.message === 'No authorization code received') {\n    console.error('Callback had no code param. Re-run connect and complete login in the opened browser window.');\n  } else throw e;\n}","preventionTips":["Complete login only in the browser window the CLI opened — don't paste the callback URL manually","Disable extensions/ad-blockers that strip query parameters on localhost redirects","Check proxy configuration if behind a corporate proxy","Log full callback params when debugging to see what the local server received"],"tags":["oauth","missing-parameter","callback","google-cloud"],"backgroundTag":"oauth-missing-authorization-code","analyzedSha":"90b52e06ffd666b7929554211474d01588f6b1f8","analyzedAt":"2026-08-30T21:05:45.952Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}