Skip to content

[$250] Task – App crashes when click on assignee in existing task #49514

Closed

Description

@IuliiaHerets

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: v9.0.39-0
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4989792
Email or phone of affected tester (no customers): applausetester+jpcategory_2@applause.expensifail.com
Issue reported by: Applause Internal Team

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Log in
  3. Open any chat
  4. Create a task without assignee
  5. Open task details and click on assignee

Expected Result:

Assignee list opens

Actual Result:

App crashes

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

2009.txt

Bug6609721_1726820372331.Assignee_crash.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021838194512143553982
  • Upwork Job ID: 1838194512143553982
  • Last Price Increase: 2024-09-23
  • Automatic offers:
    • jjcoffee | Reviewer | 104086587
    • nkdengineer | Contributor | 104086588

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 20, 2024
  2. melvin-bot commented on Sep 20, 2024

    @melvin-bot

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

  3. melvin-bot commented on Sep 20, 2024

    @melvin-bot

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

  4. github-actions commented on Sep 20, 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.
  5. huult commented on Sep 20, 2024

    @huult
    Contributor

    Proposal

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

    App crashes when click on assignee in existing task

    What is the root cause of that problem?

    Use 'report' before initialization

    if (report && !ReportUtils.isTaskReport(report)) {

    Screenshot 2024-09-20 at 16 00 15

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

    Delay using the report until the report is complete.

    // .src/pages/tasks/TaskAssigneeSelectorModal.tsx#L127
        const report: OnyxEntry<Report> = useMemo(() => {
            if (!route.params?.reportID) {
                return;
            }
    
    +        InteractionManager.runAfterInteractions(() => {
    +            requestAnimationFrame(() => {
                    if (report && !ReportUtils.isTaskReport(report)) {
                        Navigation.isNavigationReady().then(() => {
                            Navigation.dismissModal(report.reportID);
                        });
                    }
    +            });
    +        });
    
            return reports?.[`${ONYXKEYS.COLLECTION.REPORT}${route.params?.reportID}`];
        }, [reports, route]);
    Details POC
    Screen.Recording.2024-09-20.at.16.04.35.mp4
  6. nkdengineer commented on Sep 20, 2024

    @nkdengineer
    Contributor

    Proposal

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

    App crashes

    What is the root cause of that problem?

    The report is used before it's initialize

    const report: OnyxEntry<Report> = useMemo(() => {
    if (!route.params?.reportID) {
    return;
    }
    if (report && !ReportUtils.isTaskReport(report)) {
    Navigation.isNavigationReady().then(() => {
    Navigation.dismissModal(report.reportID);

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

    Update this to get the report data from reports to check it's task report or not

    const report: OnyxEntry<Report> = useMemo(() => {
        if (!route.params?.reportID) {
            return;
        }
        const reportOnyx = reports?.[`${ONYXKEYS.COLLECTION.REPORT}${route.params?.reportID}`];
        if (reportOnyx && !ReportUtils.isTaskReport(reportOnyx)) {
            Navigation.isNavigationReady().then(() => {
                Navigation.dismissModal(reportOnyx.reportID);
            });
        }
        return reports?.[`${ONYXKEYS.COLLECTION.REPORT}${route.params?.reportID}`];
    }, [reports, route]);
    

    What alternative solutions did you explore? (Optional)

    Or we can move the navigate logic to another useEffect

    const report: OnyxEntry<Report> = useMemo(() => {
        if (!route.params?.reportID) {
            return;
        }
        return reports?.[`${ONYXKEYS.COLLECTION.REPORT}${route.params?.reportID}`];
    }, [reports, route]);
    
    useEffect(() => {
        if (report && !ReportUtils.isTaskReport(report)) {
            Navigation.isNavigationReady().then(() => {
                Navigation.dismissModal(report.reportID);
            });
        }
    }, [report]);
    
  7. flodnv commented on Sep 20, 2024

    @flodnv
    Contributor

    Why did this just start happening upon this deploy? What PR caused this?

  8. nkdengineer commented on Sep 20, 2024

    @nkdengineer
    Contributor

    @flodnv Maybe it is caused by #48325. I tried to revert to the latest commit in production and install node-module again and the bug didn't happen. The bug started happening when I reverted to the first different between production and staging and re-install node-module again.

    Screenshot 2024-09-20 at 17 57 53 Screenshot 2024-09-20 at 17 58 13
  9. 30 remaining items

  10. alexpensify commented on Oct 2, 2024

    @alexpensify
    Contributor

    Ugh, automation failed and the payment date should have been yesterday. I'll work on the payment process tomorrow.

  11. jjcoffee commented on Oct 3, 2024

    @jjcoffee
    Contributor
    • The PR that introduced the bug has been identified. Link to the PR: I wasn't able to identify an offending PR
    • 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: N/A
    • 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: N/A
    • Determine if we should create a regression test for this bug. Yes - if one doesn't already exist
    • 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.

    Regression Test Proposal

    1. Open any chat
    2. Create a task without an assignee
    3. Open task details and click on assignee
    4. Verify that the assignee page appears

    Do we agree 👍 or 👎

  12. luacmartins commented on Oct 3, 2024

    @luacmartins
    Contributor

    I think this will be caught during regular regression tests, since we have many tests on tasks.

  13. alexpensify commented on Oct 4, 2024

    @alexpensify
    Contributor

    Payouts due: 10-01-2024

    Upwork job is here.

  14. alexpensify commented on Oct 4, 2024

    @alexpensify
    Contributor

    Closing - I believe that I sent the payment via Upwork, but something looks off in Upwork. Please reply if you didn't get the payment and I'll fund the new job I sent your way. I'll return later to complete the regression test.

  15. jjcoffee commented on Oct 7, 2024

    @jjcoffee
    Contributor

    @alexpensify I didn't receive any payment, just the notification that the contract has ended and weirdly another about accepting an offer (I've accepted this).

  16. nkdengineer commented on Oct 7, 2024

    @nkdengineer
    Contributor

    @alexpensify Same for me, the job just closed without payment. I accepted the new 2nd offer though, it can be paid out there.

  17. alexpensify commented on Oct 7, 2024

    @alexpensify
    Contributor

    Thanks for these updates! There is an issue an Upwork that is being investigated to address the payment process. I'm going to hold until there is a fix. Convo: https://expensify.slack.com/archives/C01GTK53T8Q/p1728319262830679

  18. alexpensify commented on Oct 8, 2024

    @alexpensify
    Contributor

    @jjcoffee and @nkdengineer, our team figured out the Upwork bug, and I tried to complete the payment via another payment path in Upwork. Their support team is working on a permanent fix for the bug. I'd really appreciate it if you could confirm today's payment sent successfully under the new contract. Thanks!

  19. nkdengineer commented on Oct 9, 2024

    @nkdengineer
    Contributor

    @alexpensify Yes it was sent for me 💯 Thanks!

  20. jjcoffee commented on Oct 9, 2024

    @jjcoffee
    Contributor

    Me too, thank you!

  21. alexpensify commented on Oct 9, 2024

    @alexpensify
    Contributor

    Awesome, thanks for hanging in there with me. This bug is a wild one on the Upwork side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.EngineeringExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions