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

LHN chat appearing for $0 invoice not finish loading and won't marked as read #44276

Closed
1 of 6 tasks
m-natarajan opened this issue Jun 24, 2024 · 9 comments
Closed
1 of 6 tasks
Assignees
Labels
AutoAssignerNewDotQuality Used to assign quality issues to engineers Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2

Comments

@m-natarajan
Copy link

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


Version Number:
Reproducible in staging?: needs reproduction
Reproducible in production?: needs reproduction
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
Expensify/Expensify Issue URL:
Issue reported by: @tgolen
Slack conversation: https://expensify.slack.com/archives/C05LX9D6E07/p1719235655502919

Action Performed:

  1. Open app
  2. Click on the chat with $0 invoice

Expected Result:

Chat should finish loading

Actual Result:

Not loading and unable to make that read and stuck in the LHN
The reportID: 2746481461214539
Logs of an OpenReport command that fails with error Got empty report summary from Auth::openReport, user does not have access to this report

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

image (19)

image (18)

View all open jobs on GitHub

@m-natarajan m-natarajan added the AutoAssignerNewDotQuality Used to assign quality issues to engineers label Jun 24, 2024
Copy link

melvin-bot bot commented Jun 24, 2024

Current assignee @tgolen is eligible for the AutoAssignerNewDotQuality assigner, not assigning anyone new.

@m-natarajan m-natarajan added the Bug Something is broken. Auto assigns a BugZero manager. label Jun 24, 2024
Copy link

melvin-bot bot commented Jun 24, 2024

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

@melvin-bot melvin-bot bot added the Daily KSv2 label Jun 24, 2024
@tgolen
Copy link
Contributor

tgolen commented Jun 25, 2024

@arosiclair it looks like you were maybe the one that added this error in Web-E. Do you have any insight into what caused it for me? I think @cristipaval was starting to look into this, but I don't know that he got too far in the investigation.

I think there is also something we need to do to handle this error on the frontend better. It's easy to test this out locally (just force that throw to happen by replacing !$reportSummary with true, and then switching chats on NewDot. The backend will return this error which the frontend doesn't handle and just stays in a loading state:

{
    "code": 666,
    "jsonCode": 403,
    "type": "Expensify\\Libs\\Error\\ExpError",
    "UUID": "da7984df-628f-41f6-a2b8-ecd4499f7975",
    "message": "Report not found",
    "title": "",
    "data": {
        "onyxData": [
            {
                "onyxMethod": "merge",
                "key": "report_6008608092027638",
                "value": {
                    "errorFields": {
                        "notFound": {
                            "1719326012640726": "Report not found"
                        }
                    }
                }
            }
        ]
    },
    "htmlMessage": "",
    "onyxData": [
        {
            "onyxMethod": "merge",
            "key": "report_6008608092027638",
            "value": {
                "errorFields": {
                    "notFound": {
                        "1719326012640726": "Report not found"
                    }
                }
            }
        }
    ],
    "requestID": "o3lOxW"
}

@tgolen
Copy link
Contributor

tgolen commented Jun 25, 2024

It looks like those errorFields are either not making it into Onyx, or they are being immediately cleared out by something else. Here is what my Onyx looks like for that ^ report.

image

@tgolen
Copy link
Contributor

tgolen commented Jun 25, 2024

Here are my client-side logs (note: I had to get these logs from triggering the error on a second report, so the reportIDs won't match, but it's still the same problem.

logs
[info] Called API write - {"command":"OpenReport","reportID":"2657894031922894","reportActionID":"","emailList":"","accountIDList":"","parentReportActionID":"-1","clientLastReadTime":""}
Log.ts:69 [info] [Onyx] set called for key: networkRequestQueue properties: 0 hasChanged: true - ""
Log.ts:69 [info] Navigating to route - {"path":"/r/2657894031922894"}
Timing.ts:50 Timing:development.new.expensify.chat_render 69
Log.ts:69 [info] Making API request - {"command":"OpenReport"}
Log.ts:69 [info] [Onyx] merge called for key: lastVisitedPath hasChanged: true - ""
Log.ts:69 [info] [Onyx] merge called for key: report_2657894031922894 properties: reportName hasChanged: false - ""
Log.ts:69 [info] [Onyx] merge called for key: reportDraftComment_2657894031922894 hasChanged: true - ""
Log.ts:69 [info] [Onyx] merge called for key: reportMetadata_2657894031922894 properties: lastVisitTime,isLoadingInitialReportActions,isLoadingOlderReportActions,hasLoadingOlderReportActionsError,isLoadingNewerReportActions,hasLoadingNewerReportActionsError hasChanged: true - ""
2Log.ts:69 [info] [Onyx] merge called for key: modal properties: willAlertModalBecomeVisible,isPopover hasChanged: false - ""
Log.ts:69 [info] [SequentialQueue] 'OpenReport' command queued. Queue length is 1 - ""
Log.ts:69 [info] [Onyx] set called for key: shouldShowComposeInput hasChanged: false - ""
Log.ts:69 [info] [Onyx] set called for key: reportUserIsLeavingRoom_2657894031922894 hasChanged: true - ""
Log.ts:69 [info] [Pusher] Attempting to subscribe to channel - {"channelName":"private-report-reportID-2657894031922894-8ebfd8b0df6742c79a3660185b63bffxxxtim","eventName":"client-userIsLeavingRoom"}
Log.ts:69 [info] [PusherAuthorizer] Attempting to authorize Pusher - {"channelName":"private-report-reportID-2657894031922894-8ebfd8b0df6742c79a3660185b63bffxxxtim"}
Log.ts:69 [info] Called API makeRequestWithSideEffects - {"command":"AuthenticatePusher","socket_id":"740564.1101054","channel_name":"private-report-reportID-2657894031922894-8ebfd8b0df6742c79a3660185b63bffxxxtim","shouldRetry":false,"forceNetworkRequest":true}
Log.ts:69 [info] Making API request - {"command":"AuthenticatePusher"}
Log.ts:69 [info] [Onyx] merge called for key: network properties: timeSkew hasChanged: false - ""
Log.ts:69 [info] Finished API request in 1123ms - {"command":"OpenReport","jsonCode":403,"requestID":"VXfzVV"}
Log.ts:69 [info] [OnyxUpdateManager] Applying update type: https with lastUpdateID: 0 - {"command":"OpenReport"}
OnyxUpdates.ts:28 [OnyxUpdateManager] Applying https update
OnyxUpdates.ts:52 [OnyxUpdateManager] Done applying HTTPS update
Log.ts:69 [info] [Onyx] set called for key: networkRequestQueue properties:  hasChanged: true - ""
Log.ts:69 [info] [SequentialQueue] Unable to process. No requests to process. - ""
Log.ts:69 [info] [SequentialQueue] Finished processing queue. - ""
Log.ts:69 [info] [Onyx] merge called for key: report_2657894031922894 properties: errorFields hasChanged: true - ""
Log.ts:69 [info] [Onyx] merge called for key: reportMetadata_2657894031922894 properties: isLoadingInitialReportActions hasChanged: true - ""
Log.ts:69 [info] Not switching user to optimized focus mode. - {"isInFocusMode":true,"hasTriedFocusMode":true}
Log.ts:69 [info] [Onyx] merge called for key: report_2657894031922894 properties: errorFields hasChanged: true - ""
Log.ts:69 [info] [Onyx] merge called for key: reportDraftComment_2657894031922894 hasChanged: true - ""
Log.ts:69 [info] [Onyx] merge called for key: modal properties: willAlertModalBecomeVisible,isPopover hasChanged: false - ""
Log.ts:69 [info] [SequentialQueue] 'OpenReport' removed from the queue. Queue length is 0 - ""
Log.ts:69 [info] [Onyx] merge called for key: modal properties: willAlertModalBecomeVisible,isPopover hasChanged: false - ""
Log.ts:69 [info] Not switching user to optimized focus mode. - {"isInFocusMode":true,"hasTriedFocusMode":true}
[info] Finished API request in 1727ms - {"command":"AuthenticatePusher","jsonCode":200,"requestID":"fYixQe"}
Log.ts:69 [info] [OnyxUpdateManager] Applying update type: https with lastUpdateID: 0 - {"command":"AuthenticatePusher"}
OnyxUpdates.ts:28 [OnyxUpdateManager] Applying https update
OnyxUpdates.ts:52 [OnyxUpdateManager] Done applying HTTPS update
Log.ts:69 [info] [PusherAuthorizer] Pusher authenticated successfully - {"channelName":"private-report-reportID-2657894031922894-8ebfd8b0df6742c79a3660185b63bffxxxtim"}
Log.ts:69 [info] Flushing logs as app is going inactive - {}
Log.ts:69 [info] Previous log requestID - {"requestID":"cAuhVO"}
Log.ts:69 [info] [OnyxUpdateManager] Applying update type: https with lastUpdateID: 0 - {"command":"Log"}
OnyxUpdates.ts:28 [OnyxUpdateManager] Applying https update
OnyxUpdates.ts:52 [OnyxUpdateManager] Done applying HTTPS update
Log.ts:69 [info] [Onyx] set called for key: activeClients properties: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 hasChanged: false - ""
Log.ts:69 [info] Flushing logs as app is going inactive - {}
Log.ts:69 [info] Previous log requestID - {"requestID":"QaSvNF"}
Log.ts:69 [info] [OnyxUpdateManager] Applying update type: https with lastUpdateID: 0 - {"command":"Log"}
OnyxUpdates.ts:28 [OnyxUpdateManager] Applying https update
OnyxUpdates.ts:52 [OnyxUpdateManager] Done applying HTTPS update
Log.ts:69 [info] [Onyx] set called for key: activeClients properties: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 hasChanged: false - ""
Log.ts:69 [info] Flushing logs as app is going inactive - {}
Log.ts:69 [info] Previous log requestID - {"requestID":"MPlHxX"}
Log.ts:69 [info] [OnyxUpdateManager] Applying update type: https with lastUpdateID: 0 - {"command":"Log"}
OnyxUpdates.ts:28 [OnyxUpdateManager] Applying https update
OnyxUpdates.ts:52 [OnyxUpdateManager] Done applying HTTPS update
Log.ts:69 [info] [Onyx] set called for key: activeClients properties: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 hasChanged: false - ""

@tgolen
Copy link
Contributor

tgolen commented Jun 25, 2024

My guess is that maybe these are cancelling each other out:

image

@dylanexpensify
Copy link
Contributor

Ongoing

@arosiclair
Copy link
Contributor

The updates to errorFields.notFound canceling out may get fixed in this issue I'm working on. In a normal scenario though, errorFields.notFound should trigger the Not Found page to display here.

@tgolen
Copy link
Contributor

tgolen commented Jun 26, 2024

All right, if that's the case, then I don't know if there is much more to do in this issue since it can't be readily reproduced. I'm going to close it for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AutoAssignerNewDotQuality Used to assign quality issues to engineers Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2
Projects
Status: Done
Development

No branches or pull requests

4 participants