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

Track expense-App crashes when submitting a track expense to someone #46181

Closed
2 of 6 tasks
m-natarajan opened this issue Jul 25, 2024 · 25 comments
Closed
2 of 6 tasks

Track expense-App crashes when submitting a track expense to someone #46181

m-natarajan opened this issue Jul 25, 2024 · 25 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering

Comments

@m-natarajan
Copy link

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.0.12-0
Reproducible in staging?: y
Reproducible in production?: no
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4764744
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: applause internal team
Slack conversation:

Action Performed:

  1. Login with a new gmail account
  2. Navigate to the Self DM
  3. Click on the + on the compose box
  4. Choose Track expense
  5. Create a manual expense of any amount
  6. On the actionable whisper options of the track expense, click on "Submit to someone"
  7. When you are brought to the participant selector, start typing an email address

Expected Result:

User is able to select an email address and finish the flow of submitting to someone

Actual Result:

App crashes

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

Add any screenshot/video evidence

Bug6552370_1721895866499.2024-07-25_11_13_10.mp4

Bug6552370_1721896458336!staging.new.expensify.com-1721896427037.txt

View all open jobs on GitHub

@m-natarajan m-natarajan added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. DeployBlocker Indicates it should block deploying the API labels Jul 25, 2024
Copy link

melvin-bot bot commented Jul 25, 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.

Copy link

melvin-bot bot commented Jul 25, 2024

Triggered auto assignment to @NikkiWines (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

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.

@m-natarajan
Copy link
Author

We think that this bug might be related to #vip-vsb

@MariaHCD
Copy link
Contributor

Was able to reproduce the bug on staging, looks like the API call to SearchForReports failed, in my case it worked for the first few times but then later errored and returned no response:

Screenshot 2024-07-25 at 6 45 00 PM

Screenshot 2024-07-25 at 6 43 12 PM

Internal logs

@NikkiWines
Copy link
Contributor

I can reproduce it on dev, but found this PR on the most recent deploy that literally aims to fix this bug #45994

Given that I don't think this is a web deploy blocker (or even a newDot blocker, I just think the bug is not wholly fixed.

@nkdengineer
Copy link
Contributor

I don't think this issue comes from my PR because it doesn't change the money request flow.

@NikkiWines
Copy link
Contributor

Weirdly, I'm no longer able to reproduce this on staging or dev 🤔

@nkdengineer
Copy link
Contributor

I tried and was also not able to reproduce this bug.

@NikkiWines
Copy link
Contributor

Asked for a re-test here

@m-natarajan
Copy link
Author

Tester is able to reproduce the bug. Attaching new video and it is happening only in gmail acounts

2024-07-25.20.52.46.mp4

@francoisl
Copy link
Contributor

Can't reproduce either locally. The console error in the video above points to this line, though the surrounding code hasn't been changed in a while.
I wonder if it's a backend issue though, like some API command changed the response format for a whisper report action and no longer includes a resolution?

@NikkiWines
Copy link
Contributor

NikkiWines commented Jul 25, 2024

Oh, good thinking @francoisl. @tgolen, I see you in the code for some of the logic related to resolution in the whisper reportActions (albeit from a while ago). Do you happen to know of anything that has changed recently in that logic?

Also asked in slack here in case anyone else has worked on that more recently.

@mountiny
Copy link
Contributor

I think I have just run into something similar in staging https://expensify.slack.com/archives/C049HHMV9SM/p1721940861100039

@ishpaul777
Copy link
Contributor

it appears type of orignalmessage is now a string which is causing crash

Screenshot 2024-07-26 at 2 47 41 AM

@ishpaul777
Copy link
Contributor

ishpaul777 commented Jul 25, 2024

actually the type of reportAction.message is string for ACTIONABLE_MENTION_WHISPER, originalMessage seems depriciated.

function getOriginalMessage<T extends ReportActionName>(reportAction: OnyxInputOrEntry<ReportAction<T>>): OriginalMessage<T> | undefined {
if (!Array.isArray(reportAction?.message)) {
return reportAction?.message ?? reportAction?.originalMessage;
}

Screenshot 2024-07-26 at 2 57 16 AM

@ishpaul777
Copy link
Contributor

Its a array on production server

Screenshot 2024-07-26 at 3 01 56 AM

@NikkiWines
Copy link
Contributor

NikkiWines commented Jul 25, 2024

actually the type of reportAction.message is string for ACTIONABLE_MENTION_WHISPER, originalMessage seems depriciated.

originalMessage has been deprecated for a while now (since here)

But yeah if message is a string then definitely makes sense as the root for the issue

@francoisl
Copy link
Contributor

I don't understand how originalMessage gets to be a string in the first place - can you tell if the stringified message you got here was returned by TrackExpense or something else?

I just tried the TrackExpense API from production and staging, and the backend returns the same format for both

{
  "key": "reportActions_2308535023239471",
  "onyxMethod": "merge",
  "value": {
    "983660383098354030": {
      "actionName": "ACTIONABLETRACKEXPENSEWHISPER",
      "actorAccountID": 8392101,
      "avatar": "https://d1wpcgnaa73g0y.cloudfront.net/894b50e60056c966d12216005fbcacec8ce5a2c0.png",
      "created": "2024-07-25 21:41:48.670",
      "lastModified": "2024-07-25 21:41:48.670",
      "message": [
        {
          "html": "What would you like to do with this expense?",
          "text": "What would you like to do with this expense?",
          "type": "COMMENT",
          "whisperedTo": []
        }
      ],
      "originalMessage": {
        "html": "What would you like to do with this expense?",
        "lastModified": "2024-07-25 21:41:48.670",
        "transactionID": "4621430576663691334"
      },
      "person": [
        {
          "style": "strong",
          "text": "Expensify Concierge",
          "type": "TEXT"
        }
      ],
      "previousReportActionID": "3201231829538080024",
      "reportActionID": "983660383098354030",
      "shouldShow": true
    }
  }
}

@rlinoz
Copy link
Contributor

rlinoz commented Jul 25, 2024

It is from SearchForReports

"reportActions_8326091604995297": {
          "932416413244753707": {
            "action": "ACTIONABLETRACKEXPENSEWHISPER",
            "actorAccountID": 1,
            "actorEmail": "concierge@expensify.com",
            "created": "2024-07-25 20:56:55.686",
            "message": "{\"html\":\"What would you like to do with this expense?\",\"lastModified\":\"2024-07-25 20:56:55.686\",\"transactionID\":\"146406399869489744\"}",
            "reportActionID": 932416413244753700
          },

@rlinoz
Copy link
Contributor

rlinoz commented Jul 25, 2024

I think it is coming from here: https://github.com/Expensify/Web-Expensify/pull/42853/files#diff-7a032f7284c8b42392fb9715c5196b05b34ebeb369ee31387f702a26980eb792R6566

It works correctly in the OpenApp flow, but not in the SearchForReports

@francoisl
Copy link
Contributor

Ooooh great find - you have to search for your own email to be able to reproduce.

That PR was deployed to production 6 hours ago and I can repro the crash on production too. We should probably revert it tbh.

@francoisl francoisl added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Jul 25, 2024
@francoisl
Copy link
Contributor

We're going to cherry-pick a backend fix for this to staging and production now.

Thanks @ishpaul777 and @rlinoz for helping look into this 🙌

@NikkiWines
Copy link
Contributor

CP has installed on prod 👍

@NikkiWines
Copy link
Contributor

@francoisl confirmed here that this resolved the issue 🎊 🚀 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering
Projects
None yet
Development

No branches or pull requests

9 participants