You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2023-09-08] Web - App Crashes when reloading after editing the Merchant #26181
Clear the field and click on Save
Notice 'removed the merchant (previously "Request")' message appears
Refresh the page
Expected Result:
The app does not crash
Actual Result:
App crashes
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: 1.3.58.0 Reproducible in staging?: y Reproducible in production?: n 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
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
Please re-state the problem that we are trying to solve in this issue.
Not validating the merchant field to be required(not reproducing crash on the dev env)
What is the root cause of that problem?
We don't have any validation to restrict empty value for the merchant.
Reason for a crash: When we refresh the money request report we receive incorrect structure by ReconnectApi call for reportActions which leads to the transaction undefined and accessing fields of undefined crashes the app.
Same needs to be done for MoneyRequestMerchantPage component by using the field name moneyRequestMerchant.
Provide the default value in the lodashGet pendingFields.fieldname for pendingAction prop which we are passing to OfflineWithFeedback in the MoneyRequestView component. 1, 2, 3, 4
@MariaHCD I couldn't reproduce it locally, I managed to reproduce it on staging so it's hard for me to tell for now what the exact RC is. I think that if we don't want to change the merchant to the empty string, the solution @Pujan92 proposes should work here
I am able to reproduce the crash locally also due to incorrect orders bcoz whenever we refresh the money request report we won't get pendingFields in the api onyx response which causes the issue(accessing undefined of pendingFields).
Reason for a crash might be: Conditions are in the wrong order for all the fields here. First, we need to check for pendingAction availability in the transaction and then check for specific child fields.
Do you mean we first need to check for pendingFields in the transaction before trying to fetch any child fields?
Sorry, I made a mistake in thinking. We need to provide a default value for specific pendingFields considering the above reason bcoz we need to greyed out in any condition. I will update my proposal.
changed the title [-]Web - App Crashes when reloading after editing the Merchant[/-][+][HOLD for payment 2023-09-08] Web - App Crashes when reloading after editing the Merchant[/+]on Sep 1, 2023
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.61-3 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-09-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.
External issue reporter
Contributor that fixed the issue
Contributor+ that helped on the issue and/or PR
For reference, here are some details about the assignees on this 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:
[@MariaHCD] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: NA, this was a backend regression
[@MariaHCD] Determine if we should create a regression test for this bug. NA - any errors in the format of Onyx data will be caught with regular regression testing
[@MariaHCD] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again. NA
[@trjExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
Activity
OSBotify commentedon Aug 29, 2023
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open
StagingDeployCashdeploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:melvin-bot commentedon Aug 29, 2023
Triggered auto assignment to @MariaHCD (
Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.mountiny commentedon Aug 29, 2023
Merchant cannot be empty thats backend restriction, we probably need to add a validation here
Pujan92 commentedon Aug 29, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Not validating the merchant field to be required(not reproducing crash on the dev env)
What is the root cause of that problem?
We don't have any validation to restrict empty value for the merchant.
Reason for a crash: When we refresh the money request report we receive incorrect structure by ReconnectApi call for
reportActionswhich leads to the transaction undefined and accessing fields of undefined crashes the app.App/src/components/ReportActionItem/MoneyRequestView.js
Line 113 in 3f9f1e6
What changes do you think we should make in order to solve the problem?
Add
validatefunction and pass it to the theFormby setting themerchantas a required field.App/src/pages/EditRequestMerchantPage.js
Lines 43 to 45 in 3f9f1e6
App/src/pages/iou/MoneyRequestMerchantPage.js
Lines 121 to 123 in 3f9f1e6
Same needs to be done for
MoneyRequestMerchantPagecomponent by using the field namemoneyRequestMerchant.Provide the default value in the lodashGet
pendingFields.fieldnameforpendingActionprop which we are passing toOfflineWithFeedbackin theMoneyRequestViewcomponent. 1, 2, 3, 4MariaHCD commentedon Aug 29, 2023
cc: @koko57 Please let us know what you find, thanks!
melvin-bot commentedon Aug 29, 2023
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
koko57 commentedon Aug 29, 2023
@MariaHCD I couldn't reproduce it locally, I managed to reproduce it on staging so it's hard for me to tell for now what the exact RC is. I think that if we don't want to change the merchant to the empty string, the solution @Pujan92 proposes should work here
Pujan92 commentedon Aug 29, 2023
I am able to reproduce the crash locally also due to incorrect orders bcoz whenever we refresh the money request report we won't get
pendingFieldsin the api onyx response which causes the issue(accessing undefined of pendingFields).MariaHCD commentedon Aug 29, 2023
That makes sense, thanks @Pujan92.
One thing about your proposal:
Do you mean we first need to check for
pendingFieldsin thetransactionbefore trying to fetch any child fields?Pujan92 commentedon Aug 29, 2023
Yes @MariaHCDSorry, I made a mistake in thinking. We need to provide a default value for specific pendingFields considering the above reason bcoz we need to greyed out in any condition. I will update my proposal.
MariaHCD commentedon Aug 29, 2023
Okay, I was finally able to reproduce the issue on staging and saw the console error:
Screen.Recording.2023-08-29.at.5.13.25.PM.mov
38 remaining items
mountiny commentedon Aug 31, 2023
Created a PR which will not allow empty merchants
trjExpensify commentedon Aug 31, 2023
Cool, so confirming after that PR is merged we'll pay the reporting bonus of $250 for this issue only?
mountiny commentedon Aug 31, 2023
@trjExpensify I think we can already pay out the reporting bonus $250, the crash is fixed now
trjExpensify commentedon Sep 1, 2023
Okay, perfect. @daveSeife I've sent you an offer.
daveSeife commentedon Sep 1, 2023
@trjExpensify Accepted the offer. Thank You!
trjExpensify commentedon Sep 1, 2023
Perfect, paid!
[-]Web - App Crashes when reloading after editing the Merchant[/-][+][HOLD for payment 2023-09-08] Web - App Crashes when reloading after editing the Merchant[/+]melvin-bot commentedon Sep 1, 2023
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Sep 1, 2023
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.61-3 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-09-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.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
melvin-bot commentedon Sep 1, 2023
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: