Skip to content

Fix: account unreachable after 9.1.15 update (radiance startup race)#8918

Closed
david-lant wants to merge 1 commit into
mainfrom
auto-fix/ticket-180332
Closed

Fix: account unreachable after 9.1.15 update (radiance startup race)#8918
david-lant wants to merge 1 commit into
mainfrom
auto-fix/ticket-180332

Conversation

@david-lant

Copy link
Copy Markdown

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 (SetupRadiance completes ~4–7s after launch) while the Flutter MethodChannel is live immediately. When getUserData() lands before lanternCore.Store, it returns radiance not initialized; the keepAlive provider caches that failure with no retry, so user stays null and every account tap shows "Unable to open account" for the whole session. The 9.1.15 radiance dependency bump made SetupRadiance deterministically finish after build(), turning a previously-winnable race into a 0/4 failure.

What changed: build() now retries getUserData() 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

  • Cold-start 9.1.15 on Android and confirm the account loads without a restart (force SetupRadiance to lose the race).
  • Confirm the initial getUserData failure is followed by a later successful load.
  • Check the normal (radiance-ready) path has no added delay.

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.

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>
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a361cceb-060b-4bb2-8af4-eb215edfec34

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch auto-fix/ticket-180332

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@david-lant david-lant added the auto-fix Automated fix from ticket diagnosis label Jul 21, 2026
@atavism atavism closed this Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-fix Automated fix from ticket diagnosis

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants