audi_connect_ha icon indicating copy to clipboard operation
audi_connect_ha copied to clipboard

Exception: Invalid json in get_vehicle_information - Error in Home Assistant Log

Open shuntfield opened this issue 2 years ago • 6 comments

Traceback (most recent call last):
  File "/config/custom_components/audiconnect/audi_account.py", line 162, in update
    if not await self.connection.update(None):
  File "/config/custom_components/audiconnect/audi_connect_account.py", line 112, in update
    vehicles_response = await self._audi_service.get_vehicle_information()
  File "/config/custom_components/audiconnect/audi_services.py", line 263, in get_vehicle_information
    raise Exception("Invalid json in get_vehicle_information")
Exception: Invalid json in get_vehicle_information

I'm getting this error in the log even though login to myAudi seems to be working.

Over the last few days connectivity is hit and miss and usually fails more often than not on a Home Assistant Restart. It could also be an Audi thing.

Anyone else seeing similar problems?

shuntfield avatar Mar 09 '22 17:03 shuntfield

It seems to be OK now, I will close it right now - perhaps its an Audi thing!

shuntfield avatar Mar 09 '22 23:03 shuntfield

This is doing this full time now - and no longer works for me. It can be a bit hit and miss but most of the time its an invalid JSON message.

shuntfield avatar Mar 13 '22 11:03 shuntfield

For us, when restarting HomeAssistant the login to Audi is timing out

2022-03-13 15:14:17 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry xxxxx@xxxxx for audiconnect
Traceback (most recent call last):
  File "/config/custom_components/audiconnect/audi_api.py", line 53, in request
    async with self._session.request(
  File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 1138, in __aenter__
    self._resp = await self._coro
  File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 559, in _request
    await resp.start(conn)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 898, in start
    message, payload = await protocol.read()  # type: ignore[union-attr]
  File "/usr/local/lib/python3.9/site-packages/aiohttp/streams.py", line 616, in read
    await self._waiter
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/config/custom_components/audiconnect/audi_api.py", line 66, in request
    raise ClientResponseError(
  File "/usr/local/lib/python3.9/site-packages/async_timeout/__init__.py", line 116, in __exit__
    self._do_exit(exc_type)
  File "/usr/local/lib/python3.9/site-packages/async_timeout/__init__.py", line 212, in _do_exit
    raise asyncio.TimeoutError
asyncio.exceptions.TimeoutError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 335, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/audiconnect/__init__.py", line 106, in async_setup_entry
    return await data.update(utcnow())
  File "/config/custom_components/audiconnect/audi_account.py", line 162, in update
    if not await self.connection.update(None):
  File "/config/custom_components/audiconnect/audi_connect_account.py", line 112, in update
    vehicles_response = await self._audi_service.get_vehicle_information()
  File "/config/custom_components/audiconnect/audi_services.py", line 253, in get_vehicle_information
    req_rsp, rep_rsptxt = await self._api.request(
  File "/config/custom_components/audiconnect/audi_api.py", line 75, in request
    raise TimeoutError("Timeout error")

Which appears to lead to the invalid json message every 10 minutes as the component attempts to refresh vehicle details.

2022-03-13 15:24:17 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/audiconnect/audi_account.py", line 162, in update
    if not await self.connection.update(None):
  File "/config/custom_components/audiconnect/audi_connect_account.py", line 112, in update
    vehicles_response = await self._audi_service.get_vehicle_information()
  File "/config/custom_components/audiconnect/audi_services.py", line 263, in get_vehicle_information
    raise Exception("Invalid json in get_vehicle_information")
Exception: Invalid json in get_vehicle_information

duckend avatar Mar 13 '22 15:03 duckend

Yes this behaviour is the same as my HA startup too. I reinstalled the integration but it does the same.

shuntfield avatar Mar 13 '22 15:03 shuntfield

I have the same issue. Audi sucks.

chemgeek avatar Mar 13 '22 19:03 chemgeek

+1

MarianBe avatar Mar 14 '22 09:03 MarianBe

This issue is stale because it has been open for 60 days with no activity. Are you still experiencing this issue?

github-actions[bot] avatar Apr 02 '24 02:04 github-actions[bot]

Cleaning up issues. This issue hasn't been touched since March 2022 (2 years). Closing this issue. If issues persist, please open a new issue.

coreywillwhat avatar Apr 08 '24 23:04 coreywillwhat