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 2023-09-21] [$500] Dev: Web - Console error on request money thread #26092

Closed
1 of 6 tasks
kbecciv opened this issue Aug 28, 2023 · 41 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

Comments

@kbecciv
Copy link

kbecciv commented Aug 28, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Click on FAB icon and select request money option
  2. Enter amount and click on Next button
  3. Click on any user and request money
  4. Go to request money thread

Expected Result:

It should not show any console error

Actual Result:

Console error appears (Warning: Failed prop type: Invalid prop source supplied to Image, expected one of type [number].)

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: Dev 1.3.57.5
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

Screen.Recording.2023-08-22.at.10.11.39.AM.mov

Expensify/Expensify Issue URL:
Issue reported by: @gadhiyamanan
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1692679550499059

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01157770cac8c77081
  • Upwork Job ID: 1696964639125438464
  • Last Price Increase: 2023-08-30
  • Automatic offers:
    • shubham1206agra | Contributor | 26442047
    • gadhiyamanan | Reporter | 26442049
@kbecciv kbecciv added Daily KSv2 Needs Reproduction Reproducible steps needed Bug Something is broken. Auto assigns a BugZero manager. labels Aug 28, 2023
@namhihi237
Copy link
Contributor

Proposal

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

should not show any console error

What is the root cause of that problem?

We are passing the source prop of Image wrong here:

<Image
pointerEvents="none"
source={EmptyStateBackgroundImage}

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

source={{uri: EmptyStateBackgroundImage}}

What alternative solutions did you explore? (Optional)

N/A

@melvin-bot
Copy link

melvin-bot bot commented Aug 28, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 28, 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

@Pujan92
Copy link
Contributor

Pujan92 commented Aug 28, 2023

Proposal

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

Console error for opening a report of money request view

What is the root cause of that problem?

It persists after this PR merged where the image source is passed as a string which should be the either number or object.
https://github.com/Expensify/App/pull/22562/files#diff-53a3b5c2e20375a2d0d3a700bd76dab7791ddc968e942d510a9e06572dc0e26fR57

source: PropTypes.oneOfType([
PropTypes.number,
PropTypes.shape({
uri: PropTypes.string.isRequired,
// eslint-disable-next-line react/forbid-prop-types
headers: PropTypes.object,
}),
]).isRequired,

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

We need to pass it as an object by setting its uri property.
source={{uri: EmptyStateBackgroundImage}}

source={EmptyStateBackgroundImage}

@shubham1206agra
Copy link
Contributor

shubham1206agra commented Aug 28, 2023

Proposal

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

DEV: console error on request money thread

What is the root cause of that problem?

This is due to difference in Image Resolver for web and native devices. RNWeb also accepts string as a source

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

Add platform dependent types for source (example below, not exact)

const sourceType = Platform.select({
    web: [
        PropTypes.number,
        PropTypes.shape({
            uri: PropTypes.string.isRequired,
            // eslint-disable-next-line react/forbid-prop-types
            headers: PropTypes.object,
        }),
        PropTypes.string,
    ],
    default: [
        PropTypes.number,
        PropTypes.shape({
            uri: PropTypes.string.isRequired,
            // eslint-disable-next-line react/forbid-prop-types
            headers: PropTypes.object,
        }),
    ],
});

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added the Overdue label Aug 30, 2023
@sonialiap
Copy link
Contributor

Reproducible, triaging to external

@sonialiap sonialiap added External Added to denote the issue can be worked on by a contributor and removed Needs Reproduction Reproducible steps needed labels Aug 30, 2023
@melvin-bot melvin-bot bot removed the Overdue label Aug 30, 2023
@melvin-bot melvin-bot bot changed the title Dev: Web - Console error on request money thread [$500] Dev: Web - Console error on request money thread Aug 30, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 30, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01157770cac8c77081

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

melvin-bot bot commented Aug 30, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 30, 2023

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

@parasharrajat
Copy link
Member

parasharrajat commented Aug 31, 2023

I see. let's fix all instances of this issue in the codebase. @namhihi237's proposal looks good to me.

Note: As this issue is a quick one, the root cause was obvious. But please be sure to properly explain your root cause and solution. Always, remember you are talking to a person through comment.

@melvin-bot
Copy link

melvin-bot bot commented Aug 31, 2023

Triggered auto assignment to @thienlnam, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@shubham1206agra
Copy link
Contributor

@parasharrajat There's a slight problem with the approach approved by you.

See this in the iOS native.

Screenshot 2023-08-31 at 11 43 07 AM

Can you please re-review the proposal?

@parasharrajat
Copy link
Member

@shubham1206agra Can you explain the problem?

@shubham1206agra
Copy link
Contributor

The problem is that native and web uses different resolvers for image source resolution
On the web we see a string URL as a source but on native we see a number as source

So your selected solution will cause prop error but now on native

@shubham1206agra
Copy link
Contributor

See this
image

@parasharrajat
Copy link
Member

Thanks for pointing that out @shubham1206agra.

@shubham1206agra
Copy link
Contributor

@parasharrajat Can you review the proposal again in this case, please?

@parasharrajat
Copy link
Member

So I looked further into the problem and I think that there could be two easy solutions.

  1. We use RN's image component instead of our custom `Image.
  2. Add different types mentioned for different platforms.

1st has a drawback of caching so the second seems fine.

@shubham1206agra's proposal seems to be the first which does not cause any errors. Taking back my previous decision.

🎀 👀 🎀 C+ reviewed

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Sep 14, 2023
@melvin-bot melvin-bot bot changed the title [$500] Dev: Web - Console error on request money thread [HOLD for payment 2023-09-21] [$500] Dev: Web - Console error on request money thread Sep 14, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Sep 14, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 14, 2023

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot
Copy link

melvin-bot bot commented Sep 14, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.69-2 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-09-21. 🎊

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.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

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:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Sep 14, 2023

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:

  • [@parasharrajat] The PR that introduced the bug has been identified. Link to the PR:
  • [@parasharrajat] 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:
  • [@parasharrajat] 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:
  • [@parasharrajat] Determine if we should create a regression test for this bug.
  • [@parasharrajat] 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.
  • [@sonialiap] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@parasharrajat
Copy link
Member

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:

  • [@parasharrajat] The PR that introduced the bug has been identified. Link to the PR: Just a prop warning.
  • [@parasharrajat] 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: Just a prop warning.
  • [@parasharrajat] 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: Just a prop warning.
  • [@parasharrajat] Determine if we should create a regression test for this bug. No
  • [@parasharrajat] 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.

@sonialiap
Copy link
Contributor

@parasharrajat are we writing a regression test for this?

@sonialiap
Copy link
Contributor

sonialiap commented Sep 19, 2023

Payments

@parasharrajat review + bonus = $750 - please request in NewDot
@shubham1206agra fix + bonus = $750 - paid ✔️
@gadhiyamanan report = $250 - paid ✔️

@gadhiyamanan
Copy link
Contributor

@sonialiap offer accepted. i think reporting bonus should be $250 because it was logged before 30 Aug (before announcement)

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Sep 21, 2023
@sonialiap
Copy link
Contributor

@gadhiyamanan agreed, thanks for pointing out that Melvin miscounted. I'm correcting that to $250 for the reporting

@melvin-bot melvin-bot bot removed the Overdue label Sep 26, 2023
@sonialiap
Copy link
Contributor

@parasharrajat bump on the regression test question (are we writing one for this issue?)

@parasharrajat
Copy link
Member

@sonialiap I don't think regression tests are needed for this issue. It was just a console warning.

@melvin-bot melvin-bot bot added the Overdue label Sep 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 29, 2023

@sonialiap, @parasharrajat, @thienlnam, @shubham1206agra Whoops! This issue is 2 days overdue. Let's get this updated quick!

@thienlnam
Copy link
Contributor

Agreed - seems like we're just waiting on NewDot payout before closing this one out?

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Sep 30, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 3, 2023

@sonialiap, @parasharrajat, @thienlnam, @shubham1206agra Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@sonialiap
Copy link
Contributor

Thanks for confirming that we don't need a regression test. In that case I'm closing out the issue since we do not need to keep the issue open for payout via NewDot

@melvin-bot melvin-bot bot removed the Overdue label Oct 4, 2023
@parasharrajat
Copy link
Member

Payment requested as per #26092 (comment)

@JmillsExpensify
Copy link

$750 payment approved for @parasharrajat based on BZ summary.

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
Projects
None yet
Development

No branches or pull requests

9 participants