actions-on-google-nodejs icon indicating copy to clipboard operation
actions-on-google-nodejs copied to clipboard

conv.user.storage clears out (doesn't store) data between sessions

Open dava-ua opened this issue 6 years ago • 4 comments

Hi all,

I've been developing my "Action on Google" almost a year. This bug(feature?/unexpected behaviour) I've been observing last 2-3weeks. Before, storing into conv.user.storage worked as expected.

Steps to reproduce (env: simulator, "actions-on-google": "2.12.0", testing location: Germany):

  1. Ok, google, talk to <MyActionName> -> gapp.intent('Default Welcome Intent', async (conv) => { if (!conv.user.storage || Object.keys(conv.user.storage).length === 0) { console.log('Default Welcome Intent -- New User'); conv.followup('selectNativeLanguage'); } else {...} });`

  2. User goes to the following intent and see the list of options

  3. User select an option: gapp.intent('Select Native Language - get', async (conv, input, option) => { conv.user.storage.nativeLang = option; // some logic.... });

  4. User goes further through the Action - conv.user.storage persists between conversation turns.

  5. User want quite the Action: say/type: "stop"

  6. I log last state of the conv.user.storage gapp.intent('actions_intent_CANCEL', (conv) => { console.log("actions_intent_CANCEL: ", JSON.stringify(conv.user.storage)); conv.close("Ciao!") }); Looks good: actions_intent_CANCEL: {"nativeLang":"en-US"}

  7. User return to the Action: Ok, google, talk to <MyActionName> -> Logs shows conv.user.storage is empty. The bug/feature? always reprodusible for new sessions. Default Welcome Intent -- New User conv.user.storage: {}

Welcome Request example: { "user": { "locale": "en-Us", "lastSeen": "2019-09-26T08:08:05Z", "userVerificationStatus": "VERIFIED" }, "conversation": { "conversationId": "ABwppHGo_0OwMRusa2qgiclwE45MewfkOwU1ue3ohDkBIyJkBmemII0MMLczm61OHqsBQ4hwBA8iGm6s57U", "type": "NEW" }, "inputs": [ { "intent": "actions.intent.MAIN", "rawInputs": [ { "inputType": "KEYBOARD", "query": "talk to MyActionName" } ] } ], "surface": { "capabilities": [ { "name": "actions.capability.AUDIO_OUTPUT" }, { "name": "actions.capability.MEDIA_RESPONSE_AUDIO" }, { "name": "actions.capability.WEB_BROWSER" }, { "name": "actions.capability.SCREEN_OUTPUT" }, { "name": "actions.capability.ACCOUNT_LINKING" } ] }, "availableSurfaces": [ { "capabilities": [ { "name": "actions.capability.WEB_BROWSER" }, { "name": "actions.capability.AUDIO_OUTPUT" }, { "name": "actions.capability.SCREEN_OUTPUT" } ] } ] }

Since I struggle with that last 2 weeks and "googled" for the reason of the issue:

  • my User under testing is always "userVerificationStatus": "VERIFIED"
  • Activity controls: everything are enabled: Web & App Activity: enabled; Include Chrome history and activity from sites, apps and devices that use Google services: enabled

Could you please take a look at this issue and provide the fix or solution?

Best regards

dava-ua avatar Sep 26 '19 10:09 dava-ua

This same problem exists for actions-on-google-java as well. Also user is "VERIFIED" and has all activity controls enabled.

Topias-Pratsam avatar Sep 26 '19 11:09 Topias-Pratsam

Duplicate of #358

Fleker avatar Sep 26 '19 14:09 Fleker

@dava-ua Check again, I don't have the issue on my actions anymore

wuelcas avatar Oct 01 '19 16:10 wuelcas

Yes, that's true - now it fixed. Thanks! Hopefully in the future on production that won't happen again.

dava-ua avatar Oct 01 '19 18:10 dava-ua