1
votes

I haven't done much with Google App engine lately and the last time I worked on it was when the SDK was 1.9.25 and the Eclipse plugin was seamless. Now after quite some digging, I found that Google changed everything to Google cloud tools and that Java 8 is only supported by it. So I downloaded Eclipse Oxygen and updated the plugin. I created a new project with Google Standard environment and am trying to run the sample project that it generated. Now I get the following error

ERROR: (gcloud.components.update) Your current working directory is inside the Cloud SDK install root: C:\Users\\AppData\Local\Google\ct4j-cloud-sdk\LATEST\google-cloud-sdk. In order to perform this update, run the command from outside of this directory.

I read through some posts and found older python installation (2.7 version), so I removed the System and User path references. I also created an Environment variable for CLOUDSDK_PYTHON with value of C:\Users\<user name>\AppData\Local\Google\ct4j-cloud-sdk\LATEST\google-cloud-sdk\platform\bundledpython\python.exe. Yet I am still stuck in the same error. I just wanted to use latest version to port to Java 8 runtime.

Full log from Eclipse console is as below

    [Installing Google Cloud SDK]
Welcome to the Google Cloud SDK!


Your current Cloud SDK version is: 204.0.0
Installing components from version: 204.0.0

ERROR: (gcloud.components.update) Your current working directory is inside the Cloud SDK install root: C:\Users\<user name>\AppData\Local\Google\ct4j-cloud-sdk\LATEST\google-cloud-sdk.  In order to perform this update, run the command from outside of this directory.

This will install all the core command line tools necessary for working with
the Google Cloud Platform.

[Installing Google Cloud SDK]
Welcome to the Google Cloud SDK!


Your current Cloud SDK version is: 204.0.0
Installing components from version: 204.0.0

ERROR: (gcloud.components.update) Your current working directory is inside the Cloud SDK install root: C:\Users\<user name>\AppData\Local\Google\ct4j-cloud-sdk\LATEST\google-cloud-sdk.  In order to perform this update, run the command from outside of this directory.

This will install all the core command line tools necessary for working with
the Google Cloud Platform.
4
Just to note that this has been fixed in the Cloud Tools for Eclipse 1.7.1, released today.Brian de Alwis

4 Answers

1
votes

I figured out the issue after a bunch of trial and error. J.L Valtueña is partially right, but even while installing directly, I had the same error. The issue is that this error occurs in Windows if you run this from the /bin directory where gcloud is available, you need to go two folders up and execute it from there. In my case, folder was C:\data\setup\google-cloud-sdk\bin for the gcloud utility. I had to execute as below

C:\data\setup>google-cloud-sdk\bin\gcloud ...

Notice how the command was executed with sub-folders from home directory. This solved the issue and I got the eclipse to point to this like J.L Valtueña mentioned which is also depicted somewhere else on stackoverflow. For anyone else running into this, use above and save your time.

0
votes

I recommend you to reinstall Cloud SDK following the official documentation steps {1}. After reinstalling Cloud SDK run this command to install the Java component [2]:

gcloud components install app-engine-java

After doing this create a new App Engine Standard project on Eclipse, check if the Cloud SDK path is correct (Window -> Preferences -> Google Cloud Tools) and try running it.

{1}: https://cloud.google.com/sdk/

{2}: https://cloud.google.com/sdk/docs/components

0
votes

In my case I have the same problem. After installing fresh Eclipse Oxygen could not add google cloud via Eclipse marketplace. I try also STS but the same issue:

ERROR: (gcloud.components.update) Your current working directory is inside the Cloud SDK install root: C:\Users\myName\AppData\Local\Google\ct4j-cloud-sdk\LATEST\google-cloud-sdk. In order to perform this update, run the command from outside of this directory.

In my solution I did manually, downloaded SDK from https://cloud.google.com/sdk/docs/quickstart-windows . I also put it near root as I saw issue on github:

https://github.com/GoogleCloudPlatform/google-cloud-eclipse/issues/3065 https://github.com/GoogleCloudPlatform/google-cloud-eclipse/issues/3131

and set path in Eclipse at Windows/preferences/Google Cloud Tools => SDK Location.

The last step was to add App Engine component ( https://cloud.google.com/appengine/docs/standard/java/quickstart ), but you have run it from 2 folders up. For example:

C:\google_cloud>C:\google_cloud\google-cloud-sdk\bin\gcloud components install app-engine-java
0
votes

If you prefer you can set SDK where you execute update with follow command:

gcloud components update

when it finish find the directory with pwd (in linux ) or echo %cd% (in windows)

So, set this directory into your eclipse preferences: Windows >> Preferences >> (find) Google Cloud Tools Select Choose SDK and set same directory finded with executed commands.