smart-home-nodejs icon indicating copy to clipboard operation
smart-home-nodejs copied to clipboard

Errors after setting up locally

Open antonio-fiol opened this issue 5 years ago • 5 comments

I was seeing weird behavior, but managed to add a device. When trying to repeat the steps to document the issue, here is how it goes.

It seems that it starts correctly...

$ npm run start:local

> [email protected] start:local /home/user/smart-home-nodejs
> node dist/index.js isLocal

Smart home server listening at :::3000

COPY & PASTE NGROK URL BELOW
https://70432596.ngrok.io

=====
Visit the Actions on Google console at http://console.actions.google.com
Replace the webhook URL in the Actions section with:
    https://70432596.ngrok.io/smarthome

In the console, set the Authorization URL to:
    https://70432596.ngrok.io/fakeauth

Then set the Token URL to:
    https://70432596.ngrok.io/faketoken

Finally press the 'TEST DRAFT' button

Then I change the URL in index.html and start the front-end, point my browser to it, and this appears on the log:

{ userId: '1234', deviceId: '1rg', localDeviceId: null }
{ userId: '1234', deviceId: '1rg', localDeviceId: null }
{
  "error": {
    "code": 429,
    "message": "Resource has been exhausted (e.g. check quota).",
    "status": "RESOURCE_EXHAUSTED"
  }
}

POST /smarthome/update 400 7344.313 ms - 162
{
  "error": {
    "code": 404,
    "message": "Requested entity was not found.",
    "status": "NOT_FOUND"
  }
}

antonio-fiol avatar Jan 11 '20 18:01 antonio-fiol

Have you linked your account to the Google Assistant?

Fleker avatar Jan 13 '20 15:01 Fleker

I didn't even get to that point. I got stuck on steps 1-2 here: Setup sample service [...]

  1. Open the web portal URL.
  2. Configure the virtual devices shown as you please. Click the cloud icon shown above at least one of them to enable it for cloud control.

I'm trying to configure the virtual devices, but as soon as I open the web portal URL, that appears on the log.

I didn't even get to "Start Testing" or "Set up Account linking".

antonio-fiol avatar Jan 13 '20 16:01 antonio-fiol

You will see a 404 error before you do account linking, as it will try to call HomeGraph APIs, which will fail.

The error is benign.

Fleker avatar Jan 13 '20 17:01 Fleker

Same problem for me. At last i found my test app on Google Home app! Thank you so much for solution!!!!

marmiky avatar May 30 '20 09:05 marmiky

Do you still have issue deploying the sample?

proppy avatar Jan 21 '21 14:01 proppy