Skip to content

[$500] Account - Avatar doesn't load when login from public room as existing user #79449

Closed

Description

@nlemma

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.3.0-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://github.com/Expensify/Expensify/issues/581598
Issue reported by: Applause Internal Team
Bug source: Regression TC Execution
Device used: Windows Windows 11 - Chrome

Action Performed:

  1. Sign out if you are signed in
  2. Open a public room
  3. Sign in with existing user
  4. Click on account setting icon

Expected Result:

Avatar and user name should load on account page

Actual Result:

Avatar and user name doesn't load on account page

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari

Screenshots/Videos

Bug7040734_1767385259219.Recording__3056.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022014062121683669823
  • Upwork Job ID: 2014062121683669823
  • Last Price Increase: 2026-03-31
  • Automatic offers:
    • situchan | Reviewer | 110423100

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jan 13, 2026
  2. melvin-bot commented on Jan 13, 2026

    @melvin-bot

    Triggered auto assignment to @heyjennahay (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  3. annaweber830 commented on Jan 13, 2026

    @annaweber830
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    When a user opens a public room while signed out, then signs in with an existing account and navigates to Account settings, the avatar and user name don’t load on the account page

    What is the root cause of that problem?

    In the public-room flow, the app can create an ANONYMOUS session and mount AuthScreens. If the user then signs in, the session transitions from ANONYMOUS → authenticated without remounting AuthScreens, so the normal post-login bootstrapping (OpenApp) isn’t re-triggered. As a result, the authenticated user’s personalDetails (used for displayName/avatar) are never populated/refreshed in Onyx for that session, causing Settings/Profile to render loading placeholders.

    What changes do you think we should make in order to solve the problem?

    Add a guard in AuthScreens to detect when the session upgrades from ANONYMOUS → non-anonymous and:

    • Force the new authToken into NetworkStore immediately (avoid timing issues)
    • Call App.confirmReadyToOpenApp()
    • Call App.openApp(true) to re-bootstrap while preserving public rooms
    const wasAnonymousUserRef = useRef(Session.isAnonymousUser(session));
        useEffect(() => {
            const wasAnonymous = wasAnonymousUserRef.current;
            const isAnonymous = Session.isAnonymousUser(session);
            wasAnonymousUserRef.current = isAnonymous;
    
            // When opening a public room, the user can be "authenticated" as an anonymous user (AuthScreens is already mounted).
            // If they then sign in with an existing account, we need to re-run OpenApp to hydrate full account data such as personal details (avatar/display name).
            if (!wasAnonymous || isAnonymous) {
                return;
            }
    
            if (!session?.authToken) {
                return;
            }
    
            // Ensure subsequent requests use the new token immediately (don't rely on async Onyx subscriber timing).
            NetworkStore.setAuthToken(session.authToken);
            App.confirmReadyToOpenApp();
            App.openApp(true);
        }, [session]);
    

    What alternative solutions did you explore? (Optional)

    waitForIdle().then(() => {
    openApp(true);
    });

    waitForIdle().then(() => {
                    confirmReadyToOpenApp();
                    openApp(true);
                });
    
  4. melvin-bot commented on Jan 17, 2026

    @melvin-bot

    @heyjennahay Whoops! This issue is 2 days overdue. Let's get this updated quick!

  5. melvin-bot commented on Jan 21, 2026

    @melvin-bot

    @heyjennahay 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

  6. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jan 21, 2026
  7. melvin-bot commented on Jan 21, 2026

    @melvin-bot
  8. changed the title [-]Account - Avatar doesn't load when login from public room as existing user[/-] [+][$250] Account - Avatar doesn't load when login from public room as existing user[/+] on Jan 21, 2026
  9. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jan 21, 2026
  10. melvin-bot commented on Jan 21, 2026

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @situchan (External)

  11. 44 remaining items

  12. situchan commented on Mar 30, 2026

    @situchan
    Contributor

    Automation failed here.
    I reviewed 2 PRs linked to this issue:

    @heyjennahay can you please sort payment? I accepted this offer.

  13. melvin-bot commented on Mar 30, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  14. heyjennahay commented on Mar 30, 2026

    @heyjennahay
    Contributor

    Thanks for the bump @situchan it seems the automation never updated the state of this GH.

    Payment summary

    @situchan paid $250 via Upwork. Contract closed.

    Thanks everyone for your work here :)

  15. situchan commented on Mar 30, 2026

    @situchan
    Contributor

    Thanks @heyjennahay It should be 500 since 2 PRs which are different.

  16. heyjennahay commented on Mar 31, 2026

    @heyjennahay
    Contributor

    Ah ok, I just paid the offer as is was created which was only for $250. Let me see if I can re-open it to change the amount or if I need to create a new one

  17. heyjennahay commented on Mar 31, 2026

    @heyjennahay
    Contributor

    Thanks @situchan for pointing out that I can just add a bonus to the original contract.

    Payment summary

    @situchan paid $500 (in total) via Upwork

  18. changed the title [-][$250] Account - Avatar doesn't load when login from public room as existing user[/-] [+][$500] Account - Avatar doesn't load when login from public room as existing user[/+] on Mar 31, 2026
  19. melvin-bot commented on Mar 31, 2026

    @melvin-bot

    Upwork job price has been updated to $500

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions