Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 of 6 tasks
lanitochka17 opened this issue Jun 5, 2024 · 23 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering

Comments

@lanitochka17
Copy link

lanitochka17 commented Jun 5, 2024

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
@lanitochka17 lanitochka17 added DeployBlockerCash This issue or pull request should block deployment DeployBlocker Indicates it should block deploying the API labels Jun 5, 2024
Copy link

melvin-bot bot commented Jun 5, 2024

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

Copy link
Contributor

github-actions bot commented Jun 5, 2024

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

@lanitochka17
Copy link
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

@ShridharGoel
Copy link
Contributor

ShridharGoel commented Jun 5, 2024

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}.`,
    );
});

@ShridharGoel
Copy link
Contributor

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

@neil-marcellini neil-marcellini removed the DeployBlocker Indicates it should block deploying the API label Jun 5, 2024
@neil-marcellini
Copy link
Contributor

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

@neil-marcellini neil-marcellini added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Jun 5, 2024
@ShridharGoel
Copy link
Contributor

@neil-marcellini Any plans to make this external?

@pecanoro
Copy link
Contributor

pecanoro commented Jun 5, 2024

@ShridharGoel Please don't post proposals until the HelpWanted label has been added since we usually want the original authors to fix the bugs they caused

@pecanoro
Copy link
Contributor

pecanoro commented Jun 5, 2024

@nkdengineer This bug is coming from your PR here: #41719

@pecanoro pecanoro mentioned this issue Jun 5, 2024
50 tasks
@pecanoro pecanoro added the Bug Something is broken. Auto assigns a BugZero manager. label Jun 5, 2024
Copy link

melvin-bot bot commented Jun 5, 2024

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

@pecanoro
Copy link
Contributor

pecanoro commented Jun 5, 2024

Assigning @Santhosh-Sellavel and @nkdengineer since they were the original author and reviewer of the PR that caused it.

Note: @nkdengineer You need to write a comment here so I can assign you 😄

@nkdengineer
Copy link
Contributor

I'm here. I will create a PR tomorrow morning.

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Jun 6, 2024
@nkdengineer
Copy link
Contributor

@Santhosh-Sellavel this PR is ready for preview

Copy link

melvin-bot bot commented Jun 12, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jun 13, 2024
@melvin-bot melvin-bot bot changed the title Troubleshoot - App is stuck offline after "Force offline" toggled on and off [HOLD for payment 2024-06-20] Troubleshoot - App is stuck offline after "Force offline" toggled on and off Jun 13, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jun 13, 2024
Copy link

melvin-bot bot commented Jun 13, 2024

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

Copy link

melvin-bot bot commented Jun 13, 2024

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:

Copy link

melvin-bot bot commented Jun 13, 2024

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:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jun 19, 2024
Copy link

melvin-bot bot commented Jun 20, 2024

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!

Copy link

melvin-bot bot commented Jun 20, 2024

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

@strepanier03
Copy link
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.

@strepanier03
Copy link
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.

@melvin-bot melvin-bot bot added the Overdue label Jun 24, 2024
Copy link

melvin-bot bot commented Jun 24, 2024

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

@strepanier03
Copy link
Contributor

Closing out, thanks everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering
Projects
None yet
Development

No branches or pull requests

8 participants