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
[Due for payment 2025-10-13] [$250] App crashes when trying remove data in the DateTime fields #71345
Version Number: 9.2.18-5 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail:#70629 Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team Device used: iPhone 15 iOS 18.5 App Component: Other
Action Performed:
Sign on to ND
Go to account > troubleshoot and turn on debug mode
Create new, empty workspace
Add a new report with one expense
Add a second report with one expense - it has to have same amount, merchant and category in order to become a potential duplicate with the previous one
Navigate to the Inbox and press View button to open DebugReportPage
Scroll down to the DateTime fields
Open one of the Daytime field, verify the cursor is at the end of the Time
Try to change the data by tapping "<" button on the opened keyboard
Expected Result:
When tapping "<" button, the last number changes to 0
changed the title [-]App crashes when trying remove data in the DateTime fields[/-][+][$250] App crashes when trying remove data in the DateTime fields[/+]on Sep 26, 2025
This causes the .repeat(...) function throws an error because it only accepts positive numbers
The error
The values of normalizedFrom and normalizedTo are determined by the selectionMillisecond state variable, which is first passed to clearSelectedValue(...)
The root cause appears to be that selectionMillisecond is initialized with an incorrect range. Specifically, when showFullFormat is true, it incorrectly sets both start and end to 6, which results in an invalid range and ultimately causes the negative value used in .repeat(...).
Unfortunately, I can't confirm that this is the exact cause of the crash in the Hybrid app, as I don't have access to its repo. In the Standalone ND app, the error is simply logged to the console. While that button doesn't work, the app itself remains functional and continues to work.
What changes do you think we should make in order to solve the problem?
We need to update this line to set the correct number of digits the milliseconds input has:
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Add a test for the TimePicker component that simulates pressing the < button and verifies that no uncaught error is thrown, and confirms that the value is correctly removed.
changed the title [-][$250] App crashes when trying remove data in the DateTime fields[/-][+][Due for payment 2025-10-13] [$250] App crashes when trying remove data in the DateTime fields[/+]on Oct 6, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.23-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@jjcoffee@RachCHopkins The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: N/A
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Activity
melvin-bot commentedon Sep 25, 2025
Triggered auto assignment to @RachCHopkins (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.[-]App crashes when trying remove data in the DateTime fields[/-][+][$250] App crashes when trying remove data in the DateTime fields[/+]melvin-bot commentedon Sep 26, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021971607717983899704
melvin-bot commentedon Sep 26, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee (
External)andriivitiv commentedon Sep 26, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-09-26 18:18:41 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
App crashes when trying remove data in the DateTime fields
What is the root cause of that problem?
We subtract
normalizedFromfromnormalizedTo, which results in a negative value:App/src/components/TimePicker/TimePicker.tsx
Lines 86 to 89 in 0d694ca
This causes the
.repeat(...)function throws an error because it only accepts positive numbersThe error
The values of
normalizedFromandnormalizedToare determined by theselectionMillisecondstate variable, which is first passed toclearSelectedValue(...)App/src/components/TimePicker/TimePicker.tsx
Line 602 in 02b47d6
and then to
replaceRangeWithZeros(...)App/src/components/TimePicker/TimePicker.tsx
Lines 115 to 116 in 02b47d6
The root cause appears to be that
selectionMillisecondis initialized with an incorrect range. Specifically, whenshowFullFormatis true, it incorrectly sets both start and end to 6, which results in an invalid range and ultimately causes the negative value used in.repeat(...).Unfortunately, I can't confirm that this is the exact cause of the crash in the Hybrid app, as I don't have access to its repo. In the Standalone ND app, the error is simply logged to the console. While that button doesn't work, the app itself remains functional and continues to work.
What changes do you think we should make in order to solve the problem?
We need to update this line to set the correct number of digits the milliseconds input has:
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Add a test for the
TimePickercomponent that simulates pressing the<button and verifies that no uncaught error is thrown, and confirms that the value is correctly removed.dangrous commentedon Sep 26, 2025
Happy to shepherd this internally when ready!
melvin-bot commentedon Sep 29, 2025
@jjcoffee Whoops! This issue is 2 days overdue. Let's get this updated quick!
10 remaining items
[-][$250] App crashes when trying remove data in the DateTime fields[/-][+][Due for payment 2025-10-13] [$250] App crashes when trying remove data in the DateTime fields[/+]melvin-bot commentedon Oct 6, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Oct 6, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.23-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
<(backspace) button in time picker #71702If no regressions arise, payment will be issued on 2025-10-13. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Oct 6, 2025
@jjcoffee @RachCHopkins The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
jjcoffee commentedon Oct 10, 2025
BugZero Checklist:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: https://github.com/Expensify/App/pull/45481/files#r2420679708
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: N/A
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue: https://github.com/Expensify/Expensify/issues/556949
Regression Test Proposal
Test:
Do we agree 👍 or 👎
RachCHopkins commentedon Oct 14, 2025
Payment Summary:
Upwork job here
RachCHopkins commentedon Oct 14, 2025
Contributor has been paid, the contract has been completed, and the Upwork post has been closed.
🟢 to @jjcoffee to request payment in NewDot.
JmillsExpensify commentedon Oct 14, 2025
$250 approved for @jjcoffee