actions-on-google / codelabs-nodejs

Actions on Google Codelabs
https://codelabs.developers.google.com/?cat=Assistant
Apache License 2.0
264 stars 188 forks source link

Step 8 - Code Lab 2 #34

Open ethai opened 5 years ago

ethai commented 5 years ago

the suggested code references 'title' property which appears to be undefined when the code is executed.

const colorMap = {
  'indigo taco': {
    title: 'Indigo Taco',
    text: 'Indigo Taco is a subtle bluish tone.',
    image: {
      url: 'https://storage.googleapis.com/material-design/publish/material_v_12/assets/0BxFyKV4eeNjDN1JRbF9ZMHZsa1k/style-color-uiapplication-palette1.png',
      accessibilityText: 'Indigo Taco Color',
    },
    display: 'WHITE',
  },
  'pink unicorn': {
    title: 'Pink Unicorn',
    text: 'Pink Unicorn is an imaginative reddish hue.',
    image: {
      url: 'https://storage.googleapis.com/material-design/publish/material_v_12/assets/0BxFyKV4eeNjDbFVfTXpoaEE5Vzg/style-color-uiapplication-palette2.png',
      accessibilityText: 'Pink Unicorn Color',
    },
    display: 'WHITE',
  },
  'blue grey coffee': {
    title: 'Blue Grey Coffee',
    text: 'Calling out to rainy days, Blue Grey Coffee brings to mind your favorite coffee shop.',
    image: {
      url: 'https://storage.googleapis.com/material-design/publish/material_v_12/assets/0BxFyKV4eeNjDZUdpeURtaTUwLUk/style-color-colorsystem-gray-secondary-161116.png',
      accessibilityText: 'Blue Grey Coffee Color',
    },
    display: 'WHITE',
  },
};

i updated with 'Title' instead to have it working as described in the tutorial

Oortone commented 5 years ago

What's the reason a capital 'T' is needed here? I can't se why?

Lugialink commented 4 years ago

hey how did you resolved? i can't resolve that bug

sheepworrier commented 4 years ago

Any update on this one? I get the following message with either title or Title:

  "responseMetadata": {
    "status": {
      "code": 10,
      "message": "Failed to parse Dialogflow response into AppResponse because of invalid platform response: Could not find a RichResponse or SystemIntent in the platform response for agentId: xxxxx and intentId: yyyyy. WebhookStatus: code: 14\nmessage: \"Webhook call failed. Error: UNAVAILABLE.\"\n."
    }