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
[$250] WS - App crashes when changing workspace ID to invalid ID while distance rate RHP is open #40481
Version Number: 1.4.63-0 Reproducible in staging?: y Reproducible in production?: y Issue found when executing PR:#36409 Issue reported by: Applause - Internal Team
Action Performed:
Navigate to staging.new.expensify.com
Create a workspace
Click on More features and turn on distance rates
Open Distance rates settings
Click on one distance rate to open the RHP
Click on the URL and change the workspace ID to an invalid set of strings
Expected Result:
Not found view renders
Actual Result:
App crashes
Workaround:
n/a
Platforms:
Which of our officially supported platforms is this issue occurring on?
@bfitzexpensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.
changed the title [-]WS - App crashes when changing workspace ID to invalid ID while distance rate RHP is open[/-][+][$250] WS - App crashes when changing workspace ID to invalid ID while distance rate RHP is open[/+]on Apr 19, 2024
@bfitzexpensify Hey, the payment is due here. Also, these are two separate issues. This was #42502 created to deal with a regression caused in this issue #41594
Activity
melvin-bot commentedon Apr 18, 2024
Triggered auto assignment to @bfitzexpensify (
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.kbecciv commentedon Apr 18, 2024
We think that this bug might be related to #wave-collect - Release 1
kbecciv commentedon Apr 18, 2024
@bfitzexpensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.
Nodebrute commentedon Apr 18, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
App crashes when changing workspace ID to invalid ID while distance rate RHP is open
What is the root cause of that problem?
We need to improve our usage of optional chaining in this file, as currently, many values are left undefined PolicyDistanceRateDetailsPage.tsx
What changes do you think we should make in order to solve the problem?
We should do proper optional chaining in this file.
For example (Pseudocode)
We should address and fix the issues present throughout the entirety of this file.
What alternative solutions did you explore? (Optional)
ZhenjaHorbach commentedon Apr 18, 2024
Regression from this PR #38060
Proposal
Please re-state the problem that we are trying to solve in this issue.
WS - App crashes when changing workspace ID to invalid ID while distance rate RHP is open
What is the root cause of that problem?
The problem is due to the fact that during the creation of the PR, not all cases were taken into account
https://github.com/Expensify/App/pull/38237/files#diff-7e73657dfb914a3edb6449a7b19dfe303dd7c1c21e3cfe4e8c6318c0411575e0R46-R51
As a result, we have cases when we try to get a value from
undefinedWhat changes do you think we should make in order to solve the problem?
To fix this issue we can check new components and add optional chains wherever needed
In fact, looking at the new changes, this is not the only component that needs refactoring
We have a similar situation on
PolicyDistanceRateEditPagefor exampled9e986d#diff-c4dba2a501b3bb84d9f473b51674f7bcb32b5518cd80d1ca653bc56703560d79R43-R48
What alternative solutions did you explore? (Optional)
NA
melvin-bot commentedon Apr 19, 2024
Job added to Upwork: https://www.upwork.com/jobs/~012a487426fc875ae6
[-]WS - App crashes when changing workspace ID to invalid ID while distance rate RHP is open[/-][+][$250] WS - App crashes when changing workspace ID to invalid ID while distance rate RHP is open[/+]melvin-bot commentedon Apr 19, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ishpaul777 (
External)21 remaining items
Nodebrute commentedon Apr 29, 2024
@ishpaul777 Sorry for the delay. I'm working on it, and it will be ready in a few hours.
Nodebrute commentedon Apr 30, 2024
@ishpaul777 Hey, the PR is ready for review.
AndrewGable commentedon May 20, 2024
Seems like there is one more instance of this: #41293 (comment)
Can we add this as a follow up to this issue and make a new PR with the fix? Thanks!
ishpaul777 commentedon May 22, 2024
Hey @Nodebrute, Would you be able to raise a new PR?
Nodebrute commentedon May 22, 2024
Hey @ishpaul777 do we have a regression?
ishpaul777 commentedon May 22, 2024
Sadly the issue was reintroduced by another PR
sobitneupane commentedon May 23, 2024
We addressed the issue in #42502 PR
bfitzexpensify commentedon May 30, 2024
OK, seems like if this is resolved via #42502, which is connected to #41594, then we can close this out.
Nodebrute commentedon May 30, 2024
@bfitzexpensify Hey, the payment is due here. Also, these are two separate issues. This was #42502 created to deal with a regression caused in this issue #41594
bfitzexpensify commentedon May 30, 2024
Gotcha - offers sent @Nodebrute @ishpaul777
bfitzexpensify commentedon May 31, 2024
Payments complete.