Skip to content

V1.6-beta8

Pre-release
Pre-release

Choose a tag to compare

@BSkando BSkando released this 09 Nov 03:40
fe9a343

Critical Bug Fixes

Multi-Account Cache Race Condition (NovaApi/nova_request.py)

  • Fixed race condition where concurrent location requests from different accounts would overwrite each other's cache provider
  • Changed from global variable to contextvars.ContextVar for thread-safe, context-local cache storage
  • Prevents "owner key version mismatch" errors when multiple accounts run simultaneously

FCM Callback Cache Context Loss (NovaApi/ExecuteAction/LocateTracker/location_request.py)

  • Fixed cache context being lost when FCM callbacks fire via asyncio.run_coroutine_threadsafe()
  • Capture and restore cache provider in callback to ensure correct account context during async decryption
  • Fixes "Multiple config entries active" errors during location updates

Startup Crash with Malformed Device Registry (init.py, coordinator.py)

  • Added defensive checks for malformed/corrupted device identifiers in registry
  • Prevents ValueError: not enough values to unpack crashes during integration setup
  • Gracefully handles old/corrupted device entries (8 locations total)

Bug Fixes

Crowd Sourced Updates Sensor (coordinator.py)

  • Fixed sensor never incrementing - now properly tracks crowdsourced location reports
  • Added stat increment when _report_hint field is present (3 locations: polling, background push, manual locate)

Map View "Unknown Device" (map_view.py)

  • Fixed device name resolution in multi-account mode
  • Extract raw Google device ID from {entry_id}_{device_id} format for coordinator matching

Owner Key Version Detection (NovaApi/ExecuteAction/LocateTracker/decrypt_locations.py)

  • Added bidirectional version mismatch detection (was only checking tracker < current)
  • Now detects when cached owner key is OLDER than tracker's key (wrong account scenario)
  • Clear error messages distinguish E2EE reset vs multi-account credential mixup

Username Context (api.py)

  • Added username retrieval and passing to get_location_data_for_device()
  • Provides additional account context for multi-account scenarios

Improvements

Reduced Log Noise

  • coordinator.py: Changed "No location data" from WARNING to INFO (more appropriate for normal out-of-range condition)
  • location_request.py: Reduced 2 duplicate "no location" warnings to DEBUG
  • Auth/token_cache.py: Multi-account cache message changed from WARNING to DEBUG
  • Result: 4 warnings per device → 1 INFO message

Enhanced Diagnostics (NovaApi/ExecuteAction/LocateTracker/decrypt_locations.py)

  • Added debug logging showing which account is being used during decryption
  • Privacy-preserving username redaction in logs (SpotApi/GetEidInfoForE2eeDevices/get_owner_key.py)
  • Better error messages for multi-account credential issues