-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 2023-08-24] [$1000] Dev: Web - Console log on clicking IOU preview component #23645
Comments
Triggered auto assignment to @maddylewis ( |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to @deetergp ( |
heya @deetergp - since this is happening on Dev, we will need an engineer to help with the reproduction steps. thank you! |
I walked through the reproduction steps and can confirm that I am seeing that same console error. It does look as though it is something an external contributor can work on. |
Job added to Upwork: https://www.upwork.com/jobs/~01f09e3655eab4d213 |
Current assignee @maddylewis is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @situchan ( |
Proposal from upwork One possible source of the error is in the proptypes declaration in IOUPreview.js, specifically the personal details key found in lines 83-88. Only one key is declared as belonging to the object, displayName. The first thing I would do is add accountID to this declaration and test to see if this solves the problem. Whether it does or doesn't, the next move would be to find the full JSON object that is being passed and create an interface for it to ensure safety. If this theory does not pan out, my next move would be to add logs throughout function ReportActionItemSingle in ReportActionItemSingle.js, lines 73-183, and function MoneyRequestAction in MoneyRequestAction.js, lines 87-157, to determine the values that are available and set throughout, and compare these with the values expected by IOUPreview. Generally, the solution will be to identify whether the issue lies in inheritance (something goes wrong with the data en route to IOUPreview) or declaration (IOUPreview's expected props are inaccurate), and from there implementing the most efficient type safeguards. |
📣 @icarus-0520! 📣
|
Contributor details |
ProposalPlease re-state the problem that we are trying to solve in this issue.Dev: Web - Console log on clicking IOU preview component What is the root cause of that problem?This bug is easily reproducible on all the pages where we are using
and
It's the way we are checking the prototype here. In SubscriptAvatar Look how we are checking for an object we should do the same here App/src/components/SubscriptAvatar.js Line 16 in 2f750ad
What changes do you think we should make in order to solve the problem?We need to fix this globally in all the components where this issue is occurring. There are around 15 components with this error. We can remove PropTypes.objectOf
and for personal details we can change it to
We can also add isRequired in all the places where this prop is required. What alternative solutions did you explore? (Optional)Here, we have different issues. In case we decide to fix it here. The parentReportID string issue was introduced almost one day ago in this PR: #23621. It was also caught during the review of that PR: #23621 (comment). Here is a link to the related bug that I reported yesterday: https://expensify.slack.com/archives/C049HHMV9SM/p1691035111039979. We can change this to a number to fix it
like this
or
There is some inconsistency across the app where, in certain instances, we are utilizing 'personalDetails' as PropTypes, while in other cases, we are using 'personalDetailsList'. To ensure uniformity throughout the app, it's recommended that we maintain a consistent naming convention for our PropTypes. If we want, we can fix it from the root. The OpenReport API returns a number instead of a string. It will require a backend fix to return a string here. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Console log error displayed [Failed prop type: Invalid prop What is the root cause of that problem?This issue is caused by backend returning parentReportID of type Number instead of string What changes do you think we should make in order to solve the problem?we could just use toString() to convert parentReportID to string as we already do here App/src/pages/home/HeaderView.js Lines 193 to 197 in f3ece51
What alternative solutions did you explore? (Optional)First of all various values of reportID and parentReportID should be consistent in backend replies - number or string. Then we could apply changes all over the codebase to change ReportIDs to type number. |
@alexxxwork Can you trace back which API calls are returning |
Thanks @situchan , I will relogin and check. |
@Pujan92 All good after logout and login? |
@maddylewis Ah, you're back! I'll unassign myself, assign me again if you need any more help! |
Yes @conorpendergrast, not seeing the warnings now. |
Fantastic, thanks for confirming! |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.54-13 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-08-24. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
moving to daily since payment is coming up this week |
Payments
|
@situchan - will you lmk if any of this checklist needs to be reviewed? thanks! #23645 (comment) |
@maddylewis this is eligible for bonus. You didn't calculate weekend |
The PR that introduced the bug has been identified. Link to the PR: #20679 Console error is already in checklist. No need regression test |
everyone is paid |
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:
Expected Result:
There should be no console log error
Actual Result:
Console log error displayed [Failed prop type: Invalid prop
personalDetails.accountID
of typenumber
supplied toIOUPreview
, expectedobject
.]Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: Dev 1.3.45-8
Reproducible in staging?: no
Reproducible in production?: no
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
Screencast.from.2023-07-26.16-09-36.mp4
Expensify/Expensify Issue URL:
Issue reported by: @Natnael-Guchima
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1690377355421559
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: