actions-on-googleactions-builder

Google Assistant Hello World Draft Project not updating


Very new to Google Actions. Testing out tutorial stuff. I have tried this in a couple of test projects just to double check. After initial run of any project I do not get any updates on draft projects. No changes show up in draft projects for me for both simulator and real device.

  1. Started new project
  2. Even blank project has basic conversation telling you where to add things next.
  3. Change text.
  4. Notice prompt does not change in testing environment.

In below pictures I have changed the words "hello world" with "Hey Dude" for both fulfillment and console output. I would expect Testing Prompt to respond with "Hey Dude from fulfillment and Hey Dude from the console!" But it does not. Instead it does not reflect any recent changes.

Hey Dude from console Hey Dude from Web Hook Hello World from console


Solution

  • I think there may be two slightly different (but sometimes related) issues going on here.

    The first is that there are known problems with the simulator being slow to pick up on updates, or them not seeming to show up. The second has to do with making sure you're deploying changes from the build-in code editor.

    I don't have a clear answer to the first problem, although I know they're looking into it. I find that I can make some changes and they may not be noticed, but I know they have been picked up if I see the "Your preview is being updated..." spinner appear. There are other spinners that sometimes appear, but unless it explicitly says that it is being updated - the updates aren't always picked up. (Sometimes they are, however.)

    Your preview is being updated

    Usually, if I don't see this, I'll go back and force an apparent change (delete a character from a webhook handler name, then add it back) and go back to the simulator. In general, this time it will say it is updating.

    If you're using the Cloud Functions editor, you need to do three things:

    1. Save the changes. You'll do this by clicking the "Save Fulfillment" button, but this only saves it so you can leave the editor. It doesn't mean that the simulator has access to it yet.

      Save Fulfillment

    2. Deploy the changes. This deploys your code to Cloud Functions so they can be run. Note in the illustration that it says the code is saved, but not yet deployed.

      Deploy Fulfillment

    3. Wait till the changes are fully deployed. Deploying takes time, and until it is completed, it won't be available in the simulator. While deploying, it lets you know.

      Deployment in progress

      Once it has deployed, however, the message changes, and you the impacts should be available through the simulator (although you may still need to see the "being updated" message to be sure).

      Deployment completed

    Remember, however, that you don't need to use the "Cloud Functions editor" in order to deploy a webhook. You can deploy a webhook on any web server where

    1. The host is public (so has a public IP address that Google can reach)
    2. It can handle HTTPS with a non-self-signed certificate

    You can even deploy yourself to Cloud Functions for Firebase, which is the same service that the Actions Builder uses. This way you have the URL set once in the Actions Builder and, once it is set, you won't need to change it.

    But you'll still be able to change your code by managing your own deployment separate from Actions Builder.