{"record":{"id":"7a4ec68e6b98a94e","repo":"decolua/9router","slug":"no-google-cloud-project-found-please-ensure-you-h","errorCode":null,"errorMessage":"No Google Cloud Project found. Please ensure you have a GCP project with Gemini Code Assist enabled.","messagePattern":"No Google Cloud Project found\\. Please ensure you have a GCP project with Gemini Code Assist enabled\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/lib/oauth/services/antigravity.js","lineNumber":297,"sourceCode":"      }\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) {\n        throw new Error(\"No Google Cloud Project found. Please ensure you have a GCP project with Gemini Code Assist enabled.\");\n      }\n\n      spinner.text = \"Onboarding to Gemini Code Assist...\";\n\n      // Complete onboarding to enable Gemini Code Assist\n      const onboardResult = await this.completeOnboarding(tokens.access_token, projectId, tierId);\n      const finalProjectId = onboardResult.projectId || projectId;\n\n      spinner.text = \"Saving tokens to server...\";\n\n      // Save tokens to server\n      await this.saveTokens(tokens, userInfo, finalProjectId);\n\n      spinner.succeed(`Antigravity connected successfully! (${userInfo.email}, Project: ${finalProjectId})`);\n      return true;\n    } catch (error) {\n      spinner.fail(`Failed: ${error.message}`);\n      throw error;","sourceCodeStart":279,"sourceCodeEnd":315,"githubUrl":"https://github.com/decolua/9router/blob/90b52e06ffd666b7929554211474d01588f6b1f8/src/lib/oauth/services/antigravity.js#L279-L315","documentation":"Thrown by AntigravityService.connect after a successful token exchange when loadCodeAssist returns no projectId, meaning no Google Cloud project associated with the account has Gemini Code Assist (Cloud AI Companion) enabled. The OAuth credentials are valid at this point; the account simply isn't provisioned for the service this flow onboards into.","triggerScenarios":"loadCodeAssist responds 200 with no cloudaicompanionProject for the freshly exchanged access_token — the Google account has zero Code Assist-enabled GCP projects.","commonSituations":"Brand-new personal Google account never used with Gemini Code Assist; GCP project created but the Gemini Code Assist API never enabled; Workspace account where Code Assist is disabled by policy; wrong Google account chosen on the consent screen.","solutions":["Enable the Gemini Code Assist / Cloud AI Companion API on a GCP project at console.cloud.google.com, then reconnect","Make sure you select the Google account that actually owns a Code Assist-enabled project during the consent screen","Set up a project at console.cloud.google.com if you have none, enable Code Assist, and re-run connect","Check Workspace admin policies if using an organization account — Code Assist may need admin opt-in"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const { projectId, tierId, raw } = await service.loadCodeAssist(tokens.access_token);\nif (!projectId) {\n  console.error(`No Code Assist project. loadCodeAssist raw keys: ${Object.keys(raw).join(',')}. Enable Gemini Code Assist on a GCP project first.`);\n  process.exit(1);\n}","typeGuard":"function isCodeAssistReady(load) { return load != null && (typeof load.projectId === 'string' && load.projectId.length > 0); }","tryCatchPattern":"try {\n  await service.connect();\n} catch (e) {\n  if (e.message.includes('No Google Cloud Project found')) {\n    console.error('Enable Gemini Code Assist on a GCP project, then re-run connect with the correct Google account.');\n  } else throw e;\n}","preventionTips":["Enable Gemini Code Assist on a GCP project before running connect","Select the Google account that owns the Code Assist project on the consent screen","For Workspace accounts, have the admin enable Code Assist first","Verify project setup at console.cloud.google.com before troubleshooting the CLI"],"tags":["google-cloud","oauth","missing-project","configuration"],"backgroundTag":"missing-gcp-project","analyzedSha":"90b52e06ffd666b7929554211474d01588f6b1f8","analyzedAt":"2026-08-30T21:05:45.952Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}