UnauthorizedError despite Healthy Anisette Server
HI @malmeloo
# 🐞 Issue Report: UnauthorizedError despite Healthy Anisette Server
### Description
The `hass-FindMy` integration fails to fetch location reports, consistently showing an `UnauthorizedError` and an "Authentication failed" message.
However, the supporting **`anisette-v3-server`** Docker container, which is responsible for generating the Apple cryptographic signatures, is running correctly and responding with **200 OK** to all requests (as shown in the logs below). This suggests the issue may lie in how the FindMy integration handles the returned session token/cookies, or if the stored session data within Home Assistant is stale/rejected by Apple, rather than a failure of the Anisette server itself.
---
### Failure Logs
#### 1. Home Assistant (hass-FindMy) Logs - Authentication Failure
```log
2025-12-06 14:51:44.922 WARNING (MainThread) [findmy.reports.account] Empty response received when fetching reports, retrying (1/3)
2025-12-06 14:51:47.143 WARNING (MainThread) [findmy.reports.account] Empty response received when fetching reports, retrying (2/3)
2025-12-06 14:51:49.366 WARNING (MainThread) [findmy.reports.account] Empty response received when fetching reports, retrying (3/3)
2025-12-06 14:51:49.366 WARNING (MainThread) [findmy.reports.account] Max retries reached, returning empty response. Location reports might be missing!
2025-12-06 14:52:34.568 ERROR (MainThread) [custom_components.findmy.coordinator] Unauthorized... :c
findmy.errors.UnauthorizedError: Not authorized to fetch reports.
2025-12-06 14:52:34.583 ERROR (MainThread) [custom_components.findmy.coordinator] Authentication failed while fetching Location Reports data: Not authorized to fetch reports.
2025-12-06 14:54:44.161 ERROR (MainThread) [custom_components.findmy.coordinator] Unauthorized... :c
findmy.errors.UnauthorizedError: Not authorized to fetch reports.
2025-12-06 14:54:44.168 ERROR (MainThread) [custom_components.findmy.coordinator] Authentication failed while fetching Location Reports data: Not authorized to fetch reports.
root@tinker-edge-r:~# docker ps | grep anisette
3a5f77b8607b dadoum/anisette-v3-server "/opt/anisette-v3-se…" 15 hours ago Up 2 hours 0.0.0.0:6969->6969/tcp, [::]:6969->6969/tcp anisette
root@tinker-edge-r:~# docker logs anisette --tail 50
...
app INFO 2025-12-06T11:51:16.033 [<<] anisette-v1 request
app INFO 2025-12-06T11:51:16.034 [>>] 200 OK {"X-Apple-I-Client-Time":"2025-12-06T11:51:16Z", ... }
app INFO 2025-12-06T11:51:44.395 [<<] anisette-v1 request
app INFO 2025-12-06T11:51:44.398 [>>] 200 OK {"X-Apple-I-Client-Time":"2025-12-06T11:51:44Z", ... }
app INFO 2025-12-06T11:52:01.783 [<<] anisette-v1 request
app INFO 2025-12-06T11:52:01.784 [>>] 200 OK {"X-Apple-I-Client-Time":"2025-12-06T11:52:01Z", ... }
app INFO 2025-12-06T11:52:26.248 [<<] anisette-v1 request
关闭于 2025-12-06 3 条评论