-
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
[$500] [HOLD for payment 2023-10-02] [HOLD for payment 2023-09-29] RM - App crashed when tap replace receipt #27903
Comments
Triggered auto assignment to @laurenreidexpensify ( |
Bug0 Triage Checklist (Main S/O)
|
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open
|
Auto-assign attempt failed, all eligible assignees are OOO. |
ProposalPlease re-state the problem that we are trying to solve in this issue.The app crashes when attempting to replace a receipt. What is the root cause of that problem?When the Replace Receipt option is selected, the app navigates to the EditRequestReceiptPage component which contains a
This hook is designed to throw an error if the component using it is not embedded within a tab. Since the App/patches/@react-navigation+material-top-tabs+6.6.3.patch Lines 35 to 41 in 832a12b
What changes do you think we should make in order to solve the problem?Add a way to check if the component is within a tab and then update the implementation accordingly. This can be achieved with the following steps in either solution. Solution 1
-const pageIndex = lodashGet(route, 'params.pageIndex', 1);
+const pageIndex = lodashGet(route, 'params.pageIndex', -1);
+const tabPositionAnimation = cameraTabIndex > -1 ? useTabAnimation() : null;
useEffect(() => {
+ if (!tabPositionAnimation) {
+ return;
+ }
const listenerId = tabPositionAnimation.addListener(({value}) => {
// Activate camera as soon the index is animating towards the `cameraTabIndex`
setIsCameraActive(value > cameraTabIndex - 1 && value < cameraTabIndex + 1);
});
return () => {
tabPositionAnimation.removeListener(listenerId);
};
}, [cameraTabIndex, tabPositionAnimation]); Solution 2
<NavigationAwareCamera
ref={camera}
...
+ isTab={isTab}
/>
<TopTab.Screen
name={CONST.TAB.SCAN}
component={ReceiptSelector}
- initialParams={{reportID, iouType, pageIndex: 1}}
+ initialParams={{reportID, iouType, pageIndex: 1, isTab: 1}}
/>
+const tabPositionAnimation = isTab ? useTabAnimation() : null;
useEffect(() => {
+ if (!tabPositionAnimation) {
+ return;
+ }
const listenerId = tabPositionAnimation.addListener(({value}) => {
// Activate camera as soon the index is animating towards the `cameraTabIndex`
setIsCameraActive(value > cameraTabIndex - 1 && value < cameraTabIndex + 1);
});
return () => {
tabPositionAnimation.removeListener(listenerId);
};
}, [cameraTabIndex, tabPositionAnimation]); What alternative solutions did you explore? (Optional)None. |
Triggered auto assignment to @Li357 ( |
@akinwale I agree with the RCA here but is there a more elegant way to do this? This might not work, but could have a param on the |
@Li357 Two options I can think of:
|
Proposal |
Going to handle this with Proposal 1 |
@laurenreidexpensify Please assign me to the issue as reviewer. Thanks. |
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.73-1 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-10-02. 🎊 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:
|
@laurenreidexpensify Please assign me to the issue as reviewer. Thanks. |
@Li357, @laurenreidexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Also assigning @akinwale for a discretionary bonus here, as we used their solution. |
Payment Summary: External issue reporter - Applause, N/A |
There isn't an Upwork job created for this issue. |
Job added to Upwork: https://www.upwork.com/jobs/~016d18ed8dd8d228a2 |
Current assignees @akinwale and @parasharrajat are eligible for the External assigner, not assigning anyone new. |
@akinwale apols, Upwork job live now! Please apply and I will adjust payment to $125 when when we pay out the job. Thanks! |
@laurenreidexpensify Applied. Thanks! |
Note: I don't think we used any of the existing proposals. Initially, we thought of using existing proposals then it as changed after my suggestion #27974 (comment). Thus the final solution does not use any proposals. |
Payment requested as per #27903 (comment) |
$500 payment approved for @parasharrajat based on BZ summary. |
Thanks for confirmation @parasharrajat in that case @akinwale as we didn't use your proposals in end, there won't be a discretionary bonus after all. thanks all. |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Issue found when executing PR #26508
Action Performed:
Camera should be open again to replace the receipt image.
Expected Result:
App crashed when tap replace receipt
Issue occurred on Android App as well
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.72-6
Reproducible in staging?: Yes
Reproducible in production?: No
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
Bug6208089_receipt_crash.mp4
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: