r/GoogleAssistantDev • • Sep 23 '19

userStorage Saga Continued

In the past few weeks people (including myself) have been finding that the userStorage attribute is not being returned or accepted.

At first it seemed like some kind of bug, but after some digging around I found that a specific setting that was previously not required is now required for userStorage to work.

The following is a breakdown of this behavior from a comment thread:

https://www.reddit.com/r/GoogleAssistantDev/comments/d521mw/userstorage_missing_from_subsequent_requests/f0jpx50?utm_source=share&utm_medium=web2x

From what I have found, what you are seeing is due an Activity Controls setting being toggled off. AFAIK this shouldn't be required and I believe this is a bug. Specifically the "Include Chrome history and activity from sites, apps, and devices that use Google services" setting under "Web & App Activity".

You can at least get yourself and testers up and running by checking the checkbox under "Web & App Activity". This should get you userStorage back from what my testing has shown.

IMO this isn't a long term solution as userStorage is, at minimum, a requirement for anonymous user identifiers and AFAIK while "Web & App Activity" is toggled on by default (correct me if I'm wrong here) the checkbox isn't.

It's also worth noting that users will not come back as GUEST status despite that being the case for having the entire "Web & App Activity" setting disabled.

Activity Controls link:

https://myaccount.google.com/activitycontrols?pli=1

userStorage docs:

https://developers.google.com/actions/assistant/save-data#user_storage_expiration

This represents a new change on Google's end because this setting is not enabled by default for Google end users, so userStorage will essentially never show up for your Action users.

I started an email correspondence with their support team and received this outcome from that thread:

As you have mentioned "Activity controls > Web & App Activity > Include Chrome history and activity from sites, apps, and devices that use Google services" has to be toggled on in order for the user-storage to work as intended.  This information has to be updated in the documentation. We have passed this information to our documentation team.Regarding the user disabled their Web & App Activity the user will be set as GUEST . If a user's verification status is GUEST, then account management with Account Linking and accessing userStorage will both fail.If you have any questions please let me know.

The reason this is relevant to everyone is because without userStorage you will not be able to have a unique identifier or session storage between conversations tied to and end user of your Action without Account Linking.

This is mostly a PSA to the community since Google themselves hasn't made mention of it, but is anyone else seeing that userStorage is not being returned?

Update 09/24/2019:

I got extra verification that this setting is going to remain required for userStorage. Below is Google support's response in regards to what their expectations are of us as Action developers if this setting is going to continue to be required.

You can include a note in the Action description to toggle on Activity Controls and check the "Include Chrome history and activity from sites.." so that the users are aware of this setting. You can also include this information in your Action conversation.

It seems that userStorage will continue to be inaccessible for Action users by default as long as this setting is disabled by default.

7 Upvotes

11 comments sorted by

2

u/Asdnakki Sep 25 '19 edited Sep 25 '19

I enabled everything. Even the include chrome history. But still user storage doesn't save between conversations.

Last 2 days it seemed like it still had data from conversations before, but it didn't update.

Today it seems like it has finally cleared whole userStorage and im still unable save anything into it.

i even tried version from 3 weeks before and it had exact same problems and i'm 99% sure that version worked before.

1

u/[deleted] Sep 25 '19

it seemed like it still had data from conversations before

I've been experiencing this as well.

1

u/[deleted] Sep 23 '19

For additional context:

The userId field has been deprecated at this point in time. The Google+ thread from Google is now lost, but the documentation still reflects this change.

Google+ thread:

https://plus.google.com/u/0/+GoogleDevelopers/posts/ZFWNxv8q8Dx

Docs showing deprecation:

https://developers.google.com/actions/reference/rest/Shared.Types/AppRequest#User.FIELDS.user_id

Their solution for anonymous user ID's was to use userStorage which was outlined on the following page (now edited out of existence by Google).

Deleted page detailing the need to switch to userStorage:

https://developers.google.com/actions/identity/user-info

This leaves Action developers at a point where they need to use some form of Account Linking (OAuth for token identification or Google sign in for Google user ID) to get consistent unique identifiers.

1

u/fleker2 Googler Sep 24 '19

Have a lot of people seen the Web & App Activity toggle turned off?

2

u/[deleted] Sep 24 '19 edited Sep 24 '19

The setting in question is the additional checkbox within Web & App Activity:

"Include Chrome history and activity from sites, apps, and devices that use Google services"

I believe it is disabled by default which is the main issue. It makes userStorage inaccessible by default which makes it unreliable as a user session storage (which is required for anonymous unique identifiers).

*edited for clarity

1

u/[deleted] Sep 25 '19 edited Sep 25 '19

After doing some surveying I am seeing about 50/50 on people having the checkbox for "Include Chrome history and activity..." disabled (everyone had Web & App Activity toggled on).

I asked each person if they have done Google app development in the past or have touched this page on their own and ~90% said no to both.

This makes me think theres some kind of other behavior governing this setting outside of the Activity Controls dashboard.

1

u/jjacobsDev Sep 25 '19

It was disabled for me by default. Recently I've been experiencing issues where the user storage is returned as empty in any other intents but the Welcome Intent even when I have the web & app acitivity enabled (+ chrome history checkbox). It has been happening on different environments and I've seen other people complain about similar issues on the Dialogflow SDK git.

1

u/LeonFromGoogle Googler Oct 01 '19

A fix for userStorage is now in production. Apologies for the disruption.

1

u/[deleted] Oct 02 '19

Can you elaborate on this? From your end, do you know if the setting detailed in the post is required for userStorage? Also, can you comment on if this setting should be enabled by default (I've recoded many instances where it wasn't)?

tldr; What was the end result of this fix? What should we know moving forward?

1

u/polohero Oct 03 '19

@LeonFromGoogle. I don't think it's fixed, I've been getting users telling me the issue occurring again. It was fixed last night for some time, but this morning it's happened all over again

1

u/dejager_mc Sep 28 '19

To add to the confusion, when I send a request from my Google Home it does not have the userStorage information. When I send a request from my phone it does have the userStorage information. Both devices are linked to the same Google account. I have checked to make sure that all my settings in the Activity Control are set correctly.

I thought userStorage was for a user, not for a device. I even reset my Google Home and re-enabled voice matching but it did not matter.