Cloud Tools for IntelliJ Authentication Failure
Answered
I have intelliJ Idea installed on a Google PixelBook Linux Environment.
When connecting to Google Developers Console to access source code a call is made to the chrome browser to authenticate the google account. A redirect from Chrome is then attempted to be passed back to intelliJ to complete the authentication. The callback fails with the message "localhost refused to connect".
I suspect because IntelliJ is running in a Linux container it cannot be accessed by the Chrome browser that initiated the authentication.
Is there anyway to manually pass the connection string back into IntelliJ so the authentication can complete?
Please sign in to leave a comment.
What is the exact error/exception you get?
>Is there anyway to manually pass the connection string back into IntelliJ so the authentication can complete?
Cloud Tools for IntelliJ IDEA are developed by Google. It is better to address the question to them.
The exact error...
In IntelliJ a dialog appears stating "Please sign in via the opened browser". This remains onscreen indefinitely, until the user clicks cancel.
In Chrome browser the following webpage text is displayed...
This site can't be reached
localhost refused to connect.
Search Google for localhost 52931 Callback
ERR_CONNECTION_REFUSED
Ah the error is returned by the Google Chrome, not IDE. If possible try changing localhost to an actual ip address of your pc (e.g. 127.0.0.1 or another).
Otherwise try asking on corresponding forums/SO or the plugin vendor how can this be work-arounded or file an issue with them. Thanks.
Thanks. I resolved this by installing Chromium in the same container that had IntelliJ such that the redirect could pass back the necessary authentication information. It appears you can't develop in a container on the pixelbook and use the inbuilt chrome browser which is outside the container.
I have the same problem running IDEA under WSL 2 (Windows Subsystem for Linux).
I also had the WSL 2 problem, here's a workaround:
1. Go to help and select “Show log in file manager”
2. Click on “Sign in” from Tools/Google cloud code menu
3. Open idea log and locate “Please open the following address in your browser” in the log
4. Copy url in the following line and open it in a browser ( I used Linux browser within WSL2, didn't try elsewhere)
5. Follow login steps in the browser when you land logged in the google cloud console you should also be logged in within the IDEA plugin.