謝Richard
謝Richard

Reputation: 11

Why the gcloud components update command always show restarting command

When I want to deploy my Go app to App Engine, I found that I have to install the app-engine-go. And it even said the installation is on a new window, no window popped out.

https://github.com/ChihchengHsieh/ProblemsScreenShot/blob/master/image-2.png

C:\go-work\src\orderFunc>gcloud app deploy
The component [app-engine-go] is required for staging this
application.

Restarting command:
  $ gcloud components install app-engine-go

Installing component in a new window.

Please re-run this command when installation is complete.
    $ gcloud app deploy

When I run the command gcloud components install app-engine-go and gcloud components update, it shows:

https://github.com/ChihchengHsieh/ProblemsScreenShot/blob/master/image.png

C:\go-work\src\orderFunc>gcloud components install app-engine-go

Restarting command:
  $ gcloud components install app-engine-go


C:\go-work\src\orderFunc>gcloud components update

Restarting command:
  $ gcloud components update


C:\go-work\src\orderFunc>gcloud components install app-engine-go

Restarting command:
  $ gcloud components install app-engine-go

I already tried reinstalling the google cloud SDK, but it's the same.

I expect it can show some installation process.

Upvotes: 1

Views: 2419

Answers (2)

stefreak
stefreak

Reputation: 1450

For me a working solution in PowerShell was this:

PS C:\Users\project> $Env:CLOUDSDK_PYTHON = gcloud components copy-bundled-python

After running this command (setting the CLOUDSDK_PYTHON envrionment varible) the command would work without opening another window:

PS C:\Users\project> gcloud components install beta


Your current Google Cloud CLI version is: 413.0.0
Installing components from version: 413.0.0

+---------------------------------------------+
|     These components will be installed.     |
+----------------------+------------+---------+
|         Name         |  Version   |   Size  |
+----------------------+------------+---------+
| gcloud Beta Commands | 2023.01.06 | < 1 MiB |
+----------------------+------------+---------+

For the latest full release notes, please visit:
  https://cloud.google.com/sdk/release_notes

Do you want to continue (Y/n)?

I've also found an issue on the Google issue tracker that looks like it could be related on first glance, but it's closed as not reproducable, so if anyone knows what exactly reproduces this problem share it with Google in this issue

Upvotes: 2

Andrei Cusnir
Andrei Cusnir

Reputation: 2805

I was trying to deploy a quickstart for .NET Google App Engine application and I run into the same issue. My issue was that I needed to execute $ gcloud components install beta to be able to deploy my GAE .NET app. And I was getting the same behavior as yours. PowerShell would print

Restarting command:
  $ gcloud components install beta

but nothing actually happened. No window popup nor installation progress in the same window where I run the command. Also non of the other commands for installing or updating components were working. I could only list them with $ gcloud components list, but not install nor update any of them.

SOLUTION

I have noticed that if you run PowerShell with administrative privileges, it will open a window in C:\Windows\system32 directory. If you execute the command there, then another window will pop up and will proceed with installation or update of gcloud components. However if you cd into different directory the behavior will be as mentioned in this issue.

So to resolve this:

  1. Run PowerShell as Administrative
  2. If the directory is different than what I described above execute $ C:\Windows\system32 otherwise go to Step 3
  3. Execute any command you want for gcloud components. e.g. $ gcloud components update or gcloud components install beta etc.
  4. A window should popup and proceed with the installation or update of the components.

Upvotes: 5

Related Questions