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
Workspace - App crashed when send attachment offline and delete workspace from other device #41573
👋 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:
Identify the pull request that introduced this issue and revert it.
@lschurr 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.
Please re-state the problem that we are trying to solve in this issue.
Crash issue no longer happens on latest main, but we have another issue is loading infinity
Screen.Recording.2024-05-03.at.19.42.10.mov
What is the root cause of that problem?
We have 2 issues:
Issue 1: After delete workspace the function loadOlderChats has trigger call infinity due to the report action is empty and FlatList trigger call onEndReached
Please re-state the problem that we are trying to solve in this issue.
GetOlderActions is called in a loop and new messages are never loaded.
What is the root cause of that problem?
There is a bug in getContinuousReportActionChain where if there is an optimistic action in the middle of a chat we incorrectly detect a gap in the chat. This causes a smaller array to be returned and then this incorrect array is used for pagination.
New messages loaded by GetOlderActions are never included in the chat because of the incorrect gap so we keep calling GetOlderActions in a loop since we never reach the CREATED action, which is the first message in all chats.
For more context and debugging of this problem you can read through this chat in Slack.
What changes do you think we should make in order to solve the problem?
We need to fix getContinuousReportActionChain to properly ignore optimistic actions since the backend does not know about them and previousReportActionID will be wrong.
What alternative solutions did you explore? (Optional)
Activity
melvin-bot commentedon May 3, 2024
Triggered auto assignment to @iwiznia (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon May 3, 2024
Triggered auto assignment to @lschurr (
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.github-actions commentedon May 3, 2024
👋 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:
izarutskaya commentedon May 3, 2024
@lschurr 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.
izarutskaya commentedon May 3, 2024
We think this issue might be related to the #collect project.
izarutskaya commentedon May 3, 2024
Production
RPReplay_Final1714737209.MP4
suneox commentedon May 3, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Crash issue no longer happens on latest main, but we have another issue is loading infinity
Screen.Recording.2024-05-03.at.19.42.10.mov
What is the root cause of that problem?
We have 2 issues:
Issue 1: After delete workspace the function loadOlderChats has trigger call infinity due to the report action is empty and FlatList trigger call onEndReached
Issue 2: At this function we have filter out actionName = 'CREATE' and at this function we also filter out actionName = 'CLOSED' so sortedVisibleReportActions is empty and the UI is missing info
What changes do you think we should make in order to solve the problem?
Fix issue 1:
We should prevent trigger call onEndReached={loadOlderChats} when
sortedVisibleReportActionsis emptyFix issue 2:
We will update reportActions when workspace is archived by get all reportActions
Test branch
What alternative solutions did you explore? (Optional)
Update
getContinuousReportActionChainfunction whenisArchivedRoomexclude actionName = 'CREATE'12 remaining items
janicduplessis commentedon May 4, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
GetOlderActionsis called in a loop and new messages are never loaded.What is the root cause of that problem?
There is a bug in
getContinuousReportActionChainwhere if there is an optimistic action in the middle of a chat we incorrectly detect a gap in the chat. This causes a smaller array to be returned and then this incorrect array is used for pagination.New messages loaded by
GetOlderActionsare never included in the chat because of the incorrect gap so we keep callingGetOlderActionsin a loop since we never reach theCREATEDaction, which is the first message in all chats.For more context and debugging of this problem you can read through this chat in Slack.
What changes do you think we should make in order to solve the problem?
We need to fix
getContinuousReportActionChainto properly ignore optimistic actions since the backend does not know about them andpreviousReportActionIDwill be wrong.What alternative solutions did you explore? (Optional)
janicduplessis commentedon May 4, 2024
I already have a PR ready for the fix since I think this is a deploy blocker #41644, this is based on @roryabraham 's test fix #41598
suneox commentedon May 5, 2024
Proposal updated
Update RCA explanation and simplify logic fix issue
izarutskaya commentedon May 6, 2024
@iwiznia Tester login credentials (email) - applausetester+omq76@applause.expensifail.com.
Let me please include a console logs..
roryabraham commentedon May 6, 2024
nice, let's move forward with #41644, that looks correct. I kicked off an AdHoc build of that so we can test.
roryabraham commentedon May 7, 2024
Verified that this is fixed and we didn't use any C+ services so I'm closing this out