GoogleCloudPlatform / cloud-code-intellij

Plugin to support the Google Cloud Platform in IntelliJ IDEA - Docs and Issues Repository
Apache License 2.0
318 stars 59 forks source link

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

Open ianwill93 opened 11 months ago

ianwill93 commented 11 months ago

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

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 commented 11 months ago

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 commented 11 months ago

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>

ivanporty commented 11 months ago

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 commented 11 months ago

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 commented 10 months ago

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

ivanporty commented 10 months ago

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

kefirfromperm commented 10 months ago

@ivanporty actually no, I use Fedora 38 with Firefox

ivanporty commented 10 months ago

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 commented 9 months ago

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

thall commented 4 months ago

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

ivanporty commented 4 months ago

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

thall commented 4 months ago

@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 commented 4 months ago

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 commented 4 months ago

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 commented 4 months ago

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 commented 2 months ago

@ivanporty any update regarding this issue?

OMGeeky commented 2 months ago

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.