Google assistat resync error

I added a new devices to my z-wave stick and tried to sync it to google assistant but get a error respons that something went wrong. In the log i get this error messange - any idea?

Connection closed
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/google_assistant/", line 92, in request_sync_service_handler
  File "/usr/local/lib/python3.7/site-packages/aiohttp/", line 942, in raise_for_status
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/", line 130, in handle_call_service
  File "/usr/src/homeassistant/homeassistant/", line 1235, in async_call
    await asyncio.shield(self._execute_service(handler, service_call))
  File "/usr/src/homeassistant/homeassistant/", line 1260, in _execute_service
    await handler.func(service_call)
  File "/usr/src/homeassistant/homeassistant/components/google_assistant/", line 94, in request_sync_service_handler
    body = await
  File "/usr/local/lib/python3.7/site-packages/aiohttp/", line 969, in read
    self._body = await
  File "/usr/local/lib/python3.7/site-packages/aiohttp/", line 335, in read
    raise self._exception
aiohttp.client_exceptions.ClientConnectionError: Connection closed

I guess you’re not using nabucasa cloud.
Please check documentation here :

Mainly this :

Syncing may also fail after a period of time, likely around 30 days, due to the fact that your Actions on Google app is technically in testing mode and has never been published. Eventually, it seems that the test expires. Control of devices will continue to work but syncing may not. If you say “Ok Google, sync my devices” and get the response “Unable to sync Home Assistant”, this can usually be resolved by going back to your test app in the Actions on Google console and clicking Simulator under TEST . Regenerate the draft version Test App and try asking Google to sync your devices again.

it seems google have changed something recently, there is a github issue and another thread here about it.

I tried this but the app was in “TEST MODE”. Tried to reload/change version but then i get a error messange. See picture below .

After the error message i get the option to test app but then i do that i get the same error. But when i reload the the page my app is back in testning mode.

Do i have to unlink my app from my google home app before I can reload my app?

No changes has been done.
I have had the same problem before but then i just reload/change version of the app tp update “TEST MODE”.

So far as I know the google issue has been fixed a couple of days ago.
I have changed my domain, edited my domain name in 3 places in Google Actions Console, unlinked the app, relinked the app and everything is working fine.
I don’t see any current issues.

Not so far as I know.
Yesterday I edited the domain name and didn’t touch the linking in the app and it worked. I did unlink/relink after that but I don’t think that was necessary.

In setup>account linking> 2 places…
Authorization URL https://domain:port/auth/authorize (port only if you don’t use 443
Token URL https://domain:port/auth/token

actions> 1 place
Fulfillment URL https://domain:port/api/google_assistant

What was the issue anyway? Can someone post that GitHub link?

That helped me.
I have just removed port (433) then it worked. Thank you.

1 Like

I just remove port in account linking (2 places) and in action (1 place) when it worked again. See @DavidFW1960 post above.

Nice! I just added a port on mine as I’m not using port 443 anymore when I changed the domain…

I’ve linked and unlinked the app so many friggin times now… doing that used to put me in a cold sweat but it really just works solidly these days.

This is very interesting. I had this issue where I could not sync my devices anymore even with creating a new draft. Just now I read your recommendation and simply reviewed my URL’s. I dont use port 443 for SSL so my URL’s were correct per your examples. Then under the action part I simply just hit enter and it saved the draft and generated a new preview. Did not need to link accounts or anything and syncing just worked after that! So it seems we need to regenerate something, even if nothing is changed.

1 Like

other than using nabu casa there has to be a better way to deal with this?