cloud-code-intellij icon indicating copy to clipboard operation
cloud-code-intellij copied to clipboard

Cloud Code without SDK doesn't open browser anymore

Open ianwill93 opened this issue 1 year ago • 17 comments

(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.

ianwill93 avatar Jul 24 '23 22:07 ianwill93

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)?

ivanporty avatar Jul 27 '23 14:07 ivanporty

Yes, it was.

As mentioned, I'm only having the problem on ChromeOS. Attempting to sign-in is supposed to trigger the browser login, but I believe the sdk is having trouble hitting the garcon-url-handler.

On Thu, Jul 27, 2023, 10:46 AM Ivan Porty @.***> wrote:

Hi @ianwill93 https://github.com/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)?

— Reply to this email directly, view it on GitHub https://github.com/GoogleCloudPlatform/cloud-code-intellij/issues/3153#issuecomment-1653770308, or unsubscribe https://github.com/notifications/unsubscribe-auth/APDF72G3E5T7WCKYCPWEQZ3XSJ5MRANCNFSM6AAAAAA2WGVOPU . You are receiving this because you were mentioned.Message ID: @.*** com>

ianwill93 avatar Jul 27 '23 14:07 ianwill93

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 avatar Jul 27 '23 15:07 ivanporty

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).

ivanporty avatar Aug 08 '23 14:08 ivanporty

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

kefirfromperm avatar Sep 01 '23 13:09 kefirfromperm

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

ivanporty avatar Sep 01 '23 16:09 ivanporty

@ivanporty actually no, I use Fedora 38 with Firefox

kefirfromperm avatar Sep 01 '23 18:09 kefirfromperm

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.

ivanporty avatar Sep 01 '23 21:09 ivanporty

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.

wspeirs avatar Sep 12 '23 20:09 wspeirs

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

thall avatar Feb 14 '24 09:02 thall

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

ivanporty avatar Feb 14 '24 17:02 ivanporty

@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?

thall avatar Feb 14 '24 17:02 thall

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?

ivanporty avatar Feb 15 '24 16:02 ivanporty

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?

thall avatar Feb 18 '24 17:02 thall

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.

MarcinOrlowski avatar Feb 21 '24 18:02 MarcinOrlowski

@ivanporty any update regarding this issue?

thall avatar Apr 26 '24 08:04 thall

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.

OMGeeky avatar May 05 '24 13:05 OMGeeky