Skip to content

[Due for payment 2025-11-03] [$250] Infinite skeleton loading when navigating to Newdot from OD #72673

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.31-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: Exploratory
Email or phone of affected tester (no customers): htad26+eruoiuiy@gmail.com
Issue reported by: Applause Internal Team
Device used: Windows 10 / Chrome
App Component: Other

Action Performed:

  1. Navigate to New dot and sign in with a new account
  2. Navigate to troubleshoot > Switch to Expensify classic > Finish the flow
  3. When you are redirected to Old dot, Click on "Try new Expensify"
  4. After you are navigated to New dot, wait without changing reports or tabs

Expected Result:

Chats load correctly in New dot

Actual Result:

There is an infinite skeleton loading 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

1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021978601781165939079
  • Upwork Job ID: 1978601781165939079
  • Last Price Increase: 2025-10-15
Issue OwnerCurrent Issue Owner: @strepanier03

Activity

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

    @melvin-bot

    Triggered auto assignment to @alexpensify (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 15, 2025

    @dmkt9
    Contributor

    Proposal

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

    There is an infinite skeleton loading displayed

    What is the root cause of that problem?

    1. When opening the app via a transition deeplink, the ReportScreen is initialized with reportID === ''.

      // If we are in a transition, we explicitly do NOT want to load the last accessed report.
      // Returning an empty string here will cause ReportScreen to skip the `openReport` call initially.
      if (isTransitioning) {
      return '';
      }

    2. When the transition ends, navigation occurs here, and exitTo usually has the value /, so no actual route gets added.

      Navigation.goBack();
      if (exitTo) {
      Navigation.navigate(exitTo as Route);
      }

      if (exitTo) {
      Navigation.isNavigationReady().then(() => {
      // We must call goBack() to remove the /transition route from history
      Navigation.goBack();
      Navigation.navigate(exitTo as Route);
      });
      }

    3. When ReportScreen mounts, it checks whether reportID === ''. If so, it sets the reportID params using lastAccessedReportID.

      const lastAccessedReportID = findLastAccessedReport(!isBetaEnabled(CONST.BETAS.DEFAULT_ROOMS), 'openOnAdminRoom' in route.params && !!route.params.openOnAdminRoom)?.reportID;
      // It's possible that reports aren't fully loaded yet
      // in that case the reportID is undefined
      if (!lastAccessedReportID) {
      return;
      }
      Log.info(`[ReportScreen] no reportID found in params, setting it to lastAccessedReportID: ${lastAccessedReportID}`);
      navigation.setParams({reportID: lastAccessedReportID});

      However, this setParams call doesn’t wait for the transition route to finish, so the reportID isn’t set.
      (In reality, this is a race condition between the transition route finishing and the setParams call.)

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

    We should only call setParams after the transition route has completed.
    For example:

    useEffect(() => {
    // Don't update if there is a reportID in the params already
    if (route.params.reportID) {
    const reportActionID = route?.params?.reportActionID;
    const isValidReportActionID = reportActionID && isNumeric(reportActionID);
    if (reportActionID && !isValidReportActionID) {
    Navigation.isNavigationReady().then(() => navigation.setParams({reportActionID: ''}));
    }
    return;
    }
    const lastAccessedReportID = findLastAccessedReport(!isBetaEnabled(CONST.BETAS.DEFAULT_ROOMS), 'openOnAdminRoom' in route.params && !!route.params.openOnAdminRoom)?.reportID;
    // It's possible that reports aren't fully loaded yet
    // in that case the reportID is undefined
    if (!lastAccessedReportID) {
    return;
    }
    Log.info(`[ReportScreen] no reportID found in params, setting it to lastAccessedReportID: ${lastAccessedReportID}`);
    navigation.setParams({reportID: lastAccessedReportID});
    }, [isBetaEnabled, navigation, route]);

    const currentURL = getCurrentUrl();
    const isTransitioning = currentURL.includes(ROUTES.TRANSITION_BETWEEN_APPS);
    
    useEffect(() => {
        if (isTransitioning) {
            return;
        }
        
        ...
    
    }, [isBetaEnabled, navigation, route, isTransitioning]);
    
    2025-10-15.18-37-34.mp4
  4. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Oct 15, 2025
  5. melvin-bot commented on Oct 15, 2025

    @melvin-bot
  6. changed the title [-]Infinite skeleton loading when navigating to Newdot from OD[/-] [+][$250] Infinite skeleton loading when navigating to Newdot from OD[/+] on Oct 15, 2025
  7. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Oct 15, 2025
  8. melvin-bot commented on Oct 15, 2025

    @melvin-bot

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

  9. alexpensify commented on Oct 15, 2025

    @alexpensify
    Contributor

    @jjcoffee - When you get a chance, please review if this proposal will fix the issue? Thanks!

  10. lorretheboy commented on Oct 16, 2025

    @lorretheboy
    Contributor

    Hmmm... I cannot reproduce the issue in latest main

  11. jjcoffee commented on Oct 16, 2025

    @jjcoffee
    Contributor

    @dmkt9 Are you able to reproduce on main?

  12. dmkt9 commented on Oct 16, 2025

    @dmkt9
    Contributor

    @dmkt9 Are you able to reproduce on main?

    @jjcoffee Yes, I can still reproduce it on the latest main branch.

    2025-10-16.15-59-28.mp4
  13. 32 remaining items

  14. added
    BugSomething is broken. Auto assigns a BugZero manager.
    and removed
    BugSomething is broken. Auto assigns a BugZero manager.
    on Nov 3, 2025
  15. melvin-bot commented on Nov 3, 2025

    @melvin-bot

    Triggered auto assignment to @strepanier03 (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.

  16. alexpensify commented on Nov 3, 2025

    @alexpensify
    Contributor

    @strepanier03 - Reassigning the label so this one doesn't get lost.

    We need a payment summary here. Thanks!

  17. melvin-bot commented on Nov 3, 2025

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@strepanier03)

    • (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/1978601781165939079/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
  18. jjcoffee commented on Nov 7, 2025

    @jjcoffee
    Contributor

    @strepanier03 Friendly bump for payment 🙏

  19. strepanier03 commented on Nov 10, 2025

    @strepanier03
    Contributor

    Payment summary

  20. strepanier03 commented on Nov 10, 2025

    @strepanier03
    Contributor

    Payment summary above for the Newdot payment, everything else is wrapped so closing out.

  21. trjExpensify commented on Nov 12, 2025

    @trjExpensify
    Contributor

    approved $250 for @jjcoffee.

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.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions