-
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 2024-11-07] [$250] Expense - Console error (app crashes on native) when copying system message to clipboard #51127
Comments
Triggered auto assignment to @puneetlath ( |
@puneetlath FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors |
Edited by proposal-police: This proposal was edited at 2024-10-21 01:56:47 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Expense - Console error (app crashes on native) when copying system message to clipboard What is the root cause of that problem?When we click the copy clipboard button, we invoke the onPress function
The error comes from this if condition, we check whether the reportAction is from OD App/src/pages/home/report/ContextMenu/ContextMenuActions.tsx Lines 450 to 452 in 66cf824
The error come because the reportAction value is null while we're not using ? before the dot . App/src/libs/ReportActionsUtils.ts Line 1255 in 66cf824
The reportAction value null because we pass invalid reportID App/src/pages/home/report/ReportActionItem.tsx Lines 335 to 350 in 66cf824
We pass the current report id instead of using the reportID property from the reportAction i.e action.reportID because if we use the current report id the report action does not exist inside the current report id
What changes do you think we should make in order to solve the problem?First we need to fix the reportAction value is null, we need to pass App/src/pages/home/report/ReportActionsListItemRenderer.tsx Lines 84 to 89 in 66cf824
So it will be: // ReportActionsListItemRenderer.tsx
const action: ReportAction = useMemo(
() =>
({
reportID: reportAction.reportID,
reportActionID: reportAction.reportActionID,
message: reportAction.message,
pendingAction: reportAction.pendingAction,
...
}),
[reportAction.reportID, ...]
// ReportActionItem.tsx
ReportActionContextMenu.showContextMenu(
CONST.CONTEXT_MENU_TYPES.REPORT_ACTION,
event,
selection,
popoverAnchorRef.current,
action.reportID, And we can also add App/src/libs/ReportActionsUtils.ts Line 1255 in 66cf824
ResultScreen.Recording.2024-10-19.at.22.11.59.movWhat alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.Can't copy to clipboard a money request update system message. What is the root cause of that problem?This only happens in a one-expense report. The issue is that the reportAction here is undefined. App/src/pages/home/report/ContextMenu/BaseReportActionContextMenu.tsx Lines 128 to 133 in 66cf824
When we update a money request, the update system message action is added to the transaction thread. However, we get the list of actions in the expense report. App/src/pages/home/report/ContextMenu/BaseReportActionContextMenu.tsx Lines 121 to 123 in 66cf824
Previously, we get the report actions of What changes do you think we should make in order to solve the problem?We need to use the originalReportID prop instead of reportID. App/src/pages/home/report/ContextMenu/BaseReportActionContextMenu.tsx Lines 121 to 124 in 66cf824
We have an
|
@puneetlath Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Job added to Upwork: https://www.upwork.com/jobs/~021848817438340679533 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia ( |
@thesahindia we have some existing proposals here. |
I will review it in the morning. |
Is this still reproducible? I couldn't repro it. |
@thesahindia The issue is still reproducible with the latest main Screen.Recording.2024-10-22.at.21.24.44.movSteps to reproduce:
|
Proposal Updated
Actually I've the correct one mentioned in my proposal inside the useMemo dependencies array |
Thanks! I was able to repro it. |
@bernhardoj's proposal looks good to me! 🎀 👀 🎀 C+ reviewed |
Current assignee @puneetlath is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
PR is ready cc: @thesahindia |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.55-10 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 2024-11-07. 🎊 For reference, here are some details about the assignees on this issue:
|
@thesahindia @puneetlath The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button] |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.0.51-0
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers): applausetester+kh081006@applause.expensifail.com
Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
The content will be copied successfully.
Actual Result:
The content is not copied. Console error shows up.
On native app, app crashes.
Workaround:
Unknown
Platforms:
Screenshots/Videos
1910_1.txt
Bug6639462_1729326163995.20241019_161930.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @puneetlathThe text was updated successfully, but these errors were encountered: