Cffi errors after updating to 2026.7.1

We restarted HA to update our reolink and google integrations on 2026.6.2 and noticed that they were getting errors:

home-assistant  | 2026-07-07 10:30:45.321 ERROR (MainThread) [homeassistant.setup] Setup failed for 'google': Unable to import component: Exception importing homeassistant.components.google
home-assistant  | Traceback (most recent call last):
home-assistant  |   File "/usr/src/homeassistant/homeassistant/loader.py", line 1091, in _get_component
home-assistant  |     ComponentProtocol, importlib.import_module(self.pkg_path)
home-assistant  |                        ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
home-assistant  |   File "/usr/src/homeassistant/homeassistant/util/loop.py", line 201, in protected_loop_func
home-assistant  |     return func(*args, **kwargs)
home-assistant  |   File "/usr/local/lib/python3.14/importlib/__init__.py", line 88, in import_module
home-assistant  |     return _bootstrap._gcd_import(name[level:], package, level)
home-assistant  |            ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
home-assistant  |   File "<frozen importlib._bootstrap>", line 1406, in _gcd_import
home-assistant  |   File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
home-assistant  |   File "<frozen importlib._bootstrap>", line 1342, in _find_and_load_unlocked
home-assistant  |   File "<frozen importlib._bootstrap>", line 938, in _load_unlocked
home-assistant  |   File "<frozen importlib._bootstrap_external>", line 759, in exec_module
home-assistant  |   File "<frozen importlib._bootstrap>", line 491, in _call_with_frames_removed
home-assistant  |   File "/usr/src/homeassistant/homeassistant/components/google/__init__.py", line 30, in <module>
home-assistant  |     from .api import ApiAuthImpl, get_feature_access
home-assistant  |   File "/usr/src/homeassistant/homeassistant/components/google/api.py", line 9, in <module>
home-assistant  |     from oauth2client.client import (
home-assistant  |     ...<5 lines>...
home-assistant  |     )
home-assistant  |   File "/usr/local/lib/python3.14/site-packages/oauth2client/client.py", line 45, in <module>
home-assistant  |     from oauth2client import crypt
home-assistant  |   File "/usr/local/lib/python3.14/site-packages/oauth2client/crypt.py", line 55, in <module>
home-assistant  |     from oauth2client import _pycrypto_crypt
home-assistant  |   File "/usr/local/lib/python3.14/site-packages/oauth2client/_pycrypto_crypt.py", line 16, in <module>
home-assistant  |     from Crypto.Hash import SHA256
home-assistant  |   File "/usr/local/lib/python3.14/site-packages/Crypto/Hash/SHA256.py", line 23, in <module>
home-assistant  |     from Crypto.Util._raw_api import (load_pycryptodome_raw_lib,
home-assistant  |     ...<3 lines>...
home-assistant  |                                       c_uint8_ptr)
home-assistant  |   File "/usr/local/lib/python3.14/site-packages/Crypto/Util/_raw_api.py", line 87, in <module>
home-assistant  |     ffi = FFI()
home-assistant  |   File "/usr/local/lib/python3.14/site-packages/cffi/api.py", line 47, in __init__
home-assistant  |     raise Exception("Version mismatch: this is the 'cffi' package version %s, located in %r.  When we import the top-level '_cffi_backend' extension module, we get version %s, located in %r.  The two versions should be equal; check your installation." % (
home-assistant  |         __version__, __file__,
home-assistant  |         backend.__version__, backend.__file__))
home-assistant  | Exception: Version mismatch: this is the 'cffi' package version 2.1.0, located in '/usr/local/lib/python3.14/site-packages/cffi/api.py'.  When we import the top-level '_cffi_backend' extension module, we get version 2.0.0, located in '/usr/local/lib/python3.14/site-packages/_cffi_backend.cpython-314-x86_64-linux-musl.so'.  The two versions should be equal; check your installation.
home-assistant  |
home-assistant  |
home-assistant  | The above exception was the direct cause of the following exception:
home-assistant  |
home-assistant  |
home-assistant  | Traceback (most recent call last):
home-assistant  |   File "/usr/src/homeassistant/homeassistant/loader.py", line 1031, in async_get_component
home-assistant  |     comp = await self.hass.async_add_import_executor_job(
home-assistant  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
home-assistant  |         self._get_component, True
home-assistant  |         ^^^^^^^^^^^^^^^^^^^^^^^^^
home-assistant  |     )
home-assistant  |     ^
home-assistant  |   File "/usr/local/lib/python3.14/concurrent/futures/thread.py", line 86, in run
home-assistant  |     result = ctx.run(self.task)
home-assistant  |   File "/usr/local/lib/python3.14/concurrent/futures/thread.py", line 73, in run
home-assistant  |     return fn(*args, **kwargs)
home-assistant  |   File "/usr/src/homeassistant/homeassistant/loader.py", line 1102, in _get_component
home-assistant  |     raise ImportError(f"Exception importing {self.pkg_path}") from err
home-assistant  | ImportError: Exception importing homeassistant.components.google
home-assistant  |
home-assistant  |
home-assistant  | During handling of the above exception, another exception occurred:
home-assistant  |
home-assistant  |
home-assistant  | Traceback (most recent call last):
home-assistant  |   File "/usr/src/homeassistant/homeassistant/loader.py", line 1091, in _get_component
home-assistant  |     ComponentProtocol, importlib.import_module(self.pkg_path)
home-assistant  |                        ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
home-assistant  |   File "/usr/src/homeassistant/homeassistant/util/loop.py", line 201, in protected_loop_func
home-assistant  |     return func(*args, **kwargs)
home-assistant  |   File "/usr/local/lib/python3.14/importlib/__init__.py", line 88, in import_module
home-assistant  |     return _bootstrap._gcd_import(name[level:], package, level)
home-assistant  |            ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
home-assistant  |   File "<frozen importlib._bootstrap>", line 1406, in _gcd_import
home-assistant  |   File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
home-assistant  |   File "<frozen importlib._bootstrap>", line 1342, in _find_and_load_unlocked
home-assistant  |   File "<frozen importlib._bootstrap>", line 938, in _load_unlocked
home-assistant  |   File "<frozen importlib._bootstrap_external>", line 759, in exec_module
home-assistant  |   File "<frozen importlib._bootstrap>", line 491, in _call_with_frames_removed
home-assistant  |   File "/usr/src/homeassistant/homeassistant/components/google/__init__.py", line 30, in <module>
home-assistant  |     from .api import ApiAuthImpl, get_feature_access
home-assistant  |   File "/usr/src/homeassistant/homeassistant/components/google/api.py", line 9, in <module>
home-assistant  |     from oauth2client.client import (
home-assistant  |     ...<5 lines>...
home-assistant  |     )
home-assistant  |   File "/usr/local/lib/python3.14/site-packages/oauth2client/client.py", line 45, in <module>
home-assistant  |     from oauth2client import crypt
home-assistant  |   File "/usr/local/lib/python3.14/site-packages/oauth2client/crypt.py", line 55, in <module>
home-assistant  |     from oauth2client import _pycrypto_crypt
home-assistant  |   File "/usr/local/lib/python3.14/site-packages/oauth2client/_pycrypto_crypt.py", line 16, in <module>
home-assistant  |     from Crypto.Hash import SHA256
home-assistant  |   File "/usr/local/lib/python3.14/site-packages/Crypto/Hash/SHA256.py", line 23, in <module>
home-assistant  |     from Crypto.Util._raw_api import (load_pycryptodome_raw_lib,
home-assistant  |     ...<3 lines>...
home-assistant  |                                       c_uint8_ptr)
home-assistant  |   File "/usr/local/lib/python3.14/site-packages/Crypto/Util/_raw_api.py", line 87, in <module>
home-assistant  |     ffi = FFI()
home-assistant  |   File "/usr/local/lib/python3.14/site-packages/cffi/api.py", line 47, in __init__
home-assistant  |     raise Exception("Version mismatch: this is the 'cffi' package version %s, located in %r.  When we import the top-level '_cffi_backend' extension module, we get version %s, located in %r.  The two versions should be equal; check your installation." % (
home-assistant  |         __version__, __file__,
home-assistant  |         backend.__version__, backend.__file__))
home-assistant  | Exception: Version mismatch: this is the 'cffi' package version 2.1.0, located in '/usr/local/lib/python3.14/site-packages/cffi/api.py'.  When we import the top-level '_cffi_backend' extension module, we get version 2.0.0, located in '/usr/local/lib/python3.14/site-packages/_cffi_backend.cpython-314-x86_64-linux-musl.so'.  The two versions should be equal; check your installation.
home-assistant  |
home-assistant  |
home-assistant  | The above exception was the direct cause of the following exception:
home-assistant  |
home-assistant  |
home-assistant  | Traceback (most recent call last):
home-assistant  |   File "/usr/src/homeassistant/homeassistant/setup.py", line 341, in _async_setup_component
home-assistant  |     component = await integration.async_get_component()
home-assistant  |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
home-assistant  |   File "/usr/src/homeassistant/homeassistant/loader.py", line 1051, in async_get_component
home-assistant  |     self._component_future.result()
home-assistant  |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
home-assistant  |   File "/usr/src/homeassistant/homeassistant/loader.py", line 1043, in async_get_component

Essentially, the CFFI python package was at version 2.1.0 and the compiled _cffi_backend package was version 2.0.0. They need to match or exceptions are thrown.

I'm only mapping the /config folder in my container, so it's using site-packages from within the image.

I tried deleting the container, deleting the images, redownloading everything from ghcr.io and recreating the container. No dice.

It seems like the image itself has the mismatched versions.

To fix, I did the following:

docker exec -it home-assistant python3 -m pip install --force-reinstall --no-cache-dir cffi==2.1.0
docker exec -it home-assistant python3 -c "import cffi, _cffi_backend; print(cffi.__version__, cffi.__file__); print(_cffi_backend.__version__, _cffi_backend.__file__)"
docker restart home-assistant

(the second line just prints both versions to ensure that they match)

That fixed the issue, but only temporarily until the image is updated. Perhaps the container build itself could be fixed for the next version.

Are you running a raspi, or something else?
If it's a raspi, there is an eeprom update on the PI that might need to be done, and it deals with bootloader, so that's where my question comes from.
Also I don't recall anyone else having to patch the container load to get theirs going. I could of course be completely wrong,

If you still really think it's the container after that, you should push up an issue.

I recently upgraded my HA container to 2026.7.1 and I'm getting the same error as the OP when I try to add this custom integration: GitHub - BSkando/GoogleFindMy-HA at 1.7 · GitHub

I'm not competent enough to pinpoint what's causing this but I can confirm that @jkriegshauser 's solution works for me too (temporarily at least).

Hi, same error with Tapo Control integration
https://github.com/JurajNyiri/HomeAssistant-Tapo-Control

I had the issue with Tapo Cameras Control too after upgrading to 2026.7.1. Downgrading to 2026.6.x didn’t fix the problem.

I saw that there was also an update for the Operating System to 18.1 from 18.0 and from reading above about packages, I figured it might be related.

Upgrading the Operating System to 18.1 fixes it for me and I can now see my cameras again. I hope this helps others with the same problem.

I have the same problem with the Reolink cameras. Restored from 2026.7.1 to 2026.7.0, but this didn’t fix the problem. Updated to 2026.7.1 again and deleted the Reolink integration. Now when I try to add it again I get an error.

Error:

Config flow could not be loaded: {“message”:“Invalid handler specified”}

  • Installation method Home Assistant OS
  • Core 2026.7.1
  • Supervisor 2026.06.2
  • Operating System 18.1
  • Frontend 20260624.4

I already have OS version 18.1, so now what I do? So everything worked in 2026.7.0, but when I restore that version the Reolink integration still doesn’t work…

Log file:


Logger: homeassistant.loader
Source: loader.py:1091
First occurred: 08:26:55 (4 occurrences)
Last logged: 08:31:38

Unexpected exception importing component homeassistant.components.reolink
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1091, in _get_component
    ComponentProtocol, importlib.import_module(self.pkg_path)
                       ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/loop.py", line 201, in protected_loop_func
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.14/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1406, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1342, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 938, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 759, in exec_module
  File "<frozen importlib._bootstrap>", line 491, in _call_with_frames_removed
  File "/usr/src/homeassistant/homeassistant/components/reolink/__init__.py", line 10, in <module>
    from reolink_aio.api import DUAL_LENS_DUAL_MOTION_MODELS, RETRY_ATTEMPTS
  File "/usr/local/lib/python3.14/site-packages/reolink_aio/api.py", line 32, in <module>
    from .baichuan import DEFAULT_BC_PORT, Baichuan, PortType
  File "/usr/local/lib/python3.14/site-packages/reolink_aio/baichuan/__init__.py", line 3, in <module>
    from .baichuan import DEFAULT_BC_PORT, Baichuan, PortType
  File "/usr/local/lib/python3.14/site-packages/reolink_aio/baichuan/baichuan.py", line 14, in <module>
    from Cryptodome.Cipher import AES
  File "/usr/local/lib/python3.14/site-packages/Cryptodome/Cipher/AES.py", line 26, in <module>
    from Cryptodome.Util._raw_api import (load_pycryptodome_raw_lib,
                                      VoidPointer, SmartPointer,
                                      c_size_t, c_uint8_ptr)
  File "/usr/local/lib/python3.14/site-packages/Cryptodome/Util/_raw_api.py", line 87, in <module>
    ffi = FFI()
  File "/usr/local/lib/python3.14/site-packages/cffi/api.py", line 47, in __init__
    raise Exception("Version mismatch: this is the 'cffi' package version %s, located in %r.  When we import the top-level '_cffi_backend' extension module, we get version %s, located in %r.  The two versions should be equal; check your installation." % (
        __version__, __file__,
        backend.__version__, backend.__file__))
Exception: Version mismatch: this is the 'cffi' package version 2.1.0, located in '/usr/local/lib/python3.14/site-packages/cffi/api.py'.  When we import the top-level '_cffi_backend' extension module, we get version 2.0.0, located in '/usr/local/lib/python3.14/site-packages/_cffi_backend.cpython-314-x86_64-linux-musl.so'.  The two versions should be equal; check your installation.

Had the same problem with Tapo camera control HACS add-on. You recipe helped - thanks a lot for sharing! The issue is already recognized in HA:

And is already claimed fixed - so we need to make cffi reinstall as you described and wait for the update.

This time the team has really outdone itself!!! All xiaomi stuff is also scerwed. Maybe it’s a good time to start discussing moving away from goddamn Python?!

Fixed in HA 2026.7.2 - July 10

Pin cffi to 2.0.0 in package constraints (@allenporter - #175907)

if you’re a paying customer maybe you can ask for a refund…

  1. I am.
  2. Do not want a refund, want the team to actually pay attention and tone down their arrogance.

Had to surgically rebuild crap inside a container. This is NOT NORMAL.

It is fixed in HA 2026.7.2, the Reolink integration can be installed again.