Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOLD for payment 2024-07-25] [HOLD for payment 2024-07-24] Group chat - App crashes when navigating to group details page after creating the group #45466

Closed
6 of 7 tasks
izarutskaya opened this issue Jul 16, 2024 · 27 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering Weekly KSv2

Comments

@izarutskaya
Copy link

izarutskaya commented Jul 16, 2024


Version Number: 9.0.7-4
Reproducible in staging?: Y
Reproducible in production?: N
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go offline.
  3. Go to FAB > Start chat > Chat.
  4. Select a few users.
  5. Create a group chat.
  6. Click on the report header.
  7. Click Name.
  8. Go online.

Expected Result:

App will not crash.

Actual Result:

App crashes.

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6543532_1721111757102.20240716_143148.mp4

Bug6543532_1721111757091!staging.new.expensify.com-1721111532581.txt

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @puneetlath
@izarutskaya izarutskaya added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 16, 2024
Copy link

melvin-bot bot commented Jul 16, 2024

Triggered auto assignment to @puneetlath (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.

@izarutskaya
Copy link
Author

We think this issue might be related to the #vip-vsb

@izarutskaya izarutskaya added DeployBlockerCash This issue or pull request should block deployment DeployBlocker Indicates it should block deploying the API labels Jul 16, 2024
Copy link

melvin-bot bot commented Jul 16, 2024

Current assignee @puneetlath is eligible for the DeployBlockerCash assigner, not assigning anyone new.

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Jul 16, 2024
Copy link
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:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@nkdengineer
Copy link
Contributor

nkdengineer commented Jul 16, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

App crashes.

What is the root cause of that problem?

When we create a group chat, the parentReportID is an empty string and then after we go back online BE returns parentReportID of the report as null. The app crashes because the key is changed from collection key to collection member key

const [parentReportNameValuePairs] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${report?.parentReportID ?? -1}`);

What changes do you think we should make in order to solve the problem?

Use || instead of ?? here

const [reportNameValuePairs] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${report?.reportID ?? -1}`);
const [parentReportNameValuePairs] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${report?.parentReportID ?? -1}`);

What alternative solutions did you explore? (Optional)

Or when we create the optimistic data for the chat, add parentReportID field as null or -1 instead of empty string,

@puneetlath
Copy link
Contributor

@nkdengineer do you know what PR introduced this issue?

@nkdengineer
Copy link
Contributor

@puneetlath I think it comes from #45330.

@puneetlath
Copy link
Contributor

Ok gotcha. @srikarparsi do you see any issues with @nkdengineer's proposed fix?

@srikarparsi
Copy link
Contributor

I personally think the alternate solution is better. I think we should do that regardless of whether or not we implement the main solution. @nkdengineer is there a reason you prefer the main solution over the alternate, and is there a reason you would still want to implement the main solution on top of the alternate?

@chiragsalian
Copy link
Contributor

chiragsalian commented Jul 16, 2024

Removing deployblocker label from this issue since I'm pretty sure the issue here is not related to web-E/backend.

@chiragsalian chiragsalian removed the DeployBlocker Indicates it should block deploying the API label Jul 16, 2024
@puneetlath
Copy link
Contributor

Ok let's go with @nkdengineer's alternate proposal. Can you raise a PR ASAP @nkdengineer?

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Hourly KSv2 labels Jul 16, 2024
@puneetlath
Copy link
Contributor

I raised the PR but we will still compensate you @nkdengineer

@kavimuru
Copy link

kavimuru commented Jul 17, 2024

@puneetlath able to reproduce on 9.0.7-6

az_recorder_20240717_030232.mp4

@srikarparsi
Copy link
Contributor

I can take a look at this

@thienlnam
Copy link
Contributor

Hmm, I tested this on staging before kicking off the deploy but I must have not followed the steps correctly - my bad, but it should be okay if we can get another fix CPed before the next deploy since this has to do with offline flows

@srikarparsi
Copy link
Contributor

Yup, on it. It'll take me like 10-15 minutes probably if that's okay?

@puneetlath puneetlath mentioned this issue Jul 17, 2024
50 tasks
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jul 17, 2024
@melvin-bot melvin-bot bot changed the title Group chat - App crashes when navigating to group details page after creating the group [HOLD for payment 2024-07-24] Group chat - App crashes when navigating to group details page after creating the group Jul 17, 2024
Copy link

melvin-bot bot commented Jul 17, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 17, 2024
Copy link

melvin-bot bot commented Jul 17, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.7-8 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-07-24. 🎊

Copy link

melvin-bot bot commented Jul 17, 2024

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:

  • [@puneetlath] The PR that introduced the bug has been identified. Link to the PR:
  • [@puneetlath] 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:
  • [@puneetlath] 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:
  • [@puneetlath] Determine if we should create a regression test for this bug.
  • [@puneetlath] 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.
  • [@puneetlath] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Weekly KSv2 labels Jul 17, 2024
@roryabraham roryabraham removed the DeployBlockerCash This issue or pull request should block deployment label Jul 17, 2024
@nkdengineer
Copy link
Contributor

Ok let's go with @nkdengineer's alternate proposal. Can you raise a PR ASAP @nkdengineer?

It's too late in my time zone.

I raised the PR but we will still compensate you @nkdengineer

@puneetlath Thanks. Can you please assign me here for payment?

@kavimuru
Copy link

Bug is fixed.

1721196566724.45542_iOS.mp4

@puneetlath
Copy link
Contributor

@nkdengineer sent you an offer. Ping me here when you've accepted. https://www.upwork.com/nx/wm/offer/103157107

@nkdengineer
Copy link
Contributor

@puneetlath I accepted, thanks 🙇

@puneetlath
Copy link
Contributor

Paid thanks!

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Jul 18, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-07-24] Group chat - App crashes when navigating to group details page after creating the group [HOLD for payment 2024-07-25] [HOLD for payment 2024-07-24] Group chat - App crashes when navigating to group details page after creating the group Jul 18, 2024
Copy link

melvin-bot bot commented Jul 18, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 18, 2024
Copy link

melvin-bot bot commented Jul 18, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.8-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-07-25. 🎊

For reference, here are some details about the assignees on this issue:

  • @nkdengineer requires payment (Needs manual offer from BZ)

Copy link

melvin-bot bot commented Jul 18, 2024

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:

  • [@puneetlath] The PR that introduced the bug has been identified. Link to the PR:
  • [@puneetlath] 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:
  • [@puneetlath] 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:
  • [@nkdengineer] Determine if we should create a regression test for this bug.
  • [@nkdengineer] 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.
  • [@puneetlath] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering Weekly KSv2
Projects
None yet
Development

No branches or pull requests

8 participants