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

[$1000] Connect bank account - Can't clicking Almost done! offline, You appear to be offline appears immediately #19863

Closed
2 of 6 tasks
lanitochka17 opened this issue May 30, 2023 · 11 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@lanitochka17
Copy link

lanitochka17 commented May 30, 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!


Issue found when executing PR #19491

Action Performed:

  1. Open the App
  2. Login with any account
  3. Go to Settings -> Workspaces -> Open any WS( or create it) -> Start to add bank account in workspace
  4. Exit in the middle of the flow (after page 'Company Information' or 'Personal Information')
  5. Return to the flow again > Settings > Workspaces > Connect bank account
  6. Go offline
  7. Select Start Over on the page 'Almost done!'

Expected Result:

Can click on Almost done!' button

Actual Result:

Can't click "Almost done!" because "You appear to be offline" page appears immediately

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

Reproducible in staging?: Yes

Reproducible in production?: Yes

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
https://platform.applause.com/services/links/v1/external/a58be4d7fa68595db1b63c14705666451446b82047759026017b6fa5e61df927

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/~017eec9f8b3dc353a2
  • Upwork Job ID: 1664156526133538816
  • Last Price Increase: 2023-06-01
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 30, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 30, 2023

Triggered auto assignment to @kadiealexander (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented May 30, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@huzaifa-99
Copy link
Contributor

huzaifa-99 commented May 31, 2023

Proposal

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

We want to show the 'Continue account setup' if user already has data for bank account (reimbursementAccount) and goes offline.

What is the root cause of that problem?

We are fetching reimbursementAccount data every time ReimbursementAccountPage (/bank-account) gets mounted.

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

We don't have to fetch reimbursementAccount data if we already have it when the ReimbursementAccountPage gets mounted and the user is offline and we have to show the continue with setup option, so we can do something like this in componentDidMount()

// if we already have the data loaded and the user went offline then don't refresh the data
if (this.props.network.isOffline && this.state.hasACHDataBeenLoaded && this.state.shouldShowContinueSetupButton) {
    return
}

this.fetchData();

Also add it as the first code block in componentDidUpdate()

// if we already have the data loaded and the user went offline then don't refresh the data
if (this.props.network.isOffline && this.state.hasACHDataBeenLoaded && this.state.shouldShowContinueSetupButton) {
    return
}

And also check here if we are not to show the loader with this.props.network.isOffline && this.state.hasACHDataBeenLoaded && this.state.shouldShowContinueSetupButton, so something like

const shouldLoad = this.props.network.isOffline && this.state.hasACHDataBeenLoaded && this.state.shouldShowContinueSetupButton 

// Show loading indicator when page is first time being opened and props.reimbursementAccount yet to be loaded from the server
// or when data is being loaded. Don't show the loading indicator if we're offline and restarted the bank account setup process
if (!shouldLoad && (!this.state.hasACHDataBeenLoaded || isLoading) && !(this.props.network.isOffline && currentStep === CONST.BANK_ACCOUNT.STEP.BANK_ACCOUNT)) {

Since now we will be showing the Continue with setup option even when offline, i think we should also disable the button when offline in ContinueBankAccountSetup by adding the withNetwork HOC and adding props.network.isOffline to disabled prop here and here

And since we always fetchData onPress of 'Continue with setup' button so when the connection is restored the data will be fresh again

Result
Screen.Recording.2023-05-31.at.5.12.28.PM-.c.mp4

What alternative solutions did you explore? (Optional)

N/A

@kadiealexander
Copy link
Contributor

Reproduced on iOS:

RPReplay_Final1685600742.MP4

@kadiealexander kadiealexander added the External Added to denote the issue can be worked on by a contributor label Jun 1, 2023
@melvin-bot melvin-bot bot changed the title Connect bank account - Can't clicking Almost done! offline, You appear to be offline appears immediately [$1000] Connect bank account - Can't clicking Almost done! offline, You appear to be offline appears immediately Jun 1, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 1, 2023

Job added to Upwork: https://www.upwork.com/jobs/~017eec9f8b3dc353a2

@melvin-bot
Copy link

melvin-bot bot commented Jun 1, 2023

Current assignee @kadiealexander is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Jun 1, 2023

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

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

melvin-bot bot commented Jun 1, 2023

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

@melvin-bot melvin-bot bot added the Overdue label Jun 5, 2023
@bondydaa
Copy link
Contributor

bondydaa commented Jun 5, 2023

Hmm this might be related to #19491

cc @HezekielT @mananjadhav though I'm not if that PR is the cause of it. Since the screenshots seem to show the same behavior...

Though maybe this is also expected and uses Pattern D - Full Page Blocking UI? https://github.com/Expensify/App/blob/main/contributingGuides/OFFLINE_UX.md#d---full-page-blocking-ui-pattern

@melvin-bot melvin-bot bot removed the Overdue label Jun 5, 2023
@HezekielT
Copy link
Contributor

HezekielT commented Jun 5, 2023

@bondydaa I don't think #19491 PR caused this issue. In fact, this issue is a duplicate of #18990 which was opened on May 16 while my PR was merged on May 24. So, the issue was already there and #19491 didn't cause it.

Though maybe this is also expected and uses Pattern D - Full Page Blocking UI?

I don't think it is the expected behavior because the Full Page Blocking should be shown after the user clicked either on Continue with setup option or Start over option not right after the network is turned off. This issue also occurs while filling the forms on 'Company Info' , 'Personal Info' and 'Beneficial Info' steps as reported here( #18990 ) as well as on Almost done screen.

In addition to this, it occurs only on iOS as far as I know. It is not reproducible on android native by following the same steps if I'm not mistaken, so I think it should be fixed.

#19869 is also a duplicate so I think it might be a good idea to handle all three issues(#19863 , #18990 and #19869) at the same time.

@bondydaa
Copy link
Contributor

bondydaa commented Jun 5, 2023

closing in favor of #18990

@bondydaa bondydaa closed this as completed Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

6 participants