Google Assistant problems which fail silently


#1

After working a bit more with the Jovo framework for developing Google Assistant actions, I compiled this list of problems that might have cryptic error messages, or fail silently. Hopefully this may help someone else trouble shooting a tricky problem.


.displayText() with i18n speech object
When using the i18n speeach object with the .displayText() method you need to call .toString():
.displayText(this.t('welcome).toString())

Otherwise the application will fail silently, if you don’t call .toString()
.displayText(this.t('welcome))


An error that happens when you forget to to set a conversation.$user.$data variable when unit testing.

TypeError: Cannot read property 'google' of undefined
    at GoogleAssistantDialogflowFactory.createResponse (/Users/milanarezina/WebstormProjects/wyzefind-jovo-integration/node_modules/jovo-platform-googleassistant/src/dialogflow/GoogleAssistantDialogflowFactory.ts:31:43)
    at DialogflowResponseBuilder.create (/Users/milanarezina/WebstormProjects/wyzefind-jovo-integration/node_modules/jovo-platform-dialogflow/src/core/DialogflowResponseBuilder.ts:13:29)
    at Conversation.sendToServer (/Users/milanarezina/WebstormProjects/wyzefind-jovo-integration/node_modules/jovo-core/src/Conversation.ts:145:65)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

Google Assistant list selection on surfaces with no screen

Google Home speaker surface does not call the ON_SELECT_ELEMENT even if the user says the name of the list element. On a surface with a screen, saying the list items name would invoke ON_SELECT_ELEMENT.

You need to also have Ordinal selection handlers for your action to be compatible with surfaces with no screen. To handle the user saying the name of a list element to select it, you need to add a reprompt to handle the user not using ordinal selection.


Spreadsheets CMS
You can’t leave an empty row in between rows with key value pairs in an i18n key value sheet. If there is an empty row then the utterances will contain the text of the key instead of the value. This fails silently.


#2

Hi @Marko_Arezina, thanks for your efforts to compile and document this list of issues, this is great! :+1:

Let’s look into the first issue:

Very good point, I am personally just so used to working with the Jovo framework and the speechbuilder that I don’t even think about this anymore! My first idea was to extend the documentation such that it displays the warning to not use a speechbuilder object as the argument of such functions, but maybe the better approach would be to actually allow it and let the displayText method extract the text from the speechbuilder object. :thinking:
If you feel like implementing this in a pull request, I think these are the places where to make these changes. :innocent:


#3

Hi @Marko_Arezina, me again! :wave:

I tried to reproduce your issue with empty rows in a key-value-type sheet of a Spreadsheet CMS, but for me everything was resolved as expected, without silent failing.

To reproduce, I used the “True or False Game” template, a private Google CMS Spreadsheet with the content shown below, and a Google Action via Dialogflow.
image
Please let me know if you have an idea of how I can reproduce your observed behavior! :smiley:


#4

I’m using a Responses sheet type.54%20PM

With this notation:

this.t('welcome')

If I insert a black row right under the first (key / en) row I get this error:

  Error -----------------------------------------------------------------
  
  Code:
  ERR_PLUGIN
  
  Message:
  No spreadsheet values found.
  
  Stack:
  Error: No spreadsheet values found.
      at ResponsesSheet.parsePublicToPrivate (/Users/milanarezina/WebstormProjects/wyzefind-jovo-integration/node_modules/jovo-cms-googlesheets/src/DefaultSheet.ts:132:19)
      at ResponsesSheet.retrieve (/Users/milanarezina/WebstormProjects/wyzefind-jovo-integration/node_modules/jovo-cms-googlesheets/src/DefaultSheet.ts:100:27)
      at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:188:7)
  
  Module:
  jovo-cms-googlesheets
  
  Details:
  It seems like your spreadsheet is empty or without values.

If I insert an blank row after “welcome” for example:
31%20PM

//Will return correct en value "Hi there!"
this.t('welcome')
//Will say "which.topic" in utterance instead of en value, "Which topic?"
this.t('which.topic')

Same for all of the other rows below the blank row