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-04-15] [$1000] Infinite loading on Invite members page after refresh #22508

Closed
1 of 6 tasks
kavimuru opened this issue Jul 9, 2023 · 104 comments
Closed
1 of 6 tasks
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Needs Reproduction Reproducible steps needed

Comments

@kavimuru
Copy link

kavimuru commented Jul 9, 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. Go to Settings > Workspaces
  2. Select any workspace
  3. Go to Members > Invite
  4. Refresh website

Expected Result:

Show contacts list to invite

Actual Result:

Show skeleton forever

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

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.38-2
Reproducible in staging?: y
Reproducible in production?: y
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

bug.3.mov

Snip - (1) New Expensify - Google Chrome (2)
Expensify/Expensify Issue URL:
Issue reported by: @situchan
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1688833373673129

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0160eb205488d8fcdd
  • Upwork Job ID: 1691081434892730368
  • Last Price Increase: 2023-12-26
  • Automatic offers:
    • situchan | Contributor | 0
    • bernhardoj | Contributor | 0
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 9, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 9, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 9, 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

@samh-nl
Copy link
Contributor

samh-nl commented Jul 10, 2023

Proposal

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

Refreshing when viewing the invite members page in a workspace shows it's loading permanently.

What is the root cause of that problem?

The OptionsSelector component is only allowed to show its options after a transitionEnd event has fired.

<ScreenWrapper shouldEnableMaxHeight>
{({didScreenTransitionEnd}) => {
const sections = didScreenTransitionEnd ? this.getSections() : [];

shouldShowOptions={didScreenTransitionEnd && OptionsListUtils.isPersonalDetailsReady(this.props.personalDetails)}

This event is normally fired when moving between screens, i.e. when navigating to the 'invite members page' indirectly (by clicking Workspace > Members > Invite).

However, when directly browsing to it, there is no transition happening and didScreenTransitionEnd therefore remains false. This causes the loader to remain permanently.

This issue also exists in other components where loading is blocked until didScreenTransitionEnd is set to true, including TaskAssigneeSelectorModal and TaskShareDestinationSelectorModal. In two other situations, NewChatPage and SearchPage, this also applies however the problem is masked due to a navigation to a report occurring upon load, which triggers the transitionEnd event and therefore the problem does not become visible here.

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

Option 1: Instead of setting didScreenTransitionEnd to true upon the firing of transitionEnd, we can use InteractionManager.runAfterInteractions.

Option 2: We can use InteractionManager.runAfterInteractions as a fallback mechanism, i.e. use both.

What alternative solutions did you explore? (Optional)

N/A

@tienifr
Copy link
Contributor

tienifr commented Jul 10, 2023

Proposal

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

Infinite loading on Invite members page after refresh

What is the root cause of that problem?

In

shouldShowOptions={didScreenTransitionEnd && OptionsListUtils.isPersonalDetailsReady(this.props.personalDetails)}

We just show the option if didScreenTransitionEnd is true, and didScreenTransitionEnd is updated to true when transitionEnd event is triggered.

componentDidMount() {
this.unsubscribeTransitionEnd = this.props.navigation.addListener('transitionEnd', (event) => {
// Prevent firing the prop callback when user is exiting the page.
if (lodashGet(event, 'data.closing')) {
return;
}
this.setState({didScreenTransitionEnd: true});
this.props.onEntryTransitionEnd();
});

But if we visit the page directly, the transitionEnd event is not triggered because there's no transition happens. transitionEnd event is triggered when we execute Navigation.navigate

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

transitionEnd event is triggered when we execute Navigation.navigate so I suggest creating the new variable didNavigate in Navigation.js. We will init didNavigate=false and update it to true when we execute navigate function.

let didNavigate = false;
...
function navigate(route = ROUTES.HOME, type) {
    if(!didNavigate){
        didNavigate=true;
    }
...

function shouldDisableTransitionEnd(){
    return !didNavigate
}

And in ScreenWrapper, we can early set didScreenTransitionEnd to true if didNavigate is false

    componentDidMount() {
        if(Navigation.shouldDisableTransitionEnd()){
            this.setState({didScreenTransitionEnd: true});
            this.props.onEntryTransitionEnd();
            return; 
        }

What alternative solutions did you explore? (Optional)

Another approach to fix this is part B in this solution (it's a related issue).

Result

Screen.Recording.2023-07-10.at.18.24.10.mov

@melvin-bot melvin-bot bot added the Overdue label Jul 11, 2023
@muttmuure muttmuure added the Needs Reproduction Reproducible steps needed label Jul 12, 2023
@muttmuure
Copy link
Contributor

I'm not able to reproduce this one.

@melvin-bot melvin-bot bot removed the Overdue label Jul 12, 2023
@situchan
Copy link
Contributor

This is still reproducible to everyone.
@muttmuure if you're not able to reproduce, can you please ask another BZ member internally?

@melvin-bot
Copy link

melvin-bot bot commented Jul 25, 2023

⚠️ 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.

@huzaifa-99
Copy link
Contributor

huzaifa-99 commented Jul 25, 2023

@muttmuure This is still reproducible. @kavimuru can you please confirm?

@aimane-chnaif
Copy link
Contributor

This is constantly reproducible to me

@greg-schroeder
Copy link
Contributor

Hey @muttmuure

Reopening this as it's reproducible and other bugs (such as #22850) may depend on the solution implemented here

@melvin-bot melvin-bot bot added the Overdue label Aug 14, 2023
@tienifr
Copy link
Contributor

tienifr commented Aug 14, 2023

Proposal updated to highlight an alternate solution.

@muttmuure muttmuure added the External Added to denote the issue can be worked on by a contributor label Aug 14, 2023
@melvin-bot melvin-bot bot changed the title Infinite loading on Invite members page after refresh [$1000] Infinite loading on Invite members page after refresh Aug 14, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 14, 2023

Job added to Upwork: https://www.upwork.com/jobs/~0160eb205488d8fcdd

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

melvin-bot bot commented Aug 14, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 14, 2023

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

@muttmuure
Copy link
Contributor

@Santhosh-Sellavel if you are able to take a look here that would be great

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Apr 14, 2024
@rlinoz
Copy link
Contributor

rlinoz commented Apr 15, 2024

I don't think we need a regression test for this one, what do you think @bernhardoj @situchan ?

@muttmuure
Copy link
Contributor

@bernhardoj paid, @situchan offer sent

@melvin-bot melvin-bot bot added the Overdue label Apr 19, 2024
@rlinoz
Copy link
Contributor

rlinoz commented Apr 22, 2024

Can we close this one then?

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Apr 22, 2024
@muttmuure
Copy link
Contributor

Still waiting for @situchan to accept the offer https://www.upwork.com/nx/wm/offer/101907756

@melvin-bot melvin-bot bot removed the Overdue label Apr 25, 2024
@muttmuure muttmuure added Weekly KSv2 Daily KSv2 and removed Daily KSv2 Weekly KSv2 labels Apr 25, 2024
@melvin-bot melvin-bot bot added the Overdue label Apr 29, 2024
@rlinoz
Copy link
Contributor

rlinoz commented Apr 29, 2024

@melvin-bot melvin-bot bot removed the Overdue label Apr 29, 2024
@muttmuure
Copy link
Contributor

Moving to Monthly while @situchan is out. Feel free to tag me when you're back and I'll process it

@muttmuure muttmuure added Monthly KSv2 and removed Daily KSv2 labels Apr 30, 2024
@muttmuure
Copy link
Contributor

Waiting for @situchan to accept the offer

@situchan
Copy link
Contributor

Sorry for late. Accepted

@rlinoz
Copy link
Contributor

rlinoz commented Jun 17, 2024

@muttmuure moving back to daily since @situchan is back

@melvin-bot melvin-bot bot removed the Overdue label Jun 17, 2024
@rlinoz rlinoz added Daily KSv2 and removed Monthly KSv2 labels Jun 17, 2024
@muttmuure
Copy link
Contributor

Paid up

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 External Added to denote the issue can be worked on by a contributor Needs Reproduction Reproducible steps needed
Projects
None yet
Development

No branches or pull requests