alandtse/alexa_media_player

bug: cookie-auth bootstrap probe hardcodes alexa.amazon.com, breaking non-US regions

Geschlossen

#3.455 geöffnet am 10.05.2026

 (6 Kommentare) (1 Reaktion) (1 zugewiesene Person)Python (343 Forks)auto 404
alexa_mediabughelp wantedpr submitted

Repository-Metriken

Stars
 (1.960 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 23T 3h) (6 gemergte PRs in 30 T)

Beschreibung

Summary

In custom_components/alexa_media/__init__.py (around line 800), the bootstrap cookie-auth probe hardcodes https://alexa.amazon.com/api/bootstrap. Accounts configured for non-US Amazon regions (e.g., amazon.co.uk, amazon.de, etc.) will never take this fast path and always fall back to the full login.login() flow.

Severity

Deferrable — non-US users are not broken; they simply don't benefit from the cookie-auth fast path introduced in #3445.

Proposed Fix

Build the bootstrap URL from the login object's configured host (e.g., login.host or login._host) instead of pinning the US domain:

bootstrap_url = f"https://{login.host}/api/bootstrap"
async with login._session.get(
    bootstrap_url,
    cookies=cookies,
    ssl=login._ssl,
    allow_redirects=False,
) as response:

References

  • Introduced in: #3445 (by @Kyzcreig)
  • Identified in: #3450
  • Requested by: @alandtse

Contributor Guide