gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

Gemini Code Assist stuck on "Sign in" / cannot complete authentication in VS Code

Open evertonfoz opened this issue 2 months ago • 27 comments

What happened?

I am persistently unable to sign in to Gemini Code Assist in Visual Studio Code. The extension keeps showing the "Sign in" button or gets stuck on the splash/loading screen, even after completing Google authentication in my browser (tried Chrome and Comet).

Troubleshooting steps already tried:

Cleared all browser cache and cookies (Chrome and Comet).

Uninstalled Gemini Code Assist, manually deleted cache folders for VS Code, and reinstalled the extension.

Signed out and in with multiple different Google accounts (including workspace and personal).

Updated to the latest stable versions of VS Code and the extension.

Tried Incognito/Private mode and clean browser profiles.

Restarted my system and repeated all steps.

Checked all browser and VS Code permissions.

Reviewed local logs; no clear error is shown after redirecting back from Google authentication.

Observations:

Google login works perfectly in browsers, but never completes inside the extension.

I have seen many similar reports from other users in forums and GitHub Issues.

I suspect there is a bug on the Gemini Code Assist service side, possibly related to Google session/tokens or account eligibility.

Logs attached. System: MacBook Pro, browsers: Chrome/Comet, latest VS Code stable release.

What did you expect to happen?

I expected to be able to sign in to Gemini Code Assist with my Google account and start using the extension normally within VS Code after authentication.

Client information

Client Information

Run gemini to enter the interactive CLI, then run the /about command.

> /about
# paste output here

Login information

No response

Anything else we need to know?

No response

evertonfoz avatar Oct 10 '25 18:10 evertonfoz

Same here.

thi-ideta avatar Oct 13 '25 08:10 thi-ideta

I think its been deprecated

JPsGithub1 avatar Oct 13 '25 09:10 JPsGithub1

same

cbb4611-pixel avatar Oct 13 '25 11:10 cbb4611-pixel

It looks like an account-specific issue.

My free-tier account works without any problem, but the premium account doesn’t allow login.

swafin avatar Oct 13 '25 11:10 swafin

Same issue. Works on one account, but stuck on the other. CLI works fine though.

No errors. Just stuck.

TomerHeber avatar Oct 13 '25 12:10 TomerHeber

I will pass this on to the VS Code team. That's obviously not open source so it will be assigned an internal bug for tracking purposes. Once I know what it is, I can update here in case any of you want to file a support ticket.

bdmorgan avatar Oct 13 '25 12:10 bdmorgan

So here's how I was able to fix it. I had to set gemini code assist to the correct project name in settings:

Image

Once I did that, it started to work instantly. This issue likely impacts enterprise/premium users.

TomerHeber avatar Oct 13 '25 12:10 TomerHeber

Thank you for the bug report, we are investigating, please indicate whether or not providing a valid setting for geminicodeassist.project as indicated by @TomerHeber above resolves this issue.

kschaab avatar Oct 13 '25 14:10 kschaab

This is internal issue b/450930262

bdmorgan avatar Oct 13 '25 15:10 bdmorgan

@TomerHeber Thanks for you suggestion but I'm using Gemini Pro without any project to fill in. Still waiting for the fix.

dinhanhthi avatar Oct 14 '25 09:10 dinhanhthi

So here's how I was able to fix it. I had to set gemini code assist to the correct project name in settings: Image

Once I did that, it started to work instantly. This issue likely impacts enterprise/premium users.

Just deleted the whole line of geminicodeassintant : Project and started working instantly, thx very much

rubensp03 avatar Oct 14 '25 10:10 rubensp03

@dinhanhthi - see @rubensp03 comment above. If you aren't using it, try deleting the whole line.

TomerHeber avatar Oct 14 '25 11:10 TomerHeber

@TomerHeber Thanks deleting the project name worked!

samir100go avatar Oct 15 '25 06:10 samir100go

So here's how I was able to fix it. I had to set gemini code assist to the correct project name in settings: Image

Once I did that, it started to work instantly. This issue likely impacts enterprise/premium users.

Thank you, as soon as I deleted the pre-configured Project.. It started working instantly and even pulled the correct project name from cloud. This workaround helps, get us running!

pratik-saptarshi avatar Oct 19 '25 19:10 pratik-saptarshi

I used the project ID and it worked again. I had a project I no longer used.

MarrosSaldanha avatar Oct 26 '25 18:10 MarrosSaldanha

I used the project ID and it worked again. I had a project I no longer used.

Ibra7997 avatar Oct 31 '25 11:10 Ibra7997

it does not work for me and super annoying. Why do i have to have a project on the cloud to make it work. ? If i use default then i get an error The set project ID (...) was invalid, or the current account lacks permission to view it.

I do not want to create a project with this id on the cloud, i have a default project there but if i use that ID sign in is again stuck. Only way to make sign in work is to use this deafult project id and removing it makes it reappear again

engbizcoder avatar Nov 02 '25 07:11 engbizcoder

Removing the project name helped. thanks

syedhannan avatar Nov 06 '25 06:11 syedhannan

If there is any project name, remove it. Its fixed my issue

Go to extention settings -> search project -> remove if ther is any project name.

Image

st-arafat avatar Nov 08 '25 04:11 st-arafat

Downgrading to version v2.57.0 worked for me.

Moddus avatar Nov 08 '25 20:11 Moddus

same here, just stuck on the "Login opened browser" step, but no login browser tab opend

Image

suguanYang avatar Nov 19 '25 08:11 suguanYang

Removing project ID cannot solve the problem for me. I got error: gemini code assistant in VS Code error fulfilling "service/healthcheck" request #14, &{}: rpc error: code = FailedPrecondition desc = Project ID not configured. Please specify a project in the settings.

For my case, I need to enable "Gemini for Google Cloud" in "APIs & Services" under Google Cloud Console (cloud.google.com) in "Default Gemini Project". You may create a dedicated project for the purpose. Here are the steps.

  1. Go to Google Cloud Console
  2. Choose a project at the top left
  3. In the search bar, type "APIs & Services" and choose it
  4. There is a low profile "button" below the search bar - "Enable APIs & services", click that
  5. Now there is another search bar, search "Gemini for Google Cloud" then click into it
  6. Enable
  7. Now click on your project name at the top navigation bar
  8. Copy the project ID from the project profile page
  9. Put the project ID to your VSCode @ext:google.geminicodeassist Project settings

ah-bez avatar Nov 21 '25 17:11 ah-bez

It seems that Gemini Code Assist must have a Project configured, always.

My issue was that the Project that was set in my VSC environment was owned by an organization that was not associated with the account I was logging in with.

If you do not have a project configured in GCP, or if you have not logged into GCP you it looks like you need to do so before you try this. I would also go to AI Studio and enable any API access it requires prior to trying the extension.

Fix that worked for me:

Click on Sign-In and complete the sign-in process. You will see the spinning wheel.

Next:

ctrl-shift-P Preferences: Open Settings (UI) @ext:google.geminicodeassist project Delete the Project Name (note that it will fill it in again with an existing project after a brief pause) Code Assist comes to life magically after this.

Interestingly, the code assist UI settings say:

Geminicodeassist: Project
Enter a Google Cloud project to use for Gemini Code Assist.

This does not apply to Gemini Code Assist for individuals....

However, this seems to be inconsistent with observed behavior.

mvange avatar Nov 22 '25 17:11 mvange

for those still having issues: try uninstalling the Gemini Code Assist extension, closing VSCode completely, delete the ~/.cache/cloud-code dir (in Linux, I don't know about other systems), reopen VSCode and reinstall the extension.

I had the same exact issues (extension not starting, unknown project name being set continuousty) and it all worked again alright after I deleted that directory. I am quite sure that gets corrupt with some heavy prompts and the extension is not capable of recovering from that.

Oh and check if you had this as well in your extension's "features" tab

Image

lupodellasleppa avatar Nov 25 '25 23:11 lupodellasleppa

For me I had to set the "External Browser" manually for some reason. vscode://settings/workbench.externalBrowser

jlaramie avatar Dec 09 '25 17:12 jlaramie

In my case I had to remove the selected gcp project. Once no project was selected it just worked immediately.

kferrone avatar Dec 16 '25 15:12 kferrone

I am using Google AI Pro, and had the same issue. Resolved it by creating a GCP Project and adding the project to the Extension Settings.

Not exactly sure why Gemini Code Assist works in this behavior, but at least it works.

rayhwang3130 avatar Dec 17 '25 03:12 rayhwang3130