Skip to content

fix(sidecar): fall back to IPv4 when IPv6 is dead during Spotify connect - #75

Open
hadouin wants to merge 1 commit into
Adridot:masterfrom
hadouin:fix/spotify-callback-ipv6-fallback
Open

hadouin wants to merge 1 commit into
Adridot:masterfrom
hadouin:fix/spotify-callback-ipv6-fallback

Conversation

@hadouin

@hadouin hadouin commented Nov 11, 2026 •

Copy link
Copy Markdown

Spotify connect now works on networks where IPv6 resolves but has no route.
Each address gets 3 s, so a dead IPv6 address no longer blocks IPv4.
A failed token exchange now shows an error instead of a timeout and state_mismatch.

Blast radius: all outbound provider calls (Spotify, catalogue lookups) for users with slow IPv6 or IPv4 connects.

…nnect

On networks that resolve AAAA records but have no working IPv6 route,
public_connection gave the first (IPv6) address the whole 15 s budget, so
the token exchange timed out without ever trying IPv4. The resulting
TimeoutError escaped handle_callback after the PKCE state was consumed,
leaving a null authorization result (UI reported a timeout) and any browser
retry of the callback failed with state_mismatch.

- interleave address families and cap each connect attempt at 3 s, still
  within the shared deadline
- end the authorization attempt as an error on any token exchange failure
  and log it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant