-
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-04-27] [$1000] App crashes on editing and deleting the emoji messages on #admins on Android in an Offline mode #17164
Comments
Triggered auto assignment to @alexpensify ( |
Bug0 Triage Checklist (Main S/O)
|
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This one is wild because after I enable cell/wifi service, then the edited emoji list from the offline is there. |
Triggered auto assignment to @techievivek ( |
@techievivek - Assigning to engineering to get feedback on how we want this to function before assigning |
Job added to Upwork: https://www.upwork.com/jobs/~01aafa0e43a1c87311 |
Current assignee @alexpensify is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.When we send a message in offline mode, then immediately delete it, the app crashes. What is the root cause of that problem?First, let's look at the message deletion logic in Report.js It contains a logic to check if the item being deleted is the last visible message, then it would search for previous message to update the latest message in LHN. This logic calls the Now let's look at the App/src/libs/ReportActionsUtils.js Lines 145 to 158 in bcada91
Notice the
That's why in online mode, the app always works when we try to delete messages. Now let's look at the scenario when we try to delete a message in offline mode. When we access a chat which was not preloaded in Onyx, no previous messages were loaded in Onyx, which causes the and will crash in cases where the messages are not loaded yet, like this (notice the chat is still loading) What changes do you think we should make in order to solve the problem?To solve this problem, we could add a guard logic in
Furthermore (and optionally), shall we decide for the LHN to not update the previous message if the deleted message is null, we could add another logic inside deleteReportComment() function to only update the last message if it is a valid text
This will make the LHN to keep the message, instead of deleting it and replace with the default message (i.e the first dummy welcome message). The text will be kept until it's back online again, the user access the report and it will be updated as the actual latest message. Since we are in offline mode, I think there is no proper solution to get the last message which were replaced with our new sent-and-deleted message. Alternative solutionsAlternatively, in the Another way to do it is to add a check logic in the ResultWorking well after the fix https://drive.google.com/file/d/1GGFZKVP3QjHKOSbgwYJUd_UKvXt-uOKb/view?usp=sharing |
Current assignee @techievivek is eligible for the External assigner, not assigning anyone new. |
Not overdue, waiting for @s77rt to take a look at the proposal(s). 😄 |
Sorry for the delay, will review asap. |
This comment was marked as resolved.
This comment was marked as resolved.
@tienifr Thanks for the proposal. Your RCA is correct. The suggested fix looks good to me. I just have two minor optimisations to consider while raising the PR:
🎀 👀 🎀 C+ reviewed cc @techievivek |
@s77rt Thanks for the review! For your 1st optimization, I agree we should make an early return with empty object to prevent returning For your 2nd optimization, we should keep the check for falsy message. Returning an empty object will not be enough since the isReportMessageAttachment() function, which use the falsy message, is assuming the message would have For final confirmation, the changes in the PR would be
Thoughts? |
The PR is ready for review: #17450. |
The PR is still under review but moving along. |
Regression Test ProposalBug: App crashes on message deletion in empty chat in Offline mode Proposed Test Steps:
Screencast.from.14-04-2023.15.49.46.webmDo we 👍 or 👎 |
@tienifr You no longer need to provide regression test proposals. It's a part of C+ process now. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.2-5 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-04-27. 🎊 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:
|
Regression Test Proposal
|
The regression test looks good to me. @alexpensify can we add this to testRail. Thanks |
Done! Following this SO process (https://stackoverflowteams.com/c/expensify/questions/363/364#364), I created the GH to add to testrails. |
BugZero Checklist is complete-- now waiting for the payment date to start that process. |
Looks like we are all clear here, I'll work on the payment process tomorrow. |
I saw this in another GH and want to give it a try here to ensure that the payment is correct. We have the following payouts. I see there is a 50% bonus because it was assigned here on April 17 and was merged into production on April 20: Issue reporter: $250 - @priya-zha @techievivek or @s77rt - Can you please 👍🏼 if you agree and I'll complete the next steps in Upwork. Thank you! |
@alexpensify It's actually $1,500 not $2,000. BTW, The bonus timeline is from contributor being assigned to PR getting merged (and not necessary deployed to production). So it's from April 17th to April 19th. |
@s77rt - Thank you for checking my numbers. I've updated the amounts in my comment. Also, thank you for clarifying it's not production but merging. I was looking at the merge action but said production. 🤕 I'll work on these payments in Upwork. |
Alright, all payments have been prepared in Upwork and are pending approval from the contributors. I'll finish the process as soon as everyone signs off in Upwork. Thanks! |
@tienifr - please accept the job in Upwork so I can complete the payment process, thank you. |
@alexpensify hi, I tried to accept the offer but it says the offer has been withdrawn, can you help double check? Thanks! |
@tienifr - Not sure what happened in Upwork, but I sent over a new offer. Please accept and I can complete the payment. Thanks! |
@alexpensify accepted, thanks! |
Closing because the project is done and everyone has been paid! Great work here! |
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:
Expected Result:
App should not crash on deleting the edited messages only with emojis on Android
Actual Result:
App crashes on deleting the edited messages with only emojis on Android offline
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number:
Reproducible in staging?: needs reproduction
Reproducible in production?: needs reproduction
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
crash.mp4
Expensify/Expensify Issue URL:
Issue reported by: @priya-zha
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1680859522702889
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: