Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloud Code without SDK doesn't open browser anymore #3153

Open
ianwill93 opened this issue Jul 24, 2023 · 17 comments
Open

Cloud Code without SDK doesn't open browser anymore #3153

ianwill93 opened this issue Jul 24, 2023 · 17 comments

Comments

@ianwill93
Copy link

(Please ensure you are running the latest version of Cloud Code for IntelliJ with Help > Check for Updates)

  • Cloud Code for IntelliJ version: 23.7.1-api-version-222
  • Google Cloud SDK version: 439.0.0
  • OS: (ChromeOS 115) / Linux 5.15.112-19392-gbd4870223633

What did you do?
I clicked Sign in

What did you expect to see?
The browser should open and I can authenticate through google.

What did you see instead?
The "sign in via opened browser" message loads indefinitely.
image

(screenshots are helpful)
Feel free to deviate from this template as needed, especially if you are submitting a feature request.

@ivanporty
Copy link
Contributor

Hi @ianwill93 we don't see the problem on any of our operating systems. Was it working for you in the previous release (23.6.x)?

@ianwill93
Copy link
Author

ianwill93 commented Jul 27, 2023 via email

@ivanporty
Copy link
Contributor

Thanks for the clarification. Since it worked for you before, we may have slightly different path to open a browser in this release. We will take a look and find a solution for this.

@ivanporty
Copy link
Contributor

We looked into this and it seems we are using an IDE call to open a browser but it doesn't work since Jetbrains doesn't officially support Chrome OS (see here https://www.jetbrains.com/help/idea/installation-guide.html#requirements).

@kefirfromperm
Copy link

is there any way to login to GCP for plugin without browser?

@ivanporty
Copy link
Contributor

@kefirfromperm not at the moment. Are you also using Chrome OS?

@kefirfromperm
Copy link

@ivanporty actually no, I use Fedora 38 with Firefox

@ivanporty
Copy link
Contributor

Thanks for letting us know! It's a bit hard to test all flavors of Linux, however there is one easy test - are you able to open links in the system browser from any other places in the IDE - links to documentation, about, links in the UIs, etc.? If yes, please let us know which links work for you, and we will investigate the way we are opening our login page.

@wspeirs
Copy link

wspeirs commented Sep 12, 2023

I was/am having the same issue, but was able to work-around w/the following:

  • Start IntelliJ via the cmd line, you'll see all kinds of output including lines like: WARN - com.google.cloud.developerexperience.cloudcode.intellij.auth.GoogleLoginStateStore$Companion - Bad State: Unable to retrieve the access token since user is not logged in
  • Click on the login button for Google Cloud. It won't open the browser, but will display a link on the console.
  • Copy and paste that link into the browser, authenticate, and you should be good-to-go.

@thall
Copy link

thall commented Feb 14, 2024

I have the same issue, doing the same workaround as @wspeirs meanwhile

@ivanporty
Copy link
Contributor

@thall Thanks for the report, to confirm, are you also on Chrome OS?

@thall
Copy link

thall commented Feb 14, 2024

@thall Thanks for the report, to confirm, are you also on Chrome OS?

No, I'm not, using NixOS and Firefox 121.0.
image

Any additional information you might need?

@ivanporty
Copy link
Contributor

Thanks!
We use standard IDE tools to open a browser link. Do you recall if other links in your IntelliJ (or other Jetbrains IDE you are using) are opening fine, or don't open too?

@thall
Copy link

thall commented Feb 18, 2024

I haven't had this issue before, all links / browser tabs have opened (both with IntelliJ and Goland).

The flows below successfully opens a browser tab.

Help -> Register... -> Active new license -> View plans and pricing
Install IdeaVim plugin -> Left click IdeaVim icon down to the right -> Star on GitHub

Can the problem be that you try to open a browser tab without user is clicking?
Could you include a link in the "sign in via opened browser" window that is possible to use as an alternative to automatically open a tab?

@MarcinOrlowski
Copy link

Doesn't work for me either using Kubuntu 23.10. InteliJ sits in "Sign in via the opened brower" forever.

There's a work around unless this is fixed. When this issue hit me, I closed PyCharm completely and launched it again but this time from console instead of using launcher icon:

$ pycharm-community

Once it booted up, I attempted to log in again to Google Code, and while UI stuck the same way as before, there was login URL printed into console:

[....]
Please open the following address in your browser:
https://accounts.google.com/o/oauth2/auth?client_id=xxxxxxxxxxxxxx...........nj2nt

I opened link manually in the web browser and completed sign in process. Once completed, plugin instantly recognized that and I was successfully signed in.

@thall
Copy link

thall commented Apr 26, 2024

@ivanporty any update regarding this issue?

@OMGeeky
Copy link

OMGeeky commented May 5, 2024

I had the same issue but starting the IDE (in my case Rider) from the console did show the link that needs to be opened in the console.
Opening that link in the browser worked and after logging in there it immediately recognized the login in the IDE.

Without this workaround the whole thing basically becomes unusable so so this definitely helps a lot.

In my case I couldn't start it from the console by running

$ rider

but I had to use

$ ~/.local/share/JetBrains/Toolbox/apps/rider/bin/rider.sh

since it was installed from the toolbox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants