Fix: account unreachable after 9.1.15 update (radiance startup race)#8918
Closed
david-lant wants to merge 1 commit into
Closed
Fix: account unreachable after 9.1.15 update (radiance startup race)#8918david-lant wants to merge 1 commit into
david-lant wants to merge 1 commit into
Conversation
Auto-diagnosed from Freshdesk ticket #180332. Root cause: HomeNotifier.build() fetched user data exactly once at cold start; when it landed before the async SetupRadiance completed, getUserData() returned "radiance not initialized" and the keepAlive provider cached that error with no retry, so the account screen stayed unreachable for the whole session. Retry with a bounded backoff over the radiance-setup window. Co-Authored-By: Claude <noreply@anthropic.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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
Auto-fix for Freshdesk ticket #180332 — Pro Android users report "更新以后登录不了" (can't log in after updating) on client 9.1.15.
Root cause:
HomeNotifier.build()(lib/features/home/provider/home_notifier.dart) fetched user data exactly once at cold start. On Android, the Go core (radiance) is set up asynchronously (SetupRadiancecompletes ~4–7s after launch) while the Flutter MethodChannel is live immediately. WhengetUserData()lands beforelanternCore.Store, it returnsradiance not initialized; thekeepAliveprovider caches that failure with no retry, souserstays null and every account tap shows "Unable to open account" for the whole session. The 9.1.15 radiance dependency bump madeSetupRadiancedeterministically finish afterbuild(), turning a previously-winnable race into a 0/4 failure.What changed:
build()now retriesgetUserData()with a bounded backoff (up to 10 attempts, 1s apart) instead of throwing on the first failure. The provider stays in loading during the radiance-setup window and resolves once the core is ready; if it genuinely never succeeds it still throws after attempts are exhausted. Single-file, ~25 lines.Test plan
Follow-up (out of scope)
Cleaner long-term fix: invalidate homeProvider / call refreshUser() on a radiance-ready event. Left as follow-up per the diagnosis Unresolved notes.
Auto-generated by
/ticket-autodiagnose->/issue-fix. Draft — needs human review + a build/analyze run before merge.