-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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 on July 14] Chat - Loading spinner appears after log in with different account #3838
Comments
Triggered auto assignment to @Beamanator ( |
This is not reproducible every time. I was able to reproduce 2 out of 5 times on my device. |
Further investigation shows that the report draft comment becomes The below console logs came from this code that I added: console.log(draftComments, `${ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENT}${report.reportID}`) |
Updated title & OP to show this issue isn't specific to the |
@isagoico I can reproduce this issue even in production web & it seems to be something that can be fixed externally so I'm going to make this external |
Triggered auto assignment to @SofiedeVreese ( |
ProposalWe can modify our saveReportComment to avoid merging null |
Posted on Upwork: https://www.upwork.com/jobs/~010baaee07448e0abb |
Triggered auto assignment to @chiragsalian ( |
ProposalUse optional chaining operator instead of trying to access length property directly in these 2 occurrences of --- a/src/libs/OptionsListUtils.js
+++ b/src/libs/OptionsListUtils.js
@@ -171,7 +171,7 @@ function createOption(personalDetailList, report, draftComments, {
const personalDetail = personalDetailList[0];
const hasDraftComment = report
&& draftComments
- && lodashGet(draftComments, `${ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENT}${report.reportID}`, '').length > 0;
+ && lodashGet(draftComments, `${ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENT}${report.reportID}`, '')?.length > 0;
const hasOutstandingIOU = lodashGet(report, 'hasOutstandingIOU', false);
const lastActorDetails = report ? _.find(personalDetailList, {login: report.lastActorEmail}) : null;
@@ -299,7 +299,7 @@ function getOptions(reports, personalDetails, draftComments, activeReportID, {
const hasDraftComment = report
&& draftComments
- && lodashGet(draftComments, `${ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENT}${report.reportID}`, '').length > 0;
+ && lodashGet(draftComments, `${ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENT}${report.reportID}`, '')?.length > 0;
const shouldFilterReportIfEmpty = !showReportsWithNoComments && report.lastMessageTimestamp === 0;
const shouldFilterReportIfRead = hideReadReports && report.unreadActionCount === 0; Reasoning
|
Use |
PROPOSAL: Need to add a validation check like this.
Thanks |
This seems like a regression from my PR. Fix will be applied shortly. #3793 |
@Beamanator While fixing the regression does not solve this problem as I was already facing the same problem before I pushed the PR. But this time I found the root cause of it. This is little involved than it looks. Explanation
Fix
This Fixes the original issue. Video explaining the issue in nutshell. loop-login.mp4 |
Yeah, your proposal LGTM @parasharrajat. Feel free to push out a PR and suggest the same proposal in upwork so that you can be paid for your work 👍 |
Ok I accepted your proposal in Upwork @parasharrajat ! |
Issue reproducible during KI retests. |
Payment scheduled for July 14. |
@parasharrajat has been paid, the contract has been completed, and the Upwork post has been closed. Closing issue. |
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:
Able to log in with Account B
Actual Result:
Loading spinner displayed when trying to log in with another account
Workaround:
Unknown
Platform:
Where is this issue occurring?
Web ✔️
iOS
Android ✔️
Desktop App
Mobile Web
Version Number:
1.0.75-0
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Bug5133999_Screen_Recording_20210630-092336_Expensifycash.mp4
Expensify/Expensify Issue URL:
View all open jobs on Upwork
The text was updated successfully, but these errors were encountered: