Google assistant request sync, error in LOG, bad request

I did enable homegraph api


2019-07-07 12:00:34 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140143591268248] Connection closed
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/google_assistant/__init__.py", line 76, in request_sync_service_handler
    res.raise_for_status()
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 942, in raise_for_status
    headers=self.headers)
aiohttp.client_exceptions.ClientResponseError: 400, message='Bad Request'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 121, in handle_call_service
    connection.context(msg))
  File "/usr/src/homeassistant/homeassistant/core.py", line 1150, in async_call
    self._execute_service(handler, service_call))
  File "/usr/src/homeassistant/homeassistant/core.py", line 1172, in _execute_service
    await handler.func(service_call)
  File "/usr/src/homeassistant/homeassistant/components/google_assistant/__init__.py", line 78, in request_sync_service_handler
    body = await res.read()
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 969, in read
    self._body = await self.content.read()
  File "/usr/local/lib/python3.7/site-packages/aiohttp/streams.py", line 335, in read
    raise self._exception
aiohttp.client_exceptions.ClientConnectionError: Connection closed

had to unlink the app (which disappeared from the list of available app), click on TEST on Actions Google, then the app appeared again, LINk, and now all works.

If your project is already setup then to fix this simply: Google Actions -> Select Project -> Test -> Start Testing.

Seems to happen a few times a year.

1 Like

Yes, this really works. No need to unlink and re-do the setup again. Just “Start Testing” and then call google_assistant.request_sync from HA GUI > Developer Tools > Services.

https://console.actions.google.com/