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

Dev: Clicking on user detail page throws the 2 console error #23208

Closed
2 of 6 tasks
kavimuru opened this issue Jul 19, 2023 · 8 comments
Closed
2 of 6 tasks

Dev: Clicking on user detail page throws the 2 console error #23208

kavimuru opened this issue Jul 19, 2023 · 8 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Needs Reproduction Reproducible steps needed

Comments

@kavimuru
Copy link

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. Login to ND
  2. Navigate to any conversation
  3. Press on any receiver name to open their user detail page
  4. Notice on console we are getting 2 errors

Expected Result:

no console error should appear

Actual Result:

console error appears

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

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
Reproducible in staging?: dev
Reproducible in production?: dev
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
Screenshot 2023-07-18 at 7 11 54 AM
Screenshot 2023-07-18 at 7 11 41 AM

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

View all open jobs on GitHub

@kavimuru kavimuru added Daily KSv2 Needs Reproduction Reproducible steps needed Bug Something is broken. Auto assigns a BugZero manager. labels Jul 19, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 19, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 19, 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

@tienifr
Copy link
Contributor

tienifr commented Jul 20, 2023

Proposal

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

Dev: Clicking on user detail page throws the 2 console error

What is the root cause of that problem?

In

https://github.com/Expensify/react-native-onyx/blob/a33f6046e5bbd8ee4ec01a9d7c0660565332d861/lib/withOnyx.js#L188

and

forwardedRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({current: PropTypes.instanceOf(React.Component)})]),

the forwardedRef.current must have the instance of React.Component

But in FloatingActionButtonAndPopover.js we're using useImperativeHandle and return function hideCreateMenu

That why forwardedRef.current of withOnyx and withNavigation is an object, not the instance of React.Component

Screenshot 2023-07-20 at 15 59 37

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

In
https://github.com/Expensify/react-native-onyx/blob/a33f6046e5bbd8ee4ec01a9d7c0660565332d861/lib/withOnyx.js#L188

and

forwardedRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({current: PropTypes.instanceOf(React.Component)})]),

forwardedRef should be changed like the following comment

#20187 (comment)

        forwardedRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({current: PropTypes.any})]),

@MitchExpensify
Copy link
Contributor

What exactly are you clicking when you say "Press on any receiver name"? I'm unable to reproduce this so far

@dhairyasenjaliya
Copy link
Contributor

@MitchExpensify its an console error this can be views on Dev

@Santhosh-Sellavel
Copy link
Collaborator

@MitchExpensify this is a dupe of #23201

@dhairyasenjaliya
Copy link
Contributor

yeah same RCA this should be closed maybe @tienifr can post their proposal there

@MitchExpensify
Copy link
Contributor

Ah cool, typically I try to reproduce before scouring for dupes! Thanks for the assist @Santhosh-Sellavel & @dhairyasenjaliya 🙇

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 Needs Reproduction Reproducible steps needed
Projects
None yet
Development

No branches or pull requests

5 participants