Skip to content

Assignee- Console error displayed on adding a assignee #19462

Closed

Description

@kbecciv

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 #19335

Action Performed:

  1. Login with any Expensifail account
  2. Verify that this account has at least one contact that is an account created by phone number
  3. Go to FAB -> Assign Task -> Enter a title and description and navigate to next page
  4. Click on the "Assignee" and enter the correct phone number

Expected Result:

Verify that the account with phone number is added as assignee and no error appears

Actual Result:

404 error message displayed in console

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

Reproducible in staging?: Yes

Reproducible in production?: n/a

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/b9ed2458a443d3607bd6fcb109575bf4cd4f9708f5d0ff8936ce2070cd0d2b93

https://platform.applause.com/services/links/v1/external/500cd644c040b711df9e9026817add6933095d0b5e513790cd6eadb028ed9ad2

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/~019b8fec9274038ed9
  • Upwork Job ID: 1676739867017773056
  • Last Price Increase: 2023-07-05

Activity

  1. added
    Daily
    Bug
    on May 23, 2023
  2. melvin-bot commented on May 23, 2023

    @melvin-bot

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

  3. melvin-bot commented on May 23, 2023

    @melvin-bot

    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
  4. mallenexpensify commented on May 24, 2023

    @mallenexpensify
    Contributor

    @kbecciv do you have a phone number account I can use to test with? I'm getting an error when trying to use my google phone number "The provided phone number belongs to a landline or VoIP, please use your email address instead.
    "
    and... when using my other number I get

    Unexpected error while posting the comment, please try again later
    Report no longer exists

  5. situchan commented on May 24, 2023

    @situchan
    Contributor

    Proposal

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

    Console error shows after selecting assignee on task assignee selector page

    What is the root cause of that problem?

    This came from lack knowledge of lifecycle in functional component.
    In TaskAssigneeSelectorModal, there's search_render measurement.
    Timer should start on component mount and should end only on OptionsSelector onLayout callback or component unmount.
    In current logic, there are more cases of start/end timer: whenever props or search value are changed because of [updateOptions] dependency.

    return () => {
    Timing.end(CONST.TIMING.SEARCH_RENDER);
    Performance.markEnd(CONST.TIMING.SEARCH_RENDER);
    };
    }, [updateOptions]);

    So finally these are call orders in Timing.js:

    • end
    • start
    • end
    • start
    • getEnvironment promise return
    • getEnvironment promise return (error happens here because key is removed by this line)
    • start
    • end
    • getEnvironment promise return

    We can find out and fix similar issues across the app. (i.e. TaskShareDestinationSelectorModal)

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

    call Timing.start only on component mount, Timing.end only on component unmount or OptionsSelector onLayout callback.
    To do this, define new useEffect hook with empty array dependency:

        useEffect(() => {
            Timing.start(CONST.TIMING.SEARCH_RENDER);
            Performance.markStart(CONST.TIMING.SEARCH_RENDER);
    
            return () => {
                Timing.end(CONST.TIMING.SEARCH_RENDER);
                Performance.markEnd(CONST.TIMING.SEARCH_RENDER);
            };
        }, []);
    

    What alternative solutions did you explore? (Optional)

    Early return if key doesn't exist here

  6. kbecciv commented on May 26, 2023

    @kbecciv
    Author

    @mallenexpensify Sorry, I don't have any extra phone account for testing, only my personal.

  7. situchan commented on May 26, 2023

    @situchan
    Contributor

    @mallenexpensify this bug is not specific to phone account. Reproducible even for emails

  8. melvin-bot commented on May 26, 2023

    @melvin-bot

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

  9. mallenexpensify commented on May 26, 2023

    @mallenexpensify
    Contributor

    Confirmed bug, was only able to get an error when used a phone number though, not email.
    @yuwenmemon internal or external?

    image
  10. 36 remaining items

  11. kbecciv commented on Jul 12, 2023

    @kbecciv
    Author

    Hello @mallenexpensify Checking, update you shortly

  12. kbecciv commented on Jul 12, 2023

    @kbecciv
    Author

    App is crashed after create a task on build 1.3.39.5

    web_crash.1.mp4
  13. mallenexpensify commented on Jul 14, 2023

    @mallenexpensify
    Contributor

    I tried to reproduce and wasn't able to, it worked as expected when I used 6309177596, the one you used above @kbecciv . I ran into issues when I tried to use my personal number, I think it's because it used to be a secondary login for my main account.

  14. mallenexpensify commented on Jul 17, 2023

    @mallenexpensify
    Contributor

    Checking on what the current process is for issues that can't be reproduced https://stackoverflowteams.com/c/expensify/questions/16989

  15. yuwenmemon commented on Jul 20, 2023

    @yuwenmemon
    Contributor

    I can't reproduce either - I'm just going to close this out.

  16. melvin-bot commented on Jul 20, 2023

    @melvin-bot

    @yuwenmemon @mallenexpensify Be sure to fill out the Contact List!

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

Metadata

Metadata

Labels

BugDailyEngineeringInternal

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions