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

Web - App crashes when marking report unread in LHN #27239

Closed
1 of 6 tasks
kbecciv opened this issue Sep 12, 2023 · 7 comments
Closed
1 of 6 tasks

Web - App crashes when marking report unread in LHN #27239

kbecciv opened this issue Sep 12, 2023 · 7 comments
Assignees

Comments

@kbecciv
Copy link

kbecciv commented Sep 12, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Open app
  2. Mark any report as unread in LHN

Expected Result:

The app should not crash

Actual Result:

The app crashes

Workaround:

Unknown

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.68.12
Reproducible in staging?: y
Reproducible in production?: n
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

Monosnap.screencast.2023-09-12.07-15-41.mp4
Recording.4408.mp4

Expensify/Expensify Issue URL:
Issue reported by:@ krishna2323
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1694483249306299

View all open jobs on GitHub

@kbecciv kbecciv added the DeployBlockerCash This issue or pull request should block deployment label Sep 12, 2023
@kbecciv
Copy link
Author

kbecciv commented Sep 12, 2023

Proposal by:@ krishna2323
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1694483249306299

Proposal

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

App crashes when marking report unread.

What is the root cause of that problem?

We are not passing originalReportID to showContextMenu function from OptionRowLHN file & we are passing empty object in place of empty string for reportActionID parameter.

const showPopover = (event) => {
setIsContextMenuActive(true);
ReportActionContextMenu.showContextMenu(
ContextMenuActions.CONTEXT_MENU_TYPES.REPORT,
event,
'',
popoverAnchor,
props.reportID,
{},
'',
() => {},
() => setIsContextMenuActive(false),
false,
false,
optionItem.isPinned,
optionItem.isUnread,
);
};

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

We can replace empty object with empty string for reportActionID & we need to pass one more empty string just after reportActionID for originalReportID.
showContextMenu function:

function showContextMenu(
type,
event,
selection,
contextMenuAnchor,
reportID = '0',
reportActionID = '0',
originalReportID = '0',
draftMessage = '',
onShow = () => {},
onHide = () => {},
isArchivedRoom = false,
isChronosReport = false,
isPinnedChat = false,
isUnreadChat = false,
) {
if (!contextMenuRef.current) {
return;
}
// If there is an already open context menu, close it first before opening
// a new one.
if (contextMenuRef.current.instanceID) {
hideContextMenu();
contextMenuRef.current.runAndResetOnPopoverHide();
}
contextMenuRef.current.showContextMenu(
type,
event,
selection,
contextMenuAnchor,
reportID,
reportActionID,
originalReportID,
draftMessage,
onShow,
onHide,
isArchivedRoom,
isChronosReport,
isPinnedChat,
isUnreadChat,
);
}

Result

@melvin-bot melvin-bot bot added the Daily KSv2 label Sep 12, 2023
@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Sep 12, 2023
@OSBotify
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.

@melvin-bot
Copy link

melvin-bot bot commented Sep 12, 2023

Triggered auto assignment to @nkuoch (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@Pluto0104
Copy link
Contributor

Dup of #27238

@francoisl
Copy link
Contributor

francoisl commented Sep 12, 2023

The fix was CP'ed and tested on staging, removing the blocker label.

@francoisl francoisl removed the DeployBlockerCash This issue or pull request should block deployment label Sep 12, 2023
@nkuoch nkuoch added Weekly KSv2 and removed Hourly KSv2 labels Sep 20, 2023
@melvin-bot melvin-bot bot removed the Weekly KSv2 label Oct 13, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 13, 2023

This issue has not been updated in over 15 days. @nkuoch eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@melvin-bot melvin-bot bot added the Monthly KSv2 label Oct 13, 2023
@melvin-bot melvin-bot bot closed this as completed Dec 11, 2023
Copy link

melvin-bot bot commented Dec 11, 2023

@nkuoch, this Monthly task hasn't been acted upon in 6 weeks; closing.

If you disagree, feel encouraged to reopen it -- but pick your least important issue to close instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants