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

[$250] [Workspace Feeds] Auth RequestReplacementExpensifyCard returned an error when deactivating card #50394

Open
6 tasks done
IuliiaHerets opened this issue Oct 8, 2024 · 49 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Internal Requires API changes or must be handled by Expensify staff

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Oct 8, 2024

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.46-1
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. [Admin] Asssign a virtual card to member.
  3. [Admin] Go to Expensify Card.
  4. [Admin] Click on the member with the virtual card in Step 2.
  5. [Admin] Change the limit to 0.00
  6. [Member] Go to Wallet.
  7. [Member] Click on the Expensify Card.
  8. [Member] Click Report virtual card fraud.
  9. [Member] Click Deactivate card.

Expected Result:

The error message should be a proper error message.

Actual Result:

The error message is Auth RequestReplacementExpensifyCard returned an error.

Workaround:

Unknown

Platforms:

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6627977_1728363625149.error.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021844041896258257372
  • Upwork Job ID: 1844041896258257372
  • Last Price Increase: 2024-10-09
Issue OwnerCurrent Issue Owner: @mountiny
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 8, 2024
Copy link

melvin-bot bot commented Oct 8, 2024

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

@IuliiaHerets
Copy link
Author

We think that this bug might be related to #wave-collect - Release 2

@IuliiaHerets
Copy link
Author

@slafortune FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@Nodebrute

This comment was marked as outdated.

@slafortune slafortune added the External Added to denote the issue can be worked on by a contributor label Oct 9, 2024
@melvin-bot melvin-bot bot changed the title Expensify Card - Auth RequestReplacementExpensifyCard returned an error when deactivating card [$250] Expensify Card - Auth RequestReplacementExpensifyCard returned an error when deactivating card Oct 9, 2024
Copy link

melvin-bot bot commented Oct 9, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 9, 2024
Copy link

melvin-bot bot commented Oct 9, 2024

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

@trjExpensify trjExpensify changed the title [$250] Expensify Card - Auth RequestReplacementExpensifyCard returned an error when deactivating card [$250] [Workspace Feeds] Auth RequestReplacementExpensifyCard returned an error when deactivating card Oct 9, 2024
@mountiny mountiny added Internal Requires API changes or must be handled by Expensify staff and removed External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors labels Oct 9, 2024
@mountiny mountiny self-assigned this Oct 9, 2024
@mountiny
Copy link
Contributor

mountiny commented Oct 9, 2024

This needs better error handling, when the card is deactivated we send the onyx update to remove the card, but it might take longer so the user was still able to see the card there

@mountiny
Copy link
Contributor

mountiny commented Oct 9, 2024

@koko57 would you be able to look as well? I can see that the updates are being queued to remove the card from Onyx, but it seems like it's not being applied correctly/ re-rendered.

I will need to look more later too

@koko57
Copy link
Contributor

koko57 commented Oct 10, 2024

@mountiny yeah, of course I will take a look. If any other problems with Expensify Card will be found, ping me please, I can take care of them

@mountiny
Copy link
Contributor

If you find this needs to be addressed in BE, then please ping me in slack 🙌

@koko57
Copy link
Contributor

koko57 commented Oct 11, 2024

@mountiny Sorry for the delay here - I just checked this flow and looks like we're getting this message from the BE
Screenshot 2024-10-11 at 13 33 12

I'll check if we're handling it somehow on the FE, but still the BE message would need to be changed.

@mountiny
Copy link
Contributor

From the logs, its because the account does not have the legal first name set, but I think we do not have this restriction when creating a new virtual card. We should add better error handling for sure.

@narefyev91
Copy link
Contributor

@mountiny will try to fix this today - can you help to understand what exactly we try to fix here? Just to show correct message under the button - "Cannot replace card that has no limit set"?

@melvin-bot melvin-bot bot added the Overdue label Nov 1, 2024
@koko57
Copy link
Contributor

koko57 commented Nov 4, 2024

I'm back I can take it over back

Copy link

melvin-bot bot commented Nov 4, 2024

@eVoloshchak, @slafortune, @koko57, @mountiny Huh... This is 4 days overdue. Who can take care of this?

@mountiny
Copy link
Contributor

mountiny commented Nov 4, 2024

Let me know if there is more changes in BE required @koko57

@koko57
Copy link
Contributor

koko57 commented Nov 5, 2024

@mountiny Sorry I've been working mainly on some other issue yesterday. I've pulled the newest main and I couldn't reproduce the issue - I cant't change the limit to 0.00. This PR introduced this regression #51011 (? - I think we wanted to be abe to set the value to 0). I can fix it here but I just wanted to confirm we want to be able to set it to 0.00.

@melvin-bot melvin-bot bot removed the Overdue label Nov 5, 2024
@koko57
Copy link
Contributor

koko57 commented Nov 5, 2024

@mountiny on which API call we get this error you pasted here? I'm still getting "Auth RequestReplacementExpensifyCard returned an error" for ReportVirtualExpensifyCardFraud

@koko57
Copy link
Contributor

koko57 commented Nov 5, 2024

And I see that it now looks different as it's not displayed in the RHP but it is closed and only appears below the card in the wallet with the generic error

Screenshot 2024-11-05 at 12 09 48

@koko57
Copy link
Contributor

koko57 commented Nov 5, 2024

btw if only the error message will be changed like here #50394 (comment) we don't need any changes on the FE, apart from the fix enabling changing the limit to 0. If we want to fix the flow to display the error in the RHP like it was before and not displaying an additional message, I can also do this here, but now I'm just waiting for confirmation.

cc @mountiny

@mountiny
Copy link
Contributor

mountiny commented Nov 5, 2024

It should be possible to change the limit to 0, that will deactivate the card too. We should probably handle that case with optimistic update too

I need to look into this later today or tomorrow

@koko57
Copy link
Contributor

koko57 commented Nov 5, 2024

Doubled error message is from the changes here #51841 cc @DylanDylann
I think we want only one error to be displayed - I will fix it here

@DylanDylann
Copy link
Contributor

@eVoloshchak This belongs to Workspace Feed Project, I will take over this issue. Thanks

cc @mountiny

@mountiny mountiny assigned DylanDylann and unassigned eVoloshchak Nov 6, 2024
@mountiny
Copy link
Contributor

mountiny commented Nov 6, 2024

@koko57 I think we can also create a new key for the error to show it above the button same as we do when trying to create a new card

@koko57
Copy link
Contributor

koko57 commented Nov 8, 2024

@mountiny we discussed on Slack, we don't need it, we can use the one we already have. I've opened a draft PR #52162 for fixing the value to be enabled to be changed to 0 and the loader + error on the RequestReplacement page. I'll check it once again, but yesterday I was still getting "Auth RequestReplacementExpensifyCard returned an error"

@koko57
Copy link
Contributor

koko57 commented Nov 8, 2024

@mountiny after implementing the magic code we have the error and loader back on the RequestReplacement page.
I see we have wonder a very similar error message for removing a workspace member. I wonder why actually only this one: "Auth RequestReplacementExpensifyCard returned an error" was raised as a bug.

Screenshot 2024-11-08 at 17 00 50

LMK what else should we do with this issue - should it be changed on the BE the way you mentioned? If so, there's nothing to do on the FE, maybe apart from this validation on EditCardLimit page

@mountiny
Copy link
Contributor

mountiny commented Nov 8, 2024

ok thanks, I will need to follow up on this and test locally for the errors

@melvin-bot melvin-bot bot added the Overdue label Nov 11, 2024
Copy link

melvin-bot bot commented Nov 11, 2024

@slafortune, @koko57, @mountiny, @DylanDylann Whoops! This issue is 2 days overdue. Let's get this updated quick!

@mountiny
Copy link
Contributor

On my list

@melvin-bot melvin-bot bot removed the Overdue label Nov 11, 2024
@mountiny
Copy link
Contributor

still

@melvin-bot melvin-bot bot added the Overdue label Nov 15, 2024
@mountiny
Copy link
Contributor

will update

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Nov 15, 2024
@mountiny
Copy link
Contributor

On my list

@melvin-bot melvin-bot bot removed the Overdue label Nov 18, 2024
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 Internal Requires API changes or must be handled by Expensify staff
Projects
Development

No branches or pull requests

9 participants