Skip to content

Updating to 5.3.0/tesla-fleet-api causes cffi version mismatch, breaking multiple core and custom integrations (SNOO, Google Home, etc.) #288

Description

@punshs

Description

Updating to Teslemetry 5.3.0 introduces a dependency on tesla-fleet-api==1.5.4, which requires cryptography>=43. Because cryptography requires cffi>=1.12 (unpinned), Home Assistant's setup routine runs pip install and pulls in the latest version of cffi (version 2.1.0).

However, Home Assistant OS runs in a musl/alpine docker environment without compilation tools pre-installed in the production image. As a result, pip successfully upgrades the pure-Python files of cffi to 2.1.0, but cannot build or update the binary backend (_cffi_backend.so), which remains at version 2.0.0 (provided by the HA OS core image).

This creates a fatal version mismatch in the Python environment, causing any integration relying on cffi (such as the built-in snoo integration, custom components like google_home, and potentially many others using cryptography or pycryptodome) to fail to setup on startup with the following exception:

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-aarch64-linux-musl.so'.

Suggested Fix

To prevent breaking other core and custom integrations on Home Assistant, the integration should pin or check cffi package versions, or avoid upgrading core/system precompiled libraries. Alternatively, pinning cffi==2.0.0 in the manifest/requirements when running under Home Assistant would avoid pulling the mismatched 2.1.0 package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions