Google Assistant trouble shooting

ok, more info here : https://github.com/actions-on-google/smart-home-nodejs/issues/286

That link doesn’t show anything useful

I beg to differ

Après d’après l’issue ya moyen de le faire en ligne de commande.

which translate roughly to “this issue is solvable with the command line” was extremely useful :wink:

1 Like

I have mine working now thanks to this! Much appreciated :smiley:

verry good to hear

Has anyone done this? Because it’s not working for me.

Linux version…

root@debian:/usr/share/hassio/homeassistant/g-actions# ./gactions get --project [xxxxxx] --version ‘draft’ > action.json
2019/02/21 08:08:51 Get https://actions.googleapis.com/v2/agents/[xxxxx]:listActionPackages: oauth2: cannot fetch token: 400 Bad Request
Response: {
“error”: “invalid_grant”,
“error_description”: “Bad Request”

When I did it on windows, it created the actions.json and you need to go to a web page to authorize and then you get a key to enter which I did:

C:\Users\david\Desktop>gactions get --project xxxx --version ‘draft’ > action.json

This is the auth key I got from the web site and enteredxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ERROR: Couldn’t fetch version
ERROR: Request contains an invalid argument.
2019/02/21 08:12:16 Server did not return HTTP 200

yes and how is that useful when it gives no further information and that was the last post in the thread. I can use Google Translate too!

hmm, ok, i run that first command, it creates my a json file where i need to copy/paste that auth token first
but then what ? i saved it in the json file, run command again, but it just creating the same file?

ok this doesn’t work because of the output being redirected, do it once without > actions.json so that you see the prompt for authentication. I was authenticated because of everything I tried to figure out how to use gactions.

As for the link, @pergola.fabio asked me how and where I found out this was possible, this is where and the starting point of how.

ahhhh ; ok thats why i was stuck

ok, if i do it without the > actions.json , i have the same error as @DavidFW1960

It’s not clear, but you don’t save the token in the action.json file. You paste it into the command line and hit enter. The json file will then automatically update with the correct data.

1 Like

when I did it just now I looked in the actions.json and saw the prompt to authenticate with a link and the command line was flashing, waiting for me to authenticate and I entered the token and it gave the errors. Now if I look in the json file again it says draft is an invalid version.

yes same here now, draft is in invalid version

Yes sorry about the confusion, I forgot I was previously authenticated.
When you are, the output of “get” will be a json with everything you entered in the web UI.

this is how my json file looks like

Field Violations:
#  Field  Description
1         Invalid version: 'draft'

yes exactly the same for me

and this was the error in command line (windows)

ERROR: Couldn't fetch version
ERROR: Request contains an invalid argument.
2019/02/20 22:38:54 Server did not return HTTP 200

what to you have if you do not redirect the output for ./gactions list --project [project id] ? you may have different versions, this was my first one, and the doc said it should be ‘draft’ in that case…

I get No versions of your app for the Assistant exist. with this command

i get :slight_smile:
2019/02/20 22:42:36 The version flag is required