You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the server can't be reached, or keeps answering with an error other than 404, while the Android TV shows its sign-in QR code, the TV polls forever. The screen keeps showing the QR code and "Waiting for approval…" long after the code has expired. It shows no countdown, so nothing tells the user the code or the server is the problem.
Why
DeviceLoginRepository.runPollLoop is a while (true) loop. Both ApiResult.Error (other than 404) and ApiResult.NetworkError wait one interval and try again, with no deadline from expires_in and no backoff (DeviceLoginRepository.kt).
When the user leaves the screen, TvLoginViewModel.onCleared cancels its jobs (TvLoginViewModel.kt). It doesn't cancel the request on the server, which stays approvable until it expires.
Expected
Stop polling at the code's expires_at, then get a new code or show that it expired with "Try again".
Back off on network errors, 5xx and 429. When failures persist, show that the server can't be reached, with "Try again" and "Change server".
If the server can't be reached, or keeps answering with an error other than 404, while the Android TV shows its sign-in QR code, the TV polls forever. The screen keeps showing the QR code and "Waiting for approval…" long after the code has expired. It shows no countdown, so nothing tells the user the code or the server is the problem.
Why
DeviceLoginRepository.runPollLoopis awhile (true)loop. BothApiResult.Error(other than 404) andApiResult.NetworkErrorwait one interval and try again, with no deadline fromexpires_inand no backoff (DeviceLoginRepository.kt).TvLoginViewModel.onClearedcancels its jobs (TvLoginViewModel.kt). It doesn't cancel the request on the server, which stays approvable until it expires.Expected
expires_at, then get a new code or show that it expired with "Try again".Notes
AI disclosure
mainat c38fb93; not reproduced on a device