ha-google-home: Errors on 2021.4.0

Describe the bug

I see multiple errors in logs and sensors are not created. Don’t have much time to investigate further right now.

Version of the integration

If you are unsure about the version check the github release here.

1.3.0

Glocaltokens Version (Underlying package)

0.3.0

Logs

Logger: glocaltokens.client
Source: /home/ruslan/homeassistant_venv/lib/python3.9/site-packages/glocaltokens/client.py:325
First occurred: 11:28:58 AM (1 occurrences)
Last logged: 11:28:58 AM

[GRPC] Received unknown RPC error: code=StatusCode.INTERNAL message=Internal error encountered.
Logger: custom_components.google_home
Source: custom_components/google_home/api.py:82
Integration: Google Home (documentation, issues)
First occurred: 11:29:18 AM (1 occurrences)
Last logged: 11:29:18 AM

Unexpected error fetching sensor data: 'NoneType' object has no attribute 'home'
Traceback (most recent call last):
  File "/home/ruslan/homeassistant_venv/lib/python3.9/site-packages/homeassistant/helpers/update_coordinator.py", line 173, in _async_refresh
    self.data = await self._async_update_data()
  File "/home/ruslan/homeassistant_venv/lib/python3.9/site-packages/homeassistant/helpers/update_coordinator.py", line 143, in _async_update_data
    return await self.update_method()
  File "/home/ruslan/.homeassistant/custom_components/google_home/api.py", line 206, in update_google_devices_information
    devices = await self.get_google_devices()
  File "/home/ruslan/.homeassistant/custom_components/google_home/api.py", line 87, in get_google_devices
    google_devices = await self.hass.async_add_executor_job(_get_google_devices)
  File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/ruslan/.homeassistant/custom_components/google_home/api.py", line 82, in _get_google_devices
    return self._client.get_google_devices(
  File "/home/ruslan/homeassistant_venv/lib/python3.9/site-packages/glocaltokens/client.py", line 379, in get_google_devices
    LOGGER.debug("Iterating in %d homegraph devices", len(homegraph.home.devices))
AttributeError: 'NoneType' object has no attribute 'home'

This one is when updating options:

Logger: aiohttp.server
Source: custom_components/google_home/config_flow.py:118
First occurred: 11:31:04 AM (1 occurrences)
Last logged: 11:31:04 AM

Error handling request
Traceback (most recent call last):
  File "/home/ruslan/homeassistant_venv/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/home/ruslan/homeassistant_venv/lib/python3.9/site-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "/home/ruslan/homeassistant_venv/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/home/ruslan/homeassistant_venv/lib/python3.9/site-packages/homeassistant/components/http/security_filter.py", line 56, in security_filter_middleware
    return await handler(request)
  File "/home/ruslan/homeassistant_venv/lib/python3.9/site-packages/homeassistant/components/http/forwarded.py", line 172, in forwarded_middleware
    return await handler(request)
  File "/home/ruslan/homeassistant_venv/lib/python3.9/site-packages/homeassistant/components/http/request_context.py", line 18, in request_context_middleware
    return await handler(request)
  File "/home/ruslan/homeassistant_venv/lib/python3.9/site-packages/homeassistant/components/http/ban.py", line 74, in ban_middleware
    return await handler(request)
  File "/home/ruslan/homeassistant_venv/lib/python3.9/site-packages/homeassistant/components/http/auth.py", line 129, in auth_middleware
    return await handler(request)
  File "/home/ruslan/homeassistant_venv/lib/python3.9/site-packages/homeassistant/components/http/view.py", line 131, in handle
    result = await result
  File "/home/ruslan/homeassistant_venv/lib/python3.9/site-packages/homeassistant/components/config/config_entries.py", line 213, in post
    return await super().post(request, flow_id)
  File "/home/ruslan/homeassistant_venv/lib/python3.9/site-packages/homeassistant/components/http/data_validator.py", line 60, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/home/ruslan/homeassistant_venv/lib/python3.9/site-packages/homeassistant/helpers/data_entry_flow.py", line 107, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
  File "/home/ruslan/homeassistant_venv/lib/python3.9/site-packages/homeassistant/data_entry_flow.py", line 156, in async_configure
    result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
  File "/home/ruslan/homeassistant_venv/lib/python3.9/site-packages/homeassistant/data_entry_flow.py", line 214, in _async_handle_step
    result: dict = await getattr(flow, method)(user_input)
  File "/home/ruslan/.homeassistant/custom_components/google_home/config_flow.py", line 118, in async_step_user
    self.options.update(user_input)
AttributeError: 'mappingproxy' object has no attribute 'update'

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 44 (1 by maintainers)

Most upvoted comments

After update to 2021.4.1 I have the same issues again. I collected logs, will see what’s going on there.

Oh, I know. Older ones were only built for Python 3.8 and I use 3.9.

  • Since 1.33.1 they provide wheels for 3.9 as well.
  • And they just started to provide wheels for arm64 in 1.37.0, so it might be fixed there.

I think it fixed the issue I had but still indicates about that some errors are not handled properly. They are mostly on glocaltokens side but options are on integration side.

Just installed 2021.4.1 and works fine for me 🤔 Could there be some issues with some other packages or dependancies some might have as we had with LG components? 🤔 @KapJI do you have any custom components/integrations enabled? 😃

It still fails with 1.37 😢

The reason why they pinned it was that import failing on raspberry pi with grpcio 1.32. If it no longer fails with newer version, it can be unpinned.

But they didn’t do that before. When me and @leikoilja first started out we had to build the wheels when we installed it, until we pinned our version as the same HA and add grpcio-tools to to custom wheels

I just tried installing 1.2 and it fails at the same point, though I don’t have same details in log as 1.3 😢

I found these two breaking changes, they may, or may not be related. 1 and 2