conv.user.storage clears out (doesn't store) data between sessions
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):
-
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 {...}});` -
User goes to the following intent and see the list of options
-
User select an option:
gapp.intent('Select Native Language - get', async (conv, input, option) => {conv.user.storage.nativeLang = option;// some logic....}); -
User goes further through the Action - conv.user.storage persists between conversation turns.
-
User want quite the Action: say/type: "stop"
-
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"} -
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
This same problem exists for actions-on-google-java as well. Also user is "VERIFIED" and has all activity controls enabled.
Duplicate of #358
@dava-ua Check again, I don't have the issue on my actions anymore
Yes, that's true - now it fixed. Thanks! Hopefully in the future on production that won't happen again.