ha-google-home: Component unable to load after upgrading to v1.9.13

I’ve been banging my head against the wall for a few days. v1.9.12 works fine when I downgrade, however upgrading to v1.9.13 produces the following logs on start up and the integration remains in a “Not Loaded” state.

Errors on startup:

Setup failed for custom integration google_home: Unable to import component: Exception importing custom_components.google_home

This error originated from a custom integration.

Logger: homeassistant.loader
Source: custom_components/google_home/api.py:11
Integration: Google Home (documentation, issues)
First occurred: 12:22:46 PM (88 occurrences)
Last logged: 12:25:01 PM

Unexpected exception importing component custom_components.google_home
Unexpected exception importing platform custom_components.google_home.config_flow
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/loader.py", line 599, in get_component
    cache[self.domain] = importlib.import_module(self.pkg_path)
  File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/config/custom_components/google_home/__init__.py", line 17, in <module>
    from .api import GlocaltokensApiClient
  File "/config/custom_components/google_home/api.py", line 11, in <module>
    from glocaltokens.client import Device, GLocalAuthenticationTokens
  File "/usr/local/lib/python3.9/site-packages/glocaltokens/client.py", line 24, in <module>
    from .google.internal.home.foyer.v1_pb2 import GetHomeGraphRequest, GetHomeGraphResponse
  File "/usr/local/lib/python3.9/site-packages/glocaltokens/google/internal/home/foyer/v1_pb2.py", line 24, in <module>
    _GETASSISTANTROUTINESREQUEST = DESCRIPTOR.message_types_by_name[
KeyError: 'GetAssistantRoutinesRequest'
Logger: homeassistant.config_entries
Source: config_entries.py:749
First occurred: 12:23:21 PM (87 occurrences)
Last logged: 12:25:01 PM

Error occurred loading configuration flow for integration google_home: Exception importing custom_components.google_home.config_flow

I tried removing the integration and reinstalling, but I need to downgrade to v.1.9.12 and then remove the integration before trying to setup again. If I attempt to setup on v.1.9.13 I receive an error about the integration being unable to be setup in the UI.

One thing to note, I do also use the google wifi integration which I know has caused issues in the past. Any ideas?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 18 (2 by maintainers)

Most upvoted comments

I guess the issue is google-wifi also has generated bindings for the same proto file. Protobuf has global buffer and different versions of these generated files cause issues.

The proper way to fix this is to extract generated files to the external package and use it both in glocaltokens and google-wifi. This way both integrations will use exactly the same version of these files. Not sure I have time for this.

Quick fix will be reverting my recent update and try not to touch these files again.

I spoke too soon. After testing with 5 restarts and google_home loading fine for all 5, #6 google_home would not load with same error.