fix(#8440): improve IRC auth error handling with retry mechanism#8546
Open
Pro0101-2b2fr wants to merge 1 commit into
Open
fix(#8440): improve IRC auth error handling with retry mechanism#8546Pro0101-2b2fr wants to merge 1 commit into
Pro0101-2b2fr wants to merge 1 commit into
Conversation
When Mojang authentication fails (e.g. expired session token), the client now retries up to 3 times with exponential backoff (3s, 8s, 15s) before showing a final error message. This handles transient auth failures without requiring the user to manually restart. Changes: - Add logger.warn/error in AxochatClient for auth failures - Add retry logic with backoff in GlobalSettingsClientChat - Show actionable chat message only after all retries exhausted - Reset retry counter on successful login or session change
a24eea7 to
5f4e415
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Might fix #8440 ? — LiquidChat authentication silently failed with "Not authenticated!" even for premium accounts.
Changes
AxochatClient.kt
logger.warnforInvalidCredentialsException(was completely silent before).logger.errorwith full stacktrace for unexpected auth errors.GlobalSettingsClientChat.kt
requestMojangLogin()up to 3 times with exponential backoff (3s, 8s, 15s). This handles transient token expiration without user intervention.authRetryCountis reset on successful login (LOGGED_INstate) and on session change (SessionEvent), so a fresh login attempt always starts clean.Why retry works
Minecraft auth service (
sessionService.joinServer) validates the current access token against Mojang servers. Tokens can expire mid-session but get refreshed by the launcher in the background. A retry after a few seconds often succeeds because:After 3 failures (~26s total), the token is genuinely invalid and user action is required.
Backoff schedule
This PR was developed with AI assistance.