Skip to content

[Due for payment 2025-10-27] [$250] Public room is not open via link when logged out - Native app #71656

Closed

Description

@jponikarchuk

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: v9.2.21-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: #71271
Email or phone of affected tester (no customers): qaooxxasfds@gmail.com
Issue reported by: Applause Internal Team
Device used: iPhone 12 / iOS 18.7
App Component: Other

Action Performed:

  1. Open the app
  2. Sign in with any account
  3. Log out (keep the app in the background)
  4. Go to any external chat and open this URL: https://staging.new.expensify.com/r/2091104345528462

Expected Result:

Public room content should be displayed

Actual Result:

Public room is not displayed

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

11.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021973851637553529167
  • Upwork Job ID: 1973851637553529167
  • Last Price Increase: 2025-10-09
Issue OwnerCurrent Issue Owner: @CortneyOfstad

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Oct 1, 2025
  2. melvin-bot commented on Oct 1, 2025

    @melvin-bot

    Triggered auto assignment to @CortneyOfstad (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. dmkt9 commented on Oct 1, 2025

    @dmkt9
    Contributor

    Proposal

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

    Public room is not open via link when logged out

    What is the root cause of that problem?

    1. When opening a deeplink in the native app, the app is navigated by calling Report.openReportFromDeepLink at this point:

      App/src/Expensify.tsx

      Lines 235 to 237 in fa5e06d

      linkingChangeListener.current = Linking.addEventListener('url', (state) => {
      Report.openReportFromDeepLink(state.url, currentOnboardingPurposeSelected, currentOnboardingCompanySize, onboardingInitialPath, allReports, isAuthenticated);
      });

      Since the user was already signed in, the isAuthenticated value passed to openReportFromDeepLink remains true.

    2. Inside openReportFromDeepLink, because isAuthenticated === true, openReport is not called:

      App/src/libs/actions/Report.ts

      Lines 3419 to 3430 in fa5e06d

      if (reportID && !isAuthenticated) {
      // Call the OpenReport command to check in the server if it's a public room. If so, we'll open it as an anonymous user
      openReport(reportID, '', [], undefined, '0', true);
      // Show the sign-in page if the app is offline
      if (networkStatus === CONST.NETWORK.NETWORK_STATUS.OFFLINE) {
      doneCheckingPublicRoom();
      }
      } else {
      // If we're not opening a public room (no reportID) or the user is authenticated, we unblock the UI (hide splash screen)
      doneCheckingPublicRoom();
      }

    3. As a result, openReport is never triggered, so waitForUserSignIn never resolves, and the user is not navigated to the public room chat.

      waitForUserSignIn().then(() => {

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

    Use the hasAuthToken function to determine the value of isAuthenticated, and pass that to openReportFromDeepLink.
    hasAuthToken was previously used in openReportFromDeepLink but was removed in PR #70382

    Report.openReportFromDeepLink(state.url, currentOnboardingPurposeSelected, currentOnboardingCompanySize, onboardingInitialPath, allReports, isAuthenticated);

    const isCurrentlyAuthenticated = hasAuthToken();
    Report.openReportFromDeepLink(state.url, currentOnboardingPurposeSelected, currentOnboardingCompanySize, onboardingInitialPath, allReports, isCurrentlyAuthenticated);

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    NA

    What alternative solutions did you explore? (Optional)

    NA

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  4. gijoe0295 commented on Oct 2, 2025

    @gijoe0295
    Contributor

    Proposal

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

    Public room is not open via link when logged out

    What is the root cause of that problem?

    This is a common React issue that happens when you don't include the variable in the effect's dependencies list, each effect run might have stale data.

    Report.openReportFromDeepLink(state.url, currentOnboardingPurposeSelected, currentOnboardingCompanySize, onboardingInitialPath, allReports, isAuthenticated);

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

    We can not simply add isAuthenticated to the above effect dependencies list because it might cause regressions, or use hasAuthToken because it can reintroduce the previous bug that it was removed to solve.

    There's a workaround to useRef to store the isAuthenticated value instead. Then use a separate effect to update the isAuthenticatedRef to the latest value.

    What alternative solutions did you explore? (Optional)

    None

  5. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Oct 2, 2025
  6. changed the title [-]Public room is not open via link when logged out - Native app[/-] [+][$250] Public room is not open via link when logged out - Native app[/+] on Oct 2, 2025
  7. melvin-bot commented on Oct 2, 2025

    @melvin-bot
  8. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Oct 2, 2025
  9. melvin-bot commented on Oct 2, 2025

    @melvin-bot

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

  10. CortneyOfstad commented on Oct 2, 2025

    @CortneyOfstad
    Contributor

    Hey @akinwale! We have two proposals above for review when you have a chance – thanks!

  11. akinwale commented on Oct 7, 2025

    @akinwale
    Contributor

    @dmkt9's proposal looks good here.

    🎀👀🎀 C+ reviewed.

  12. 15 remaining items

  13. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Oct 20, 2025
  14. changed the title [-][$250] Public room is not open via link when logged out - Native app[/-] [+][Due for payment 2025-10-27] [$250] Public room is not open via link when logged out - Native app[/+] on Oct 20, 2025
  15. melvin-bot commented on Oct 20, 2025

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  16. melvin-bot commented on Oct 20, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.33-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2025-10-27. 🎊

    For reference, here are some details about the assignees on this issue:

    • @akinwale requires payment through NewDot Manual Requests
    • @dmkt9 requires payment (Needs manual offer from BZ)
  17. melvin-bot commented on Oct 20, 2025

    @melvin-bot

    @akinwale @CortneyOfstad The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  18. CortneyOfstad commented on Oct 24, 2025

    @CortneyOfstad
    Contributor

    Hey @akinwale — can you complete the checklist so there is no delay in payment?

    @dmkt9 — I also sent you an offer via Upwork here. Please accept as soon as you can so there is no delay in payment either.

    Thanks!

  19. dmkt9 commented on Oct 25, 2025

    @dmkt9
    Contributor

    @CortneyOfstad Thank you. I've just requested payment on upwork.

  20. akinwale commented on Oct 26, 2025

    @akinwale
    Contributor

    BugZero Checklist:

    • [@akinwale] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to comment: N/A

    • [@akinwale] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion: N/A

    • [@akinwale] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Test:

    1. Launch Expensify.
    2. Sign in with an account.
    3. Sign out.
    4. Launch a public chat room report, e.g. https://staging.new.expensify.com/r/2091104345528462
    5. Verify that the public room content is displayed.

    Do we agree 👍 or 👎?

  21. melvin-bot commented on Oct 27, 2025

    @melvin-bot

    Payment Summary

    Upwork Job

    • Reviewer: @akinwale owed $250 via NewDot
    • ROLE: @dmkt9 paid $(AMOUNT) via Upwork (LINK)

    BugZero Checklist (@CortneyOfstad)

    • (if NewFeature) I have created a PR for any necessary HelpDot updates, or I confirmed no updates are necessary.
    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1973851637553529167/hired)
    • I have verified the PR was not reverted
    • I have applied any discounts due to bugs/regressions introduced by this PR
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  22. CortneyOfstad commented on Oct 27, 2025

    @CortneyOfstad
    Contributor

    Payment Summary

    @dmkt9 — paid $250 via Upwork
    @akinwale — to be paid $250 via NewDot

    Regression Test

    https://github.com/Expensify/Expensify/issues/561976

  23. garrettmknight commented on Nov 4, 2025

    @garrettmknight
    Contributor

    $250 approved for @akinwale

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 contributorWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions