-
Notifications
You must be signed in to change notification settings - Fork 3k
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 2023-08-03] [HOLD for payment 2023-08-02] Workspace - System throws an error when refreshing 'Invite new members' page immediately after creating a workspace #23536
Comments
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open
|
Triggered auto assignment to @flodnv ( |
@Natnael-Guchima @kbecciv I can't presently reproduce on staging 😕 can you? Asked you here: https://expensify.slack.com/archives/C049HHMV9SM/p1690287883073289?thread_ts=1690272138.001129&cid=C049HHMV9SM |
I am able to reproduce it @flodnv. To reproduce it, I think, the following condition must hold.
Let me know if it not working with these steps😃 2023-07-25.15.24.44.mp4 |
Ah yes, I was able to reproduce now |
I'm trying to use git bisect to find the offending commit and it's taking a long while due to |
git bisect shows this commit caused the bug: 46595c3 Indeed, with this diff on diff --cc src/libs/actions/PersistedRequests.js
index c99ed2ace7,f2bafb0d13..0000000000
--- a/src/libs/actions/PersistedRequests.js
+++ b/src/libs/actions/PersistedRequests.js
@@@ -25,16 -25,14 +25,9 @@@ function save(requestsToPersist)
* @param {Object} requestToRemove
*/
function remove(requestToRemove) {
- /**
- * We only remove the first matching request because the order of requests matters.
- * If we were to remove all matching requests, we can end up with a final state that is different than what the user intended.
- */
- const index = _.findIndex(persistedRequests, (persistedRequest) => _.isEqual(persistedRequest, requestToRemove));
- const persistedRequestsCopy = _.clone(persistedRequests);
- const index = _.findIndex(persistedRequestsCopy, (persistedRequest) => _.isEqual(persistedRequest, requestToRemove));
-- if (index !== -1) {
- persistedRequests.splice(index, 1);
- persistedRequestsCopy.splice(index, 1);
- persistedRequests = persistedRequestsCopy;
-- }
-
- Onyx.set(ONYXKEYS.PERSISTED_REQUESTS, persistedRequestsCopy);
++ persistedRequests = _.reject(persistedRequests, (persistedRequest) => _.isEqual(persistedRequest, requestToRemove));
+
+ Onyx.set(ONYXKEYS.PERSISTED_REQUESTS, persistedRequests);
}
/** The bug is gone. Should we revert that PR @puneetlath @allroundexperts @namhihi237 ? |
I'm not sure how this PR is related. @namhihi237 Can you please verify? |
Yes, I just check, I think the issue is relative to my PR. Somehow we have 2 same requests creating WS |
Hm... Thats weird. Why are we making two requests to create a workspace? |
Looks like it caused another deploy blocker here: #23542 (comment) |
Let's revert this I guess until we find the root cause here. |
Here's a PR to revert: #23551 @allroundexperts can you do the reviewer checklist? |
Sure. |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
PR has been reverted. @namhihi237 I think the direct mutation of the |
Yes, that's cause. I will raise PR use deep clone. |
I think shallow clone would work equally well. Something like this:
|
Yes, that work. |
Thanks all! The bug is gone from staging so we can close this. |
@flodnv I reported this issue. And no reporting bonus is issued 🙃. |
Sent you an offer @Natnael-Guchima: https://www.upwork.com/nx/wm/pre-hire/c/8577561/offer/25744751 |
Accepted the offer. Thanks @puneetlath |
My bad @Natnael-Guchima, thanks @puneetlath |
Paid! |
|
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
No error should be thrown & 'Invite new members' page should be displayed
Actual Result:
'Invite new members' page is closed * system throws an error & user can't clear the error by clicking the close icon
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.45-1
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
2023-07-25.10.55.08.mp4
Recording.3887.mp4
Expensify/Expensify Issue URL:
Issue reported by: @Natnael-Guchima
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1690272138001129
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: