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] Clicking on room name while loading crashes the app #36271
changed the title [-]Clicking on room name while loading crashes the app[/-][+][$500] Clicking on room name while loading crashes the app[/+]on Feb 9, 2024
📣 @Natan-Asrat! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Regression from fixed by issue #25195 , PR #35153 (merged 2h ago).
This is why it's not reproducible on dev w/ latest main and only on staging / production.
@ZhenjaHorbach if you find the case of report being undefined or null, we can continue this issue. Otherwise can be closed.
Report from ONYX can be null )
I think it's easier to add a hold )
And wait when this PR will be in prod or staging #35153
But it confuses me that we use report?. everywhere in this component
That is, it is expected that the report may be undefined or null
But ignore a few places
Activity
melvin-bot commentedon Feb 9, 2024
Job added to Upwork: https://www.upwork.com/jobs/~01cd42193c8752a37e
[-]Clicking on room name while loading crashes the app[/-][+][$500] Clicking on room name while loading crashes the app[/+]melvin-bot commentedon Feb 9, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @situchan (
External)melvin-bot commentedon Feb 9, 2024
Triggered auto assignment to @dylanexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.Natan-Asrat commentedon Feb 9, 2024
i have solved this problem countless times in my own android app so i know the solution
melvin-bot commentedon Feb 9, 2024
📣 @Natan-Asrat! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Format:
ZhenjaHorbach commentedon Feb 9, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Clicking on room name while loading crashes the app
What is the root cause of that problem?
Strange that I cannot reproduce on dev
But easy on the prod
Looks like we try to get a description from the report (Which is undefined )
What changes do you think we should make in order to solve the problem?
I think the problem related to this line
App/src/pages/ReportDetailsPage.tsx
Line 73 in 4f9d415
So we can update this line like
const shouldShowReportDescription = isChatRoom && (canEditReportDescription || report?.description !== '');I think this fix makes sense because I noticed that in
ReportDetailsPagewe usereport?.almost everywhere and strange that we ignore it hereAlso, we have a similar place here
App/src/pages/ReportDetailsPage.tsx
Line 249 in 4f9d415
So I think it's good to check all places where we use values from
reportWhat alternative solutions did you explore? (Optional)
NA
Natan-Asrat commentedon Feb 9, 2024
Contributor details
Your Expensify account email: natsceo@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~014ae4361b802854c6
melvin-bot commentedon Feb 9, 2024
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
1 remaining item
ZhenjaHorbach commentedon Feb 9, 2024
But we still have this line )
https://github.com/Expensify/App/pull/35153/files#diff-409b0e2fb439856e9897b808014031ce244a427d116ed30f37a2e0117599adc4R73
ikevin127 commentedon Feb 9, 2024
Regression
fromfixed by issue #25195 , PR #35153 (merged 2h ago).This is why it's not reproducible on dev w/ latest main and only on staging / production.
situchan commentedon Feb 9, 2024
@ikevin127 you mean fixed by #25195?
Seems like that PR fixed crash, not caused crash
ZhenjaHorbach commentedon Feb 9, 2024
This bug is in production)
I doubt they merged this branch in prod so quickly
situchan commentedon Feb 9, 2024
@ZhenjaHorbach if you find the case of
reportbeing undefined or null, we can continue this issue.Otherwise can be closed.
Pujan92 commentedon Feb 9, 2024
Regression seems to be from #34150 and #25195 fixed the crash.
ZhenjaHorbach commentedon Feb 9, 2024
Report from ONYX can be null )
I think it's easier to add a hold )
And wait when this PR will be in prod or staging
#35153
But it confuses me that we use
report?.everywhere in this componentThat is, it is expected that the report may be undefined or null
But ignore a few places
situchan commentedon Feb 9, 2024
yes, Onyx values are optional and agree that we should use optional chaining everywhere.
situchan commentedon Feb 12, 2024
#35153 hit staging.
Now crash doesn't happen on staging.
situchan commentedon Feb 12, 2024
@ZhenjaHorbach thoughts on #36271 (comment)?
ZhenjaHorbach commentedon Feb 12, 2024
I tried to reproduce the problem associated with this line)
App/src/pages/ReportDetailsPage.tsx
Line 73 in 4f9d415
But I didn't succeed)
And there are no more crashes
situchan commentedon Feb 12, 2024
ok @dylanexpensify let's close as fixed