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
[$500] [HOLD for payment 2023-10-02] [HOLD for payment 2023-09-29] RM - App crashed when tap replace receipt #27903
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor
👋 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.
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 ReceiptSelector. On native platforms, ReceiptSelector makes use of a NavigationAwareCamera which uses the useTabAnimation() hook.
This hook is designed to throw an error if the component using it is not embedded within a tab. Since the ReceiptSelector in this scenario is not within a tab, the app crashes with this error.
+ throw new Error("Couldn't find values for card animation. Are you inside a screen in Tab?");
+ }
+ return animation;
+}
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
Update the default value of the lodashGet call for the pageIndex param in ReceiptSelector.
changed the title [-][HOLD for payment 2023-10-02] [HOLD for payment 2023-09-29] RM - App crashed when tap replace receipt[/-][+][$500] [HOLD for payment 2023-10-02] [HOLD for payment 2023-09-29] RM - App crashed when tap replace receipt[/+]on Oct 5, 2023
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.
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor
Activity
melvin-bot commentedon Sep 20, 2023
Triggered auto assignment to @laurenreidexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Sep 20, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)OSBotify commentedon Sep 20, 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 Sep 20, 2023
Auto-assign attempt failed, all eligible assignees are OOO.
akinwale commentedon Sep 21, 2023
Proposal
Please 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
ReceiptSelector. On native platforms,ReceiptSelectormakes use of aNavigationAwareCamerawhich uses theuseTabAnimation()hook.App/src/pages/iou/ReceiptSelector/NavigationAwareCamera.js
Line 25 in ca48769
This hook is designed to throw an error if the component using it is not embedded within a tab. Since the
ReceiptSelectorin this scenario is not within a tab, the app crashes with this error.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
lodashGetcall for thepageIndexparam inReceiptSelector.tabPositionAnimationbased on the value ofcameraTabIndex(which is set to the value ofpageIndex).Solution 2
lodashGetfor a new param in ReceiptSelector,isTabwhich should indicate whether or not the component is in a tab.isTabparam as a prop to theNavigationAwareCameracomponent.<NavigationAwareCamera ref={camera} ... + isTab={isTab} />initialParamsfor theReceiptSelectortab in MoneyRequestSelectorPage.<TopTab.Screen name={CONST.TAB.SCAN} component={ReceiptSelector} - initialParams={{reportID, iouType, pageIndex: 1}} + initialParams={{reportID, iouType, pageIndex: 1, isTab: 1}} />isTabprop to the NavigationAwareCamera component.tabPositionAnimationbased on the value ofisTab.What alternative solutions did you explore? (Optional)
None.
34 remaining items
[-][HOLD for payment 2023-10-02] [HOLD for payment 2023-09-29] RM - App crashed when tap replace receipt[/-][+][$500] [HOLD for payment 2023-10-02] [HOLD for payment 2023-09-29] RM - App crashed when tap replace receipt[/+]melvin-bot commentedon Oct 5, 2023
Job added to Upwork: https://www.upwork.com/jobs/~016d18ed8dd8d228a2
melvin-bot commentedon Oct 5, 2023
Current assignees @akinwale and @parasharrajat are eligible for the External assigner, not assigning anyone new.
laurenreidexpensify commentedon Oct 5, 2023
@akinwale apols, Upwork job live now! Please apply and I will adjust payment to $125 when when we pay out the job. Thanks!
akinwale commentedon Oct 5, 2023
@laurenreidexpensify Applied. Thanks!
parasharrajat commentedon Oct 5, 2023
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.
@laurenreidexpensify
parasharrajat commentedon Oct 5, 2023
Payment requested as per #27903 (comment)
JmillsExpensify commentedon Oct 5, 2023
$500 payment approved for @parasharrajat based on BZ summary.
laurenreidexpensify commentedon Oct 9, 2023
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.