Google Cloud Project won't delete - google-cloud-platform

I made a Google Cloud project to test a few things out. The main one being DataPrep. Then I decided I'd do something else for a bit and tried to delete the project.
I opened up the Google Cloud Shell and typed:
gcloud projects delete <project_name>
and then typed Y for Yes and now it is just hung there doing nothing at all. It doesn't really matter I guess but it is annoying having an old project hanging around I can't get rid of.
I've tried with billing enabled and disabled but neither seem to make a difference. I was using the shell from within the Console website by the way.
Does anyone have any idea why it is taking so long to delete this project?

I think you should follow these steps
To shut down a project using the Cloud Platform Console:
Open the Settings page in the Google Cloud Platform Console.
Click Select a project.
Select a project you wish to delete
and click Open.
Click Delete Project.
Enter the Project ID and click Shut down.

Related

Failing to delete GCP project due to non-existent DialogFlow agent

I am trying to delete a GCP project.
Now, it used to have a Google Assistant integration (~ 3 years ago) but now I don't need it anymore and I want to delete it.
When I try to delete the project -> it tells me it can't because it's liked to a Dataflow agent. It provides me with a link but when I follow it, there are no agents listed there. I browsed all available regions, but no agents are listed.
I went to Actions from GCP console, but I can't delete the Actions project either (same reason). When I go to my defined action, I am prompted to migrate to Actions Builder (but I get a generic error trying to do that). In any case, if I try to edit my action in Dataflow, it takes me to the same homepage which prompts me to create an agent - as it doesn't list any.
So I'm stumped - I can't delete my project because of an existing Dataflow agent but Dataflow doesn't list any agents in any region.
Can anyone with Dataflow/GCP experience provide any insight into anything I may try ? Thanks!
There are mainly two possible situations for the issue Failing to delete GCP project due to non-existent DialogFlow agent:
The agent has been deleted, but the lien was not deleted.
The agent was not deleted.
You can follow the steps below to solve the issue:
Delete the agents associated with the project and try again to delete the project. If this does not solve the issue then follow step2.
Even though you deleted the agent, the lien used by the agent is not deleted. Run this CLI command gcloud alpha resource-manager liens list to list liens and then run the gcloud alpha resource-manager liens delete LIEN_NAME command then you can try again to delete the project. For more information, you can refer to the google cloud documentation. If this does not solve the issue then follow step3.
Deactivate the Dialogflow API from the GCP console: Open APIs & Services dashboard then click on Dialogflow API then click on Disable API. After disabling the Dialogflow API, try again to delete the project.

How to prevent GCP Cloud Shell from automatic popping up in console every time I open a page

Some time ago (a month or more) GCP Cloud Shell started to show up automatically every time I opened a page (some GCP page). It says it's reconnecting to the existing service. It happens even if I close the one on my first page. Then when I open a new page (for example, with Ctrl + Mouse Left Click in windows in Chrome) the Cloud shell automatically opens up again.
I would like Cloud Shell on the new page to be open only if I manually open it. Maybe I need to configure something somewhere. It's also bad because it uses the available quota for Cloud Shell, decreasing it without my will.
How is it possible to achieve that and disable auto-opening of GCP Cloud Shell?
Look at the URL in your browser. most probably you will find &cloudshell=true appended to it. remove that part and you should be fine.
Note:
When you open cloudshell. the mentioned part is appended with the value true. and when you close it, its value becomes false. if you have issues with that then most probably it's something with your browser.

The problem of widget isn't invoked using google assistant

Do anyone have the similar problem to control Android apps (from google codelab - fitness app) with their voice, using Google Assistant?
In my app, I tried to activate widget using google assistant (app action tool test), but google assistant doesn't give any respond. Therefore, I used the example code google gave to run, but it still has similar problem that widget isn't invoked when I use app action tool test to test the app.
Sample code google provided:
https://github.com/actions-on-google/appactions-fitness-kotlin.git
the shortcut looks like below and how :
enter image description here
Update:
After updating the new running record, the app won't respond when I want to trigger widget after the first time I can do it successfully. Do anyone have similar question or know how to solve it?
App updates running record
The widget cannot update/display the new running record
widget cannot be trigger to get new running record
I'm assuming you're talking about the codelab titled Integrate Android Widgets with Google Assistant.
I've been able to get this codelab to work - mostly.
When testing using the App Actions test tool:
Make sure you have uploaded the app to a project in the Google Play Console. You'll only need to do this once, even if you change your code.
Make sure the account you're using for Android Studio, Play Console, and Google Assistant on your device are all the same.
Make sure you've compiled the app and deployed it to your device. The easiest way to do this just to run it from Android Studio the first time.
When you create the preview, set the name and Locale.
Even tho these are listed as "optional", these make it easier to debug.
The App name should be something you know will be recognized by voice and not used by any other app. I tend to use things like "Splat" and "Bogus".
Set the locale to en-US
Click "Create Preview"
Once the preview is created, you can test the widget running by
Setting the Intent to GET_EXERCISE_OBSERVATION
Changing the value in the "name" property to something like "run". ("Climbing" will also work, but tell you that you don't have that activity logged.)
Making sure the target device is the one you're testing on.
Clicking Run App Action
And you should see the widget appear in the Assistant on the device.
You don't need to use the test tool, however. Once you have created the preview with the Test Tool, you can just test it right on the device:
Start the Assistant by long-pressing on the home button.
Saying or typing a request such as "How far have I run with Bogus" ("Bogus" being the name I've chosen this time
If you have issues with the emulator, there are some other troubleshooting steps which may be useful depending on the error message you get.
Now, I did say "mostly". I have seen issues where it will stop responding at all, either via the Test Tool or directly via the Assistant. A few things that I've done that often (but not always) help:
Delete and then create the preview again.
Remember that the Preview is only available for a few hours.
Force stop the application.
Force stop the Google Assistant.
Even if you don't see a message, check out the Troubleshooting steps for "Sorry, I couldn't find that"

Google Cloud shell appears to be hanging on provisioning

Anyone else having issues with Cloud Shell this morning? -- My first time working in GCP and when I clicked on cloud shell, the process appears to be hanging at the provisioning stage. According to the docs, this should only take a minute, but I've been waiting more than 20 minutes now and it's still spinning with no apparent progress.
I thought it might have been blocking some process (thank you uBlock origin), but reloading the page with uBlock turned off, I see the same behavior.
Thoughts?
This issue is hard to investigate/track since no error appeared, sometimes related to Cloud Shell location/region. I may suggest to troubleshoot by doing any steps below:
In the Cloud Shell menu, click the three dots menu icon, then click Restart Cloud Shell. Click Restart Cloud Shell in the confirmation dialog.
Add the following in the address bar in Cloud Shell URL so it will open the shell in the safe mode then click the three dots menu icon and click Restart.
&cloudshellsafemode=true
Try to restart the browser or you can try to access or open the Cloud Shell with a different browser.
Try the browser incognito mode.
If the Cloud Shell still does not open, as a workaround, I recommend to install the Cloud SDK to your machine to access your GCP resources.
If all the steps above doesn't work, I'll recommend to contact Google Cloud Platform Support or create a Public Tracker Issue to further investigate this kind of issue.

Stackdriver Logging not recognizing Google Apps Script project from Team Drive

I was using Google Apps Script for standard document-bound functions in a personal Google Drive. For debugging and general info-printing out, I was using console.log() calls and looking at the Stackdriver Logging output for that particular project.
I recently copied many of the documents and their associated code projects into a new Team Drive. The new files are completely new (not shared into the Team Drive) and they have a different creator than the originals.
Now when attempting to view the log outputs, Stackdriver Logging gives me this error message:
Failed to load
Tracking Number: XXXXXXXXXXXXXXXXXXX
What's more, the "Select a project" dropdown at the top of the page does not list any of the projects.
I've tried creating a brand new script project in the Team Drive, but that does not appear either. The Stackdriver page is logged into the correct account.
I'm aware of other solutions, such as Logger.log(), but would rather not resort to them unless I can't get Stackdriver to work again.
Edit: I found this question, which includes this sentence:
I have reset the script's Cloud project to be a "real" project (as opposed to the default hidden one).
This sounds important but I have no idea what it means and have been unable to find anything relating to making projects unhidden. Is this my problem?
I have found the solution, though I don't fully understand it.
Google Apps Script projects are associated with a hidden Google Cloud Platform project behind the scenes, which allow them to print to Stackdriver Logging, among other things. Trying to run them out of a Team Drive makes this not work for reasons that are a mystery to me.
Here is the fix:
Manually create a new Google Cloud Platform project.
Associate your scripts with the new project. In the Script Editor, go to Resources > Cloud Platform project. In the dialogue, enter the project number of the project you just created, and then hit Set Project. To find the project number (distinct from the "Project ID"), click on View API Console, and then make sure you have your new project selected at the top of the page.
This needs to be done for each GAS project. Whereas in Drive, separate projects often can't be combined into one since each is bound to a single document, all of your GAS projects can be associated with a single Google Cloud Platform project.