eisenzopf / google-action-three-doors

Source code for the article "Building your first Action for Google Home (in 30 minutes)"
21 stars 9 forks source link

Issue while testing three doors action #1

Open sampurohit opened 7 years ago

sampurohit commented 7 years ago

Hi Jonathan,

Thanks for the documentation on steps for setting up the three doors action. I followed the steps mentioned. While testing the action through gactions over command line if facing the below issue. Could you please help me resolve this issue.

My action.json file looks like { "versionLabel": "3.0", "agentInfo": { "languageCode": "en-US", "projectId": "doors-three-0001", "voiceName": "male_1" }, "actions": [ { "description": "Launch intent", "initialTrigger": { "intent": "assistant.intent.action.MAIN" }, "httpExecution": { "url": "https://us-central1-doors-three-0001.cloudfunctions.net/three_doors" } } ] }

Error Detail :

ML137344:google-action-three-doors w37240$ ./gactions test --project "doors-three-0001" --action_package action.json --preview_mins 1234 Pushing the app for the Assistant for testing... ERROR: Failed to test the app for the Assistant ERROR: Invalid JSON payload received. Unknown name "http_execution" at 'preview_action_package.action_package.actions[0]': Cannot find field. Invalid JSON payload received. Unknown name "initial_trigger" at 'preview_action_package.action_package.actions[0]': Cannot find field. Invalid JSON payload received. Unknown name "agent_info" at 'preview_action_package.action_package': Cannot find field. Invalid JSON payload received. Unknown name "version_label" at 'preview_action_package.action_package': Cannot find field. Field Violations:

Field Description

1 preview_action_package.action_package.actions[0] Invalid JSON payload received. Unknown name "http_execution" at 'preview_action_package.action_package.actions[0]': Cannot find field. 2 preview_action_package.action_package.actions[0] Invalid JSON payload received. Unknown name "initial_trigger" at 'preview_action_package.action_package.actions[0]': Cannot find field. 3 preview_action_package.action_package Invalid JSON payload received. Unknown name "agent_info" at 'preview_action_package.action_package': Cannot find field. 4 preview_action_package.action_package Invalid JSON payload received. Unknown name "version_label" at 'preview_action_package.action_package': Cannot find field. 2017/06/23 12:52:42 Server did not return HTTP 200

Glavin001 commented 7 years ago

Same here.

❯ gactions test --project "three-doors-1294" --action_package action.json  --preview_mins 1234
Pushing the app for the Assistant for testing...
ERROR: Failed to test the app for the Assistant
ERROR: Invalid JSON payload received. Unknown name "http_execution" at 'preview_action_package.action_package.actions[0]': Cannot find field.
Invalid JSON payload received. Unknown name "initial_trigger" at 'preview_action_package.action_package.actions[0]': Cannot find field.
Invalid JSON payload received. Unknown name "agent_info" at 'preview_action_package.action_package': Cannot find field.
Invalid JSON payload received. Unknown name "version_label" at 'preview_action_package.action_package': Cannot find field.
Field Violations:
#  Field                                             Description
1  preview_action_package.action_package.actions[0]  Invalid JSON payload received. Unknown name "http_execution" at 'preview_action_package.action_package.actions[0]': Cannot find field.
2  preview_action_package.action_package.actions[0]  Invalid JSON payload received. Unknown name "initial_trigger" at 'preview_action_package.action_package.actions[0]': Cannot find field.
3  preview_action_package.action_package             Invalid JSON payload received. Unknown name "agent_info" at 'preview_action_package.action_package': Cannot find field.
4  preview_action_package.action_package             Invalid JSON payload received. Unknown name "version_label" at 'preview_action_package.action_package': Cannot find field.
2017/06/28 19:13:30 Server did not return HTTP 200

With action.json:

{
  "versionLabel": "1.0",
  "agentInfo": {
    "languageCode": "en-US",
    "projectId": "three-doors-1294",
    "voiceName": "male_1"
  },
  "actions": [
    {
      "description": "Launch intent",
      "initialTrigger": {
        "intent": "assistant.intent.action.MAIN"
      },
      "httpExecution": {
        "url": "https://us-central1-three-doors-1294.cloudfunctions.net/three_doors"
      }
    }
  ]
}