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-06-30] [$1000] App crashes on pasting the public room URL again after navigating back #20825
Create a public room
3.Send a message in the room (important step)
Copy the URL of the room and paste it in a new incognito window (without signing in)
Click on reply thread icon of the message and notice that it navigates you to the sign in window.
Now click on back button for the browser and see that a empty window page is seen. Now again paste the URL and hit enter
Result: See that the app crashes
Expected Result:
App should not crash on pasting the public room URL again after navigating back
Actual Result:
App crashes on pasting the public room URL again after navigating back
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
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.28-3 Reproducible in staging?: y Reproducible in production?: y 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
Please re-state the problem that we are trying to solve in this issue.
App crashes on pasting the public room URL again after navigating back
What is the root cause of that problem?
We're using getTopmostReportId even when the navigation is not ready, which make the state undefined.
Now the app will be crashed because the state is undefined and we are checking for state.routes.
What changes do you think we should make in order to solve the problem?
We can update the original getTopmostReportId function here with an early return
Hey there @sonialiap as discussed in slack I know this issue still has no external tag and might not become external but here is already draft PR that solves the issue, it might help you avoid additional work
What alternative solutions did you explore? (Optional)
I began trying a guard in getTopmostReportId but diving into the origin of the issue it is better to use it in the parent in case any additional method is used in updateSavedNavigationStateAndLogRoute
We can also validate with Software Mansion and check if the behavior of receiving and undefined state from the library is correct.
Looks like something related to react-navigation may have been mentioned in this issue discussion.
As a reminder, please make sure that all proposals are not workarounds and that any and all attempt to fix the issue holistically have been made before proceeding with a solution. Proposals to change our DeprecatedCustomActions.js files should not be accepted.
changed the title [-]App crashes on pasting the public room URL again after navigating back[/-][+][$1000] App crashes on pasting the public room URL again after navigating back[/+]on Jun 16, 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:
[@mollfpr] The PR that introduced the bug has been identified. Link to the PR:
[@mollfpr] 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:
[@mollfpr] 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:
[@mollfpr] Determine if we should create a regression test for this bug.
[@mollfpr] 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.
[@sonialiap] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
[@mollfpr] 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:
[@mollfpr] 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:
This is a regression for our navigation reboot, so the regression step should be enough.
[@mollfpr] Determine if we should create a regression test for this bug.
[@mollfpr] 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.
Go to staging dot on web chrome
Create a public room
Send a message in the room (important step)
Copy the URL of the room and paste it into a new incognito window (without signing in)
Click on the reply thread icon of the message and notice that it navigates you to the sign-in window.
Now click on the back button for the browser and see that an empty window page is seen. Now again, paste the URL and hit enter
Hey @sonialiap isn't urgency bonus based assignation? I was assigned on Wednesday 19 and merged by Friday 21 it took only 2 business days. I think it does apply in this case.
Activity
melvin-bot commentedon Jun 15, 2023
Triggered auto assignment to @sonialiap (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jun 15, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)hungvu193 commentedon Jun 15, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
App crashes on pasting the public room URL again after navigating back
What is the root cause of that problem?
We're using

getTopmostReportIdeven when the navigation is not ready, which make the state undefined.Now the app will be crashed because the state is undefined and we are checking for state.routes.
What changes do you think we should make in order to solve the problem?
We can update the original
getTopmostReportIdfunction here with an early returnor we can update
getTopmostReportIdinside Navigation.js to this.What alternative solutions did you explore? (Optional)
N/A
daordonez11 commentedon Jun 15, 2023
Hey there @sonialiap as discussed in slack I know this issue still has no external tag and might not become external but here is already draft PR that solves the issue, it might help you avoid additional work
daordonez11 commentedon Jun 15, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Web app crashes when user inputs again the URL after going back from sign in page
What is the root cause of that problem?
After opening the second time the React Navigation library returns an undefined state, which is sent to
updateSavedNavigationStateAndLogRouteWhat changes do you think we should make in order to solve the problem?
Instead of having guards in the children methods I recommend having the guard in the parent NavigationRoot.js:
Video of the solution working:
Mobile Browser - 14_6_2023, 14_55_36.webm
New Recording - 14_6_2023, 14_54_41.webm
What alternative solutions did you explore? (Optional)
I began trying a guard in getTopmostReportId but diving into the origin of the issue it is better to use it in the parent in case any additional method is used in updateSavedNavigationStateAndLogRoute
We can also validate with Software Mansion and check if the behavior of receiving and undefined state from the library is correct.
melvin-bot commentedon Jun 15, 2023
Looks like something related to
react-navigationmay have been mentioned in this issue discussion.As a reminder, please make sure that all proposals are not workarounds and that any and all attempt to fix the issue holistically have been made before proceeding with a solution. Proposals to change our
DeprecatedCustomActions.jsfiles should not be accepted.Feel free to drop a note in #expensify-open-source with any questions.
sonialiap commentedon Jun 16, 2023
Reproducible. Moving to external
Thanks @daordonez11, I'm going to let the C+ review the proposals 👍
[-]App crashes on pasting the public room URL again after navigating back[/-][+][$1000] App crashes on pasting the public room URL again after navigating back[/+]melvin-bot commentedon Jun 16, 2023
Job added to Upwork: https://www.upwork.com/jobs/~0127842e1a6b2e7f94
melvin-bot commentedon Jun 16, 2023
Current assignee @sonialiap is eligible for the External assigner, not assigning anyone new.
32 remaining items
melvin-bot commentedon Jun 23, 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:
mollfpr commentedon Jun 29, 2023
#16581
https://github.com/Expensify/App/pull/16581/files#r1246040157
This is a regression for our navigation reboot, so the regression step should be enough.
sonialiap commentedon Jul 3, 2023
Timeline:
June 14 9:57pm opened
June 21 12:27pm merged
Days: about 3.5
No merge bonus
sonialiap commentedon Jul 3, 2023
@avi-shek-jha offer sent for report - paid ✔️
@daordonez11 offer sent for fix (+bonus) - paid ✔️
@mollfpr offer sent for review (+bonus) - paid ✔️
daordonez11 commentedon Jul 3, 2023
Hey @sonialiap isn't urgency bonus based assignation? I was assigned on Wednesday 19 and merged by Friday 21 it took only 2 business days. I think it does apply in this case.
mountiny commentedon Jul 4, 2023
@sonialiap the bonus should apply here, would you be able to update the contracts please? thanks!
sonialiap commentedon Jul 5, 2023
Thanks for the correction. The bonus is applied on top of the contract so no need to amend them. Issuing payment with the bonus now ⏳ 💰
sonialiap commentedon Jul 5, 2023
@daordonez11 please accept the offer. Bonus is applied during payment after the offer has been accepted :)