Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config help : requested entity was not found #21

Open
Sungray opened this issue Jul 17, 2021 · 9 comments
Open

Config help : requested entity was not found #21

Sungray opened this issue Jul 17, 2021 · 9 comments

Comments

@Sungray
Copy link

Sungray commented Jul 17, 2021

Hi,
I have followed the readme to the letter, unfortunately I can't get it to work.

When starting the app, after the loxone init, I'm getting this :

init sucessfull
Server initialized
(node:14743) UnhandledPromiseRejectionWarning: Error: Requested entity was not found.
at Gaxios._request (/usr/local/lib/node_modules/google-home-loxone/node_modules/gaxios/build/src/gaxios.js:129:23)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async JWT.requestAsync (/usr/local/lib/node_modules/google-home-loxone/node_modules/google-auth-library/build/src/auth/oauth2client.js:345:18)
(Use node --trace-warnings ... to show where the warning was created)
(node:14743) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:14743) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

The homegraph is activated, service account created, json key placed correctly in ~/.google-home-loxone/jwt.json, auth0 callback configured etc.

Maybe my agentUserId is wrong, it's not clear what this value should be and I have tried many values. My best guess is that it's the ID of the Google Action, the same that I find in the URL while configuring the Google Action, is that correct ? If my project is called loxone, it's something like loxone-a2c3e.

Same with auth0 callback, is the url correct ? https://oauth-redirect.googleusercontent.com/r/loxone-a2c3e

Do I have to create a release of the Google Action ? alpha, beta..

@rtrompier
Copy link
Owner

Hi,

The first configuration is not really trivial. I'm trying to improve it to be easier.
To answer to your question, the agentUserId field is only used by google API to keep the context between call and answer. So your error is not due to this field.

However, the error is really strange. Do you start it by the CLI or with the "npm start" command ?
The problem seem to be due to an authentication error.
Here is a view of my jwt.json :
image

I have not created a release for my part.

@Sungray
Copy link
Author

Sungray commented Jul 18, 2021

Starting by CLI using google-home-loxone, I'm really just following the readme.

My jwt.json looks exactly like yours, except for the last line, the cert url is a tad different ?

image

@Sungray
Copy link
Author

Sungray commented Jul 18, 2021

That difference seems to be key, following the readme led me to create a "User-managed service account" (IAM), while you have a "Default service account" (@appspot). Default service accounts have a default "Editor" authorization. I don't know how you created it.

https://cloud.google.com/iam/docs/service-accounts#types

I tried adding the IAM account to the project users with Editor authorization, but still I have the same error.

@rtrompier
Copy link
Owner

Here is my Google Project configuration

image

image

image

Can you see a difference with yours ?

@Sungray
Copy link
Author

Sungray commented Jul 19, 2021

Yeah, you're using the "App Engine default service account", which I don't have : I have to manually create a service account, but then it's an IAM account, which seems to make a difference ? Was this account created automatically ? Maybe I need to create the project not from the Actions dashboard, but from somewhere else to get this default service account ?

@Sungray
Copy link
Author

Sungray commented Jul 19, 2021

A step to add in the readme to get that default service account ;
activate App Engine in https://console.cloud.google.com/appengine/start
Still doesn't work for me but I'll keep looking

@rtrompier
Copy link
Owner

Good question. I have created the project in 2018, so I don't remember. I think I have created it through the action console.

Let me know if you find something otherwise I will try to create a new Service Account for test ;)

@ArminRadmueller
Copy link

I have the same problem, is there a solution in the meantime?

@rtrompier
Copy link
Owner

No more feedback on my side, but we can try to compare your configuration with mine if you want ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants