Skip to content

[HOLD for payment 2023-09-21] [$500] Dev: Web - Console error on request money thread #26092

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!


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

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Aug 28, 2023
  2. namhihi237 commented on Aug 28, 2023

    @namhihi237
    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

  3. melvin-bot commented on Aug 28, 2023

    @melvin-bot

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

  4. melvin-bot commented on Aug 28, 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
  5. Pujan92 commented on Aug 28, 2023

    @Pujan92
    Contributor

    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}

  6. shubham1206agra commented on Aug 28, 2023

    @shubham1206agra
    Contributor

    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)

  7. sonialiap commented on Aug 30, 2023

    @sonialiap
    Contributor

    Reproducible, triaging to external

  8. added
    ExternalAdded to denote the issue can be worked on by a contributor
    and removed on Aug 30, 2023
  9. changed the title [-]Dev: Web - Console error on request money thread[/-] [+][$500] Dev: Web - Console error on request money thread[/+] on Aug 30, 2023
  10. 42 remaining items

  11. sonialiap commented on Sep 26, 2023

    @sonialiap
    Contributor

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

  12. sonialiap commented on Sep 26, 2023

    @sonialiap
    Contributor

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

  13. parasharrajat commented on Sep 26, 2023

    @parasharrajat
    Member

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

  14. melvin-bot commented on Sep 29, 2023

    @melvin-bot

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

  15. thienlnam commented on Sep 30, 2023

    @thienlnam
    Contributor

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

  16. melvin-bot commented on Oct 3, 2023

    @melvin-bot

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

  17. sonialiap commented on Oct 4, 2023

    @sonialiap
    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

  18. parasharrajat commented on Oct 5, 2023

    @parasharrajat
    Member

    Payment requested as per #26092 (comment)

  19. JmillsExpensify commented on Oct 5, 2023

    @JmillsExpensify
    Contributor

    $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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions