Request for https://homegraph.googleapis.com/v1/devices:reportStateAndNotification failed: 403

I have exactly the same problem for more than month now.
50% for both servises.

It like every second request to homeassistant API is throwing empty or error response. I even tried to keep one light only in my configuration for GA - still same 50% error rate on Google side - nothing helps. This is super suspicious.

I run HA core as separate container, and it is updated to latest version every week, now it is 0.108.3. I do not really think that rebuilding HA would help, but I might try this as well - since it helped you @Milster

I have also tried everything:

  • As part of my last HA install (as it breaks completely every 4-6mths) I imported only the config;
  • I unlinked+relinked - and everything previous to that;
  • I Recreated project on GCP and Actions - and everything previous to that.

No luck whatsoever. Next time I get to reinstall I will do it from scratch including confs.
Till then will have to live with 50% errors and a huge error log.
Any news are appreciated, otherwise count me on the list of complains…

1 Like

Actually, I finally got time to deep a little more into this issue.
I was able to find the problem with 50% of errors in GraphAPI. For some unknown reason I had two accounts in .storage/google_assistant file. One of the account is mine ID from HA, the other account was causing the errors all the time during the request, since routine was reporting states for each of these accounts.
So solution is either modify the file, or delete it and reling your account. 50% of errors are gone.

I still have other problem with Google Actions not reaching my HA api. But that is different story - a lot of “failed with code: BACKEND_FAILURE” in StackDriver logger. Hopefully I will be able to solve this too.

3 Likes

That could have been the case for me. As I reinstalled from scratch the problem was gone. I guess the file you mentioned came with the config restore I did previous. Thanks.

I had this error too. Upon checking i realized that my service account was created under a different project. So i deleted the service account key and created another one under the home assistant project. Replaced the file in config.yaml. unlinked and relinked test app. Enabled homegraph api again. No more errors.

1 Like

Finally got rid of them! I had this issue too. Did my setup following the instructions about a couple of weeks ago (so that means I used a service account). I got thousands of Request for https://homegraph.googleapis.com/v1/devices:reportStateAndNotification failed: 404 as well as 403’s each day in my log. Enabling HomeGraph API in Google Cloud Console got rid of the 403’s, but the 404’s remained. In Cloud Console I could see that it had done 130.000 requests in the past week, almost exactly 50% of which were failed.

Now this evening, I tried to set report_state: false in my google_assistant config. No more errors! Tried to open the lights screen on a Nest Hub an turning the lights off using a Zigbee switch, and after around 3 seconds the state updated on the Nest Hub. I then disabled HomeGraph API in Cloud Console and restarted Home Assistant; still no errors and still working. Sweet!

1 Like

Well, that’s not really a fix then is it? You simply disable the report state (which is why the API is needed in the first place). Obviously the errors won’t show up after that, since there is no call anymore.

404:s mean we are reporting entities that was never exposed to google in a sync request. Re-sync your entities.

2 Likes

I re-synced and the errors continue. Looks like this is not it.

I get this error too and no data shows up in homegraph api screen so i dont think any requests are getting through

getting data now shows 50% error rate.

how can you tell if its even working?

I just had this error and apparently elupus is right.
I re-synced my devices and the message stopped.

Just found out you need to pay attention to the error code :wink:
error 404 is indeed fixed with a resync
error 400 indicates an access problem with the private key in the Json file. Stangely enough I could sync devices but after regenerating this file the error was gone :slight_smile:

See: https://developers.google.com/assistant/smarthome/develop/request-sync#service-account-key

1 Like

I was battling with the problem for days, here is a better explanation of the solution:

I was investigating this issue few weeks ago, since it bothered me too. I have already replied on some other thread my findings and solution:
Most probably you have (or had) multiple accounts in you Home Assistant, and one of the accounts IDs is not linked to Google Assistant project on Action, that is why such close to 50% error rate (one of two accounts is not linked, so API throws error every second call). Two ways to fix it:

  1. Modify your .storage/google_assistant file, by removing all lines which are not your HA account ID (you can find it in UI, Configuration -> Users -> each user has its own ID of 33 characters length)
  2. Just unlink you [test]app in google home app; delete .storage/google_assistant , restart HA, and then re-link it again. New proper .storage/google_assistant will be generated.
    Good luck.

https://github.com/home-assistant/core/issues/28541#issuecomment-633110025

Ben

6 Likes

I had exactly this issue! I managed to break ha when I updated and ended up setting up a new userid and linking to the test app again.

image

I only get 404 errors and they are NOT solved by a re-sync of devices. Also, the user id in .storage/google_assistant is correct…

have you been able to solve it ?
i have the test app in the list, when i click i get auth screens from HA, i enter user pass and 2FA, and nothing happens.
in logs i see 404s of homegraph.googleapis.com/v1

same here :sleepy:
Resync is not the solving this:

Logger: homeassistant.components.google_assistant.http
Source: components/google_assistant/http.py:191
Integration: Google Assistant (documentation, issues)
First occurred: 20:08:29 (183 occurrences)
Last logged: 21:05:37
Request for https://homegraph.googleapis.com/v1/devices:reportStateAndNotification failed: 404

1 Like

I have exactly the same problem. I try to remove integration from google home, but now I can’t add it again. I enter user and pass and nothing happens.
Maybe someone find solution?

I have too the Sand probem

Worked for me, thank you !

1 Like