App icon indicating copy to clipboard operation
App copied to clipboard

[$250] Chat - RBR displayed on the wrong expense preview component for a few seconds

Open IuliiaHerets opened this issue 1 year ago β€’ 29 comments

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: 9.0.57-0 Reproducible in staging?: Y Reproducible in production?: Y Issue was found when executing this PR: https://github.com/Expensify/App/pull/51782 Email or phone of affected tester (no customers): [email protected] Issue reported by: Applause Internal Team

Action Performed:

  1. Navigate to staging.new.expensify.com
  2. Create a workspace
  3. Submit a manual expense
  4. Submit a scan expense with a picture that will through an error
  5. Wait for the scan to be finished and open the report conversation

Expected Result:

RBR shown only on the failed scan expense

Actual Result:

RBR shown on the manual expense at first for a few seconds

Workaround:

Unknown

Platforms:

  • [x] Android: Standalone
  • [x] Android: HybridApp
  • [x] Android: mWeb Chrome
  • [ ] iOS: Standalone
  • [ ] iOS: HybridApp
  • [ ] iOS: mWeb Safari
  • [x] MacOS: Chrome / Safari
  • [ ] MacOS: Desktop

Screenshots/Videos

https://github.com/user-attachments/assets/9101993f-9986-48d4-9e24-992ee4a726eb

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021854987328786203223
  • Upwork Job ID: 1854987328786203223
  • Last Price Increase: 2024-11-22
Issue OwnerCurrent Issue Owner: @

IuliiaHerets avatar Nov 04 '24 20:11 IuliiaHerets

Triggered auto assignment to @MitchExpensify (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[bot] avatar Nov 04 '24 20:11 melvin-bot[bot]

The cause of RBR is from data of BE API. The first transaction has this violation tag called cashExpenseWithNoReceipt:


[info] [Report] Handled multipleEvents event sent by Pusher - 
...
{"transactionViolations_3345000142618413242":null,
"transactionViolations_8239222946581758013":[{"data":null,"name":"cashExpenseWithNoReceipt","type":"notice"}]}}],"eventType":"onyxApiUpdate"}],"lastUpdateID":2800591071,"previousUpdateID":2800591070}""

I think if there is no reason to send cashExpenseWithNoReceipt by opening the thread, then the violation should not be sent. The code may be in BE API.

jacobkim9881 avatar Nov 06 '24 12:11 jacobkim9881

Job added to Upwork: https://www.upwork.com/jobs/~021854987328786203223

melvin-bot[bot] avatar Nov 08 '24 20:11 melvin-bot[bot]

Triggered auto assignment to Contributor-plus team member for initial proposal review - @c3024 (External)

melvin-bot[bot] avatar Nov 08 '24 20:11 melvin-bot[bot]

@MitchExpensify, @c3024 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

melvin-bot[bot] avatar Nov 12 '24 09:11 melvin-bot[bot]

Looks like this should be an internal issue. I will check and update.

c3024 avatar Nov 12 '24 14:11 c3024

πŸ“£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πŸ’Έ

melvin-bot[bot] avatar Nov 15 '24 16:11 melvin-bot[bot]

The cause of RBR is from data of BE API. The first transaction has this violation tag called cashExpenseWithNoReceipt:

[info] [Report] Handled multipleEvents event sent by Pusher - 
...
{"transactionViolations_3345000142618413242":null,
"transactionViolations_8239222946581758013":[{"data":null,"name":"cashExpenseWithNoReceipt","type":"notice"}]}}],"eventType":"onyxApiUpdate"}],"lastUpdateID":2800591071,"previousUpdateID":2800591070}""

I think if there is no reason to send cashExpenseWithNoReceipt by opening the thread, then the violation should not be sent. The code may be in BE API.

@jacobkim9881

Which request is returning the response with that transaction violation?

c3024 avatar Nov 17 '24 12:11 c3024

It is an update from GetMissingOnyxMessages request which is the result from waiting for identifying scan. The order is like: Submitted Scan expense -> Scanning -> An update from BE called GetMissingOnyxMessages request -> The transaction transactionViolations data has cashExpenseWithNoReceipt error -> Scanfinished

jacobkim9881 avatar Nov 17 '24 13:11 jacobkim9881

@MitchExpensify @c3024 this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

melvin-bot[bot] avatar Nov 18 '24 09:11 melvin-bot[bot]

@MitchExpensify, @c3024 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

melvin-bot[bot] avatar Nov 21 '24 09:11 melvin-bot[bot]

@jacobkim9881

Thanks for the explanation.

@MitchExpensify

This needs a backend fix. So, this should be internal.

c3024 avatar Nov 21 '24 10:11 c3024

πŸ“£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πŸ’Έ

melvin-bot[bot] avatar Nov 22 '24 16:11 melvin-bot[bot]

@MitchExpensify, @c3024 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

melvin-bot[bot] avatar Nov 25 '24 09:11 melvin-bot[bot]

I thought labeling internally would assign someone, checking with @mallenexpensify

MitchExpensify avatar Nov 26 '24 02:11 MitchExpensify

@c3024 can you please add "πŸŽ€ πŸ‘€ πŸŽ€ C+ reviewed" to assign an engineer to confirm this is a backend issue? Thanks

MitchExpensify avatar Nov 26 '24 19:11 MitchExpensify

@MitchExpensify, @c3024 Eep! 4 days overdue now. Issues have feelings too...

melvin-bot[bot] avatar Nov 27 '24 09:11 melvin-bot[bot]

πŸŽ€ πŸ‘€ πŸŽ€

c3024 avatar Nov 27 '24 09:11 c3024

Triggered auto assignment to @carlosmiceli, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

melvin-bot[bot] avatar Nov 27 '24 09:11 melvin-bot[bot]

@carlosmiceli, @MitchExpensify, @c3024 Eep! 4 days overdue now. Issues have feelings too...

melvin-bot[bot] avatar Dec 02 '24 09:12 melvin-bot[bot]

@carlosmiceli Can you help us confirm if this is a backend issue and recommend next steps please?

MitchExpensify avatar Dec 02 '24 16:12 MitchExpensify

Yeah, finally having time to pick this up today, will report back! πŸ™

carlosmiceli avatar Dec 02 '24 17:12 carlosmiceli

@jacobkim9881 @c3024 I'm not convinced that this is a BE issue. I may be wrong, but this seems like correct behavior (the first transaction has no violation and the second one does). Shouldn't a failed scan actually send a violation?

What I think it's happening is that the FE is applying the RBR to all grouped transactions, or maybe all the report transactions, despite only one having violations. Here's what I'm seeing in dev when the first transaction is created successfully and we throw the second with the scan:

1- First RequestMoney (no violations) Screenshot 2024-12-03 at 1 21 13β€―AM

2- Second RequestMoney (failed) Screenshot 2024-12-03 at 1 22 22β€―AM

3- Both transactions have the RBR in the workspace (this is the actual issue, right @IuliiaHerets ?): Screenshot 2024-12-03 at 1 20 53β€―AM

4- Opening the expense report (looks correct): Screenshot 2024-12-03 at 1 22 44β€―AM

Looking at this, I don't see a BE problem, but I may be wrong. If you still believe it to be a BE issue, please elaborate further what type of response would fix this issue and how.

carlosmiceli avatar Dec 03 '24 04:12 carlosmiceli

Current assignee @c3024 is eligible for the External assigner, not assigning anyone new.

melvin-bot[bot] avatar Dec 03 '24 04:12 melvin-bot[bot]

Re-adding the external label because I'd be interested in seeing FE proposals in the meantime.

carlosmiceli avatar Dec 03 '24 04:12 carlosmiceli

Any updates here? @c3024 @jacobkim9881

@MitchExpensify I noticed we haven't gotten proposals since re-adding the External label, why do you think that may be?

carlosmiceli avatar Dec 05 '24 16:12 carlosmiceli

@carlosmiceli

The first transaction has this violation tag called cashExpenseWithNoReceipt

I think there is a reason with cashExpenseWithNoReceipt tag on the first transaction. We could let manual transactions not have RBR for the tag from client app.

jacobkim9881 avatar Dec 05 '24 20:12 jacobkim9881

@jacobkim9881 did you read this: https://github.com/Expensify/App/issues/51989#issuecomment-2513524492 ?

carlosmiceli avatar Dec 06 '24 14:12 carlosmiceli

@carlosmiceli We could let the manual transaction not have RBR for cashExpenseWithNoReceipt error but I think the transaction should not get the error from the response.

jacobkim9881 avatar Dec 07 '24 00:12 jacobkim9881

@mallenexpensify We haven't gotten a response from @c3024 in over a week, how can we reassign this to another C+?

carlosmiceli avatar Dec 09 '24 17:12 carlosmiceli