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 2023-09-29] [$500] Chat - Conversations do not load if you interrupt the Internet connection when logging in #27054

Closed
6 tasks done
lanitochka17 opened this issue Sep 8, 2023 · 21 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Sep 8, 2023

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


Action Performed:

  1. Open a New Expensify app
  2. Log in with HT account
  3. Turn off the internet for 5 seconds when the download starts
  4. Turn the internet back on

Expected Result:

The app should in all situations download the entire conversation history if online

Actual Result:

If you turn off the internet when logging into your HT account and then turn it back on, the app can't load the conversation history and only loads the last active one

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.66-3

Reproducible in staging?: Yes

Reproducible in production?: No

If this was caught during regression testing, add the test name, ID and link from TestRail:

Email or phone of affected tester (no customers):

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

Bug6193244_Recording__204.mp4
Record_Android.mp4

Production

20230908_220010.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal team

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0159e32a8761c731e6
  • Upwork Job ID: 1701890298391609344
  • Last Price Increase: 2023-09-13
  • Automatic offers:
    • tienifr | Contributor | 26751852
@lanitochka17 lanitochka17 added the DeployBlockerCash This issue or pull request should block deployment label Sep 8, 2023
@OSBotify
Copy link
Contributor

OSBotify commented Sep 8, 2023

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

@github-actions github-actions bot added the Hourly KSv2 label Sep 8, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 8, 2023

Triggered auto assignment to @deetergp (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@deetergp
Copy link
Contributor

deetergp commented Sep 11, 2023

I'm pretty sure I was able to recreate this on production… So I'm not sure it's a DeployBlocker.

@deetergp deetergp added Weekly KSv2 Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 Weekly KSv2 labels Sep 11, 2023
@melvin-bot melvin-bot bot added the Overdue label Sep 13, 2023
@deetergp
Copy link
Contributor

I'm going to mark this as External and see what our contributors can do with it.

@melvin-bot melvin-bot bot removed the Overdue label Sep 13, 2023
@deetergp deetergp added the External Added to denote the issue can be worked on by a contributor label Sep 13, 2023
@melvin-bot melvin-bot bot changed the title Chat - Conversations do not load if you interrupt the Internet connection when logging in [$500] Chat - Conversations do not load if you interrupt the Internet connection when logging in Sep 13, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 13, 2023

Job added to Upwork: https://www.upwork.com/jobs/~0159e32a8761c731e6

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 13, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 13, 2023

Triggered auto assignment to @bfitzexpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Sep 13, 2023

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

@nahid633
Copy link
Contributor

Proposal

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

Chat - Conversations do not load if you interrupt the Internet connection when logging in

What is the root cause of that problem?

in AuthScreen.js
line 140 there is NetworkConnection.onReconnect(() => {}) function listen for reconnect and call the function. inside that function App.reconnectApp is called. What i get from my investigation is that App.reconnectApp() and App.openApp command returns different data therefore we don't see the all convestions history.

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

if we are solving this issue in FE. adding App.openApp(); next to App.reconnectApp() will get latest results and conversations.
line 142 App.openApp();

What alternative solutions did you explore? (Optional)

Other solution is to fix ReconnectApp api response to get same results as OpenApp().

chathistoryproblem.mp4

@tienifr
Copy link
Contributor

tienifr commented Sep 13, 2023

Proposal

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

Chat - Conversations do not load if you interrupt the Internet connection when logging in

What is the root cause of that problem?

After login successfully, we call API OpenApp, if users turn off the network for a long time, browser will reject this request. And because it's the read API, we don't have the logic to re-run.

Although we already we the logic to run reconnectApp API when users go online, but this API doesn't get all data like OpenApp

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

We should create the new Onyx key named IS_LOADING_APP to indicate that OpenApp is loading or not
When calling OpenApp API, we should update it to true, and set to false in successData and failureData

In AuthScreen, subscribe IS_LOADING_APP and use this value in

NetworkConnection.onReconnect(() => App.reconnectApp(this.props.lastUpdateIDAppliedToClient));

        NetworkConnection.onReconnect(() => {
            isLoadingApp? App.openApp(): App.reconnectApp(this.props.lastUpdateIDAppliedToClient)
        });

Result

Screen.Recording.2023-09-13.at.18.26.33.mp4

@narefyev91
Copy link
Contributor

Proposal from @tienifr looks good to me #27054 (comment)
We should separate usage of App.openApp(); and App.reconnectApp(this.props.lastUpdateIDAppliedToClient); - and not try to make them working as a one call or combine both in one
🎀 👀 🎀 C+ reviewed

@melvin-bot
Copy link

melvin-bot bot commented Sep 13, 2023

Current assignee @deetergp is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@nahid633
Copy link
Contributor

Proposal from @tienifr looks good to me #27054 (comment)
We should separate usage of App.openApp(); and App.reconnectApp(this.props.lastUpdateIDAppliedToClient); - and not try to make them working as a one call or combine both in one
🎀 👀 🎀 C+ reviewed

Adding IS_LOADING_APP is good idea but there is one problem with

isLoadingApp? App.openApp(): App.reconnectApp(this.props.lastUpdateIDAppliedToClient)
});

After successfully login if there is network lost and then it is not gonna able to call APP.write so we will lose data. I would suggest to add.

App.reconnectApp(this.props.lastUpdateIDAppliedToClient) });

if(!isLoadingApp) {
App.openApp():
}

@tienifr
Copy link
Contributor

tienifr commented Sep 18, 2023

@deetergp What do you think about my proposal above?

@melvin-bot melvin-bot bot added the Overdue label Sep 18, 2023
@deetergp
Copy link
Contributor

Your solution looks good @tienifr, thanks!

@melvin-bot melvin-bot bot removed the Overdue label Sep 19, 2023
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 19, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 19, 2023

📣 @tienifr 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot
Copy link

melvin-bot bot commented Sep 20, 2023

🎯 ⚡️ Woah @narefyev91 / @tienifr, great job pushing this forwards! ⚡️

The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus 🎉

  • when @tienifr got assigned: 2023-09-19 09:42:17 Z
  • when the PR got merged: 2023-09-20 07:29:09 UTC

On to the next one 🚀

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Sep 22, 2023
@melvin-bot melvin-bot bot changed the title [$500] Chat - Conversations do not load if you interrupt the Internet connection when logging in [HOLD for payment 2023-09-29] [$500] Chat - Conversations do not load if you interrupt the Internet connection when logging in Sep 22, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Sep 22, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 22, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 22, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.72-11 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 2023-09-29. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

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

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Sep 29, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 2, 2023

@deetergp, @narefyev91, @bfitzexpensify, @tienifr Whoops! This issue is 2 days overdue. Let's get this updated quick!

@deetergp
Copy link
Contributor

deetergp commented Oct 2, 2023

Are we still holding on this?

@melvin-bot melvin-bot bot removed the Overdue label Oct 2, 2023
@bfitzexpensify
Copy link
Contributor

Payment complete to @tienifr.

No payment required to @narefyev91.

Think we're now good to close this out.

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 Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

7 participants