actions-on-google / dialogflow-interactive-canvas-nodejs

A sample that demonstrates how to create an Interactive Canvas experience using Actions on Google for the Google Assistant.
Apache License 2.0
76 stars 27 forks source link

onUpdate is not calling #4

Closed ravirupareliya closed 4 years ago

ravirupareliya commented 5 years ago

I have deployed it on firebase hosting. While testing it with actions simulator, it is calling conversation but does not call onUpdate callback of ImmersiveResponse.

 conv.ask(`Ok, I changed my color to ${color}. What else?`);
 conv.ask(new ImmersiveResponse({
     state: {
         tint: tints[color],
     },
 }));

from above code I am able to see response Ok, I changed my color to Red. What else? but onUpdate log is not printed on firebase functions console.

code snippet for callback

// register assistant canvas callbacks
const callbacks = {
    onUpdate(state) {
        console.log('onUpdate', JSON.stringify(state));
        if ('tint' in state) {
            sprite.tint = state.tint;
        }
  },
};
assistantCanvas.ready(callbacks);
Fleker commented 5 years ago

onUpdate would not be called in your Firebase Function at all. It would appear locally in your web surface and be logged in your local devtools.