-
Notifications
You must be signed in to change notification settings - Fork 3k
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-06-08] [$1000] Italic [Attachment] message is considered as attachment and app crashes on click of download for that message #17289
Comments
Triggered auto assignment to @lschurr ( |
Bug0 Triage Checklist (Main S/O)
|
I'm not able to reproduce this. I only have the "copy to clipboard" or "mark as unread" option when long holding on the message. Will add Eng for more eyes. |
Triggered auto assignment to @dangrous ( |
Oop yep @lschurr did you make the EDIT: And by "made it work" I mean the bug did indeed show up. |
Ah, I'll change the repro steps. Do you think this should be external or internal @dangrous? |
I think External should be fine! |
Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue. cc @thienlnam |
Current assignee @lschurr is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.In this issue, we can notice that if the user sends a message What is the root cause of that problem?To check if the App/src/pages/home/report/ContextMenu/ContextMenuActions.js Lines 92 to 95 in eabb983
Now, there are 2 phases to this issue:
What changes do you think we should make in order to solve the problem?To fix this issue, we will need to improve our conditional verification. In addition to the above mentioned 2 conditions, we should also check if the HTML contains a Thus, we will have to add this condition and this in conjugation with the backend changes will fix this issue. What alternative solutions did you explore? (Optional)With the new updates, we can get rid of the |
Current assignee @dangrous is eligible for the External assigner, not assigning anyone new. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Send a italic [Attachment] message
It's considered as an attachment and can be downloaded, which is incorrect. What is the root cause of that problem?The italic [Attachment] message
is saved as {
"html": "<em>[Attachment]</em>",
"text": "[Attachment]"
} See below page inspection picture We check if a report action is an attachment here App/src/pages/home/report/ContextMenu/ContextMenuActions.js Lines 92 to 94 in 8adee6b
If property From the inspection picture above, the property We can also dig why the App crash is not caught by the error boundary page if we click download from native App.
From the error stack, we found that the error occurred in the event handler which is asynchronous and can't be caught by error boundary without tricks. The error boundary only catches errors during rendering, see more. What changes do you think we should make in order to solve the problem?To fix this issue, a backend fix will be needed to set right value to property App/src/libs/isReportMessageAttachment.js Lines 10 to 12 in 8adee6b
The second condition
Those comments' html are not equal to Searching usage of method App/src/pages/home/report/ContextMenu/ContextMenuActions.js Lines 141 to 143 in 8adee6b
We can have a more robust export default function isReportMessageAttachment({text, html}) {
const regex = new RegExp(` ${CONST.ATTACHMENT_SOURCE_ATTRIBUTE}="(.+?)"`, 'i');
return text === CONST.ATTACHMENT_MESSAGE_TEXT && html.match(regex);
} We can also check App/src/pages/home/report/ContextMenu/ContextMenuActions.js Lines 92 to 94 in 8adee6b
to const isAttachment = lodashGet(reportAction, 'isAttachment', false) && ReportUtils.isReportMessageAttachment(message); Below are test cases to verify the solution
What alternative solutions did you explore? (Optional)N/A |
This comment was marked as outdated.
This comment was marked as outdated.
Job added to Upwork: https://www.upwork.com/jobs/~013ef972b4b00c3551 |
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
Looks like we have a few proposals already. @rushatgabhane could you review? |
we're waiting on one update but then should be good to merge! |
@dangrous I guessed if we decided to define that string as a constant, then I think we should also support localization for it, like translating it into Spanish as well. Do you agree with this? |
Umm no |
@rushatgabhane Thanks for the information! I'll save this context in the comment. |
@dangrous @rushatgabhane Please help to review PR #19618, thank you! |
merged! |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.21-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-06-08. 🎊 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.
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:
|
@dhanashree-sawant @rushatgabhane @eh2077 - Could you apply for the job in Upwork? |
@lschurr But I have already applied this job https://www.upwork.com/jobs/~018d53d5272968557e and got hired. |
Oh shoot, you're right @eh2077 - got lost on the comments on this one. I will close https://www.upwork.com/jobs/~01d01935e7c40d4d46 |
Looks like we just need @rushatgabhane to apply for this one - https://www.upwork.com/jobs/~018d53d5272968557e |
Hi @lschurr, I already have a offer for the job on upwork. |
@rushatgabhane - please apply here: https://www.upwork.com/jobs/~018d53d5272968557e |
Also @rushatgabhane - do we need a regression test? |
@Prince-Mendiratta bump for? Could you please elaborate |
@lschurr no we don't need a regression test. P.S. applied to the job using dad's account - "Satish Gabhane" |
I sent the offer @rushatgabhane - go ahead and accept and we can pay and close this one out. |
Oh right - @lschurr we were going to pay @Prince-Mendiratta a bit of a bonus for helping out, I think $250 should be okay if that's alright with you? |
Cool! @Prince-Mendiratta can you apply here? https://www.upwork.com/jobs/~018d53d5272968557e |
Cool, all paid except for @rushatgabhane - once you accept the offer, we can pay and close this one. |
These are all paid. Closing. |
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:
_[Attachment]_
Expected Result:
App should not consider normal message as attachment
Actual Result:
App considers normal message as attachment
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: v1.2.98-2
Reproducible in staging?: y
Reproducible in production?: y
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
attachment.in.italic.is.considered.as.attachment.mp4
Recording.205.mp4
Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1681205583378899
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: