Google Assistant request sync is not working (solved)

Hello,

i have issues with the Google Assistant HA component, I always get the error “Could not contact Google for request_sync”, which is logged by the init.py file of the google assistant component.
The component is working correctly but I have to unlink and link my account every time because the request sync is not working.

The error is thrown in the function request_sync_service_handler because of the 
exceptions asyncio.TimeoutError, aiohttp.ClientError

I checked this page on google actions and did trigger the request_sync manually with the parameters api_key and agent_user_id which I wrote into my config and it works without issues with the following curl command

curl -i -s -k -X POST -H "Content-Type: application/json" -d "{agent_user_id: \"agentUserId\"}" \ "https://homegraph.googleapis.com/v1/devices:requestSync?key=API_KEY"

So why does the component throw the error, I guess its related to the aiohttp library or what could it be?

I also tried to change the source code to output the request url, api_key and agent_user_id with the following command and all information are correct.

_LOGGER.info('url %s api_key %s agent_user_id %s', REQUEST_SYNC_BASE_URL,api_key,agent_user_id)

HA version: 58.1
python version: 3.5

Thank you for your help

Did you run curl from the same machine that runs HA?

Actually I did, but in the meantime I reconfigured ipv6 and I missed to enter the DNS name servers, so thats why It didn’t work. Thank you for your help, I marked the topic as solved.