Skip to content

[HOLD for payment 2024-06-20] Troubleshoot - App is stuck offline after "Force offline" toggled on and off #43116

Closed

Description

@lanitochka17

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: 1.4.79-3
Reproducible in staging?: Y
Reproducible in production?: Unable to check
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team

Action Performed:

  1. Log in to New Expensify
  2. Navigate to Account settings > Troubleshoot
  3. Toggle on and off the "Force offline" toggle

Expected Result:

The App should go online after switching off the "Force offline" toggle

Actual Result:

The App is stuck in the offline state. The offline indicator remains.
User is forced to either refresh the page or force-kill the app in order to return online

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6502114_1717537103493.2024-06-04_19-08-15.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @strepanier03

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    DeployBlockerIndicates it should block deploying the API
    on Jun 5, 2024
  2. melvin-bot commented on Jun 5, 2024

    @melvin-bot

    Triggered auto assignment to @pecanoro (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  3. github-actions commented on Jun 5, 2024

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  4. lanitochka17 commented on Jun 5, 2024

    @lanitochka17
    Author

    @pecanoro FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

  5. ShridharGoel commented on Jun 5, 2024

    @ShridharGoel
    Contributor

    Proposal

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

    Troubleshoot - App is stuck offline after "Force offline" toggled on and off.

    What is the root cause of that problem?

    The below logic is wrong, setOfflineStatus expects isOffline kind of value but actually the opposite is being passed.

    const isInternetReachable = Boolean(state.isInternetReachable);
    setOfflineStatus(isInternetReachable);
    Log.info(
    `[NetworkStatus] The force-offline mode was turned off. Getting the device network status from NetInfo. Network state: ${JSON.stringify(
    state,
    )}. Setting the offline status to: ${isInternetReachable}.`,
    );

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

    Change it to this:

    NetInfo.fetch().then((state) => {
        const isOffline = !(state.isInternetReachable ?? false);
        setOfflineStatus(isOffline);
        Log.info(
            `[NetworkStatus] The force-offline mode was turned off. Getting the device network status from NetInfo. Network state: ${JSON.stringify(
                state,
            )}. Setting the offline status to: ${isOffline}.`,
        );
    });
    
  6. ShridharGoel commented on Jun 5, 2024

    @ShridharGoel
    Contributor

    @pecanoro I can quickly open a PR if this is a blocker.

  7. neil-marcellini commented on Jun 5, 2024

    @neil-marcellini
    Contributor

    Frontend only bug. In fact, since this is a test tool only it shouldn't be a blocker at all

  8. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Jun 5, 2024
  9. 21 remaining items

  10. melvin-bot commented on Jun 13, 2024

    @melvin-bot

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

  11. melvin-bot commented on Jun 13, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.82-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 2024-06-20. 🎊

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

  12. melvin-bot commented on Jun 13, 2024

    @melvin-bot

    BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

    • [@pecanoro] The PR that introduced the bug has been identified. Link to the PR:
    • [@pecanoro] 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:
    • [@pecanoro] A discussion in #expensify-bugs 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:
    • [@Santhosh-Sellavel / @nkdengineer] Determine if we should create a regression test for this bug.
    • [@Santhosh-Sellavel / @nkdengineer] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
    • [] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  13. melvin-bot commented on Jun 20, 2024

    @melvin-bot

    Issue is ready for payment but no BZ is assigned. @strepanier03 you are the lucky winner! Please verify the payment summary looks correct and complete the checklist. Thanks!

  14. melvin-bot commented on Jun 20, 2024

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@strepanier03)

    • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants//hired)
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  15. strepanier03 commented on Jun 20, 2024

    @strepanier03
    Contributor

    Aaaah, I made the job before I reviewed above and it looks like this might be a fix for a bug stemming from #41719.

    Seeing as this is a fix for a regression caused, I don't believe there is any payment due here.

  16. strepanier03 commented on Jun 20, 2024

    @strepanier03
    Contributor

    I'll circle back to this tomorrow in case there's any pushback. If not I'll cancel the job I make in Upwork and close this out.

  17. melvin-bot commented on Jun 24, 2024

    @melvin-bot

    @pecanoro, @strepanier03, @Santhosh-Sellavel, @nkdengineer Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  18. strepanier03 commented on Jun 24, 2024

    @strepanier03
    Contributor

    Closing out, thanks everyone!

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.DailyKSv2Engineering

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions