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

Assignee- Console error displayed on adding a assignee #19462

Closed
2 of 6 tasks
kbecciv opened this issue May 23, 2023 · 31 comments
Closed
2 of 6 tasks

Assignee- Console error displayed on adding a assignee #19462

kbecciv opened this issue May 23, 2023 · 31 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Internal Requires API changes or must be handled by Expensify staff

Comments

@kbecciv
Copy link

kbecciv commented May 23, 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 #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
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 23, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 23, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 23, 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

@mallenexpensify
Copy link
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

@situchan
Copy link
Contributor

situchan commented May 24, 2023

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

@kbecciv
Copy link
Author

kbecciv commented May 26, 2023

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

@melvin-bot melvin-bot bot added the Overdue label May 26, 2023
@situchan
Copy link
Contributor

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

@melvin-bot
Copy link

melvin-bot bot commented May 26, 2023

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

@mallenexpensify
Copy link
Contributor

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

image

@melvin-bot melvin-bot bot removed the Overdue label May 26, 2023
@situchan
Copy link
Contributor

@mallenexpensify The error in your screenshot is different issue - #19203

@melvin-bot melvin-bot bot added the Overdue label May 29, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 30, 2023

@yuwenmemon, @mallenexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

@mallenexpensify
Copy link
Contributor

@melvin-bot melvin-bot bot removed the Overdue label May 31, 2023
@situchan
Copy link
Contributor

@mallenexpensify this is duplicated with #19772. We can close either one.

@sobitneupane
Copy link
Contributor

@mallenexpensify I don't think fix of the issue #19203 will fix this issue. Looks like a different issue.

@mallenexpensify mallenexpensify changed the title Assignee- Console error displayed on adding a assignee [HOLD #19772] Assignee- Console error displayed on adding a assignee Jun 1, 2023
@mallenexpensify
Copy link
Contributor

@mallenexpensify mallenexpensify added Weekly KSv2 and removed Daily KSv2 labels Jun 1, 2023
@melvin-bot melvin-bot bot added the Overdue label Jun 9, 2023
@mallenexpensify mallenexpensify removed the Weekly KSv2 label Jun 30, 2023
@mallenexpensify mallenexpensify changed the title [HOLD #19772] Assignee- Console error displayed on adding a assignee Assignee- Console error displayed on adding a assignee Jun 30, 2023
@melvin-bot melvin-bot bot added the Overdue label Jul 3, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 3, 2023

@yuwenmemon, @mallenexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot
Copy link

melvin-bot bot commented Jul 5, 2023

@yuwenmemon, @mallenexpensify Eep! 4 days overdue now. Issues have feelings too...

@mallenexpensify mallenexpensify added the Internal Requires API changes or must be handled by Expensify staff label Jul 5, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 5, 2023

Job added to Upwork: https://www.upwork.com/jobs/~019b8fec9274038ed9

@melvin-bot
Copy link

melvin-bot bot commented Jul 5, 2023

Triggered auto assignment to Contributor Plus for review of internal employee PR - @mananjadhav (Internal)

@mallenexpensify
Copy link
Contributor

mallenexpensify commented Jul 5, 2023

@mananjadhav and @yuwenmemon , do you think this can be External? I thought I was able to reproduce but I don't see a 404 error, just
image

@mananjadhav , can you reproduce?

@melvin-bot melvin-bot bot removed the Overdue label Jul 5, 2023
@mananjadhav
Copy link
Collaborator

I tried from 2-3 accounts I am unable to reproduce this. @kbecciv can you confirm if we're missing any steps? and what do we mean by correct number?

@mallenexpensify did you do anything different from the steps mentioned in the GH issue?

Screenshot 2023-07-07 at 1 49 07 AM

@melvin-bot melvin-bot bot added the Overdue label Jul 10, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 10, 2023

@mananjadhav, @yuwenmemon, @mallenexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@mallenexpensify
Copy link
Contributor

@kbecciv , can you see if you can still reproduce please? Thx

@kbecciv
Copy link
Author

kbecciv commented Jul 12, 2023

Hello @mallenexpensify Checking, update you shortly

@kbecciv
Copy link
Author

kbecciv commented Jul 12, 2023

App is crashed after create a task on build 1.3.39.5

web_crash.1.mp4

@melvin-bot melvin-bot bot added the Overdue label Jul 14, 2023
@mallenexpensify
Copy link
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.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jul 14, 2023
@mallenexpensify
Copy link
Contributor

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

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jul 17, 2023
@yuwenmemon
Copy link
Contributor

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

@melvin-bot melvin-bot bot removed the Overdue label Jul 20, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 20, 2023

@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
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Internal Requires API changes or must be handled by Expensify staff
Projects
None yet
Development

No branches or pull requests

6 participants