App icon indicating copy to clipboard operation
App copied to clipboard

Invoice - Creating invoice display unexpected error

Open IuliiaHerets opened this issue 1 year ago • 4 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: v9.0.30-9 Reproducible in staging?: Y Reproducible in production?: Y Issue reported by: Applause Internal Team

Action Performed:

  1. Launch app
  2. Tap fab-- new workspace
  3. Tap fab -- send invoice selecting a user

Expected Result:

Creating invoice must not display unexpected error.

Actual Result:

Creating invoice display unexpected error.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

https://github.com/user-attachments/assets/bbc89d88-585b-4d58-8791-8727fabac225

View all open jobs on GitHub

IuliiaHerets avatar Sep 06 '24 10:09 IuliiaHerets

Triggered auto assignment to @adelekennedy (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 Sep 06 '24 10:09 melvin-bot[bot]

@adelekennedy 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

IuliiaHerets avatar Sep 06 '24 10:09 IuliiaHerets

BE error, Onyx data

{
    "jsonCode": 402,
    "message": "402 missing companyName or companyWebsite",
    "onyxData": [],
    "requestID": "8bee463eb9014856-BOM"
}

ChavdaSachin avatar Sep 06 '24 12:09 ChavdaSachin

@cristipaval adding you here for a quick check - I can reproduce this and this seems like something we should address ASAP - is this being addressed anywhere else?

adelekennedy avatar Sep 08 '24 00:09 adelekennedy

Cristi is on parental leave so I will take this over.

rlinoz avatar Sep 10 '24 20:09 rlinoz

There are still a couple of issues related to invoicing creation on the main which I can see:

  1. The user can send the invoice even from the workspace where invoicing feature is disabled. It should be fixed with this PR, but I'm waiting for API fixes to open the PR for the review.

https://github.com/user-attachments/assets/a8872eaa-6ab1-48dc-bbd3-3abe64673698

  1. API doesn't return invoice information inside policy for OpenApp API call. It makes the app ask a user about the Company name and Company website every time the user re-login the app and tries to send the invoice.

cc @madmax330

VickyStash avatar Sep 11 '24 08:09 VickyStash

@VickyStash I would add to the above list that if you use a fake URL the API will return an error but we are not displaying that anywhere and we are not clearing the onyx data.

rlinoz avatar Sep 11 '24 12:09 rlinoz

Reviewing label has been removed, please complete the "BugZero Checklist".

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

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.31-26 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

  • https://github.com/Expensify/App/pull/48935

If no regressions arise, payment will be issued on 2024-09-18. :confetti_ball:

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

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [ ] [@rlinoz] The PR that introduced the bug has been identified. Link to the PR:
  • [ ] [@rlinoz] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [ ] [@rlinoz] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [ ] [@rlinoz] Determine if we should create a regression test for this bug.
  • [ ] [@rlinoz] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [ ] [@adelekennedy] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

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

@VickyStash I would add to the above list that if you use a fake URL the API will return an error but we are not displaying that anywhere and we are not clearing the onyx data.

@rlinoz Could you please provide more exact steps to reproduce it?

VickyStash avatar Sep 12 '24 07:09 VickyStash

@VickyStash my bad we actually show a RBR, but there is not much context to what happened.

Here are the steps:

  1. Start the send invoice flow for the first time
  2. Input fake data for the company, like test and https://test.com
  3. Verify the backend response for SendInvoice is something like:
{
  "jsonCode": 507,
  "message": "507 Stripe error 'invalid_request_error': Not a valid URL",
  "additionalData": {
    "errorMessage": "Not a valid URL",
    "errorType": "invalid_request_error"
  },
  "onyxData": [],
  "requestID": "8c207d0978f14e0b-SOD"
}
  1. Try to send a new invoice to someone
  2. Verify the screen to fill company data doesn't show up and now you get the following erro:
{
  "jsonCode": 402,
  "message": "402 missing companyName or companyWebsite",
  "onyxData": [],
  "requestID": "8c207d67af8c4e0b-SOD"
}

https://github.com/user-attachments/assets/c660f35c-973c-465f-8d0e-6ec841f5e3ea

rlinoz avatar Sep 12 '24 14:09 rlinoz

@rlinoz I've fixed the failure data so now the company name and website will be cleared out if the response was unsuccessful. That's how it looks:

https://github.com/user-attachments/assets/824ae465-f701-4e35-a964-733ac0deafe4

Errors: Error1 error2

Let me know if we need to change anything. cc @madmax330

VickyStash avatar Sep 12 '24 15:09 VickyStash

Yeah, that looks good to me

rlinoz avatar Sep 12 '24 16:09 rlinoz

Skipping the payment summary for this issue since all the assignees are employees or vendors. If this is incorrect, please manually add the payment summary SO.

melvin-bot[bot] avatar Sep 18 '24 18:09 melvin-bot[bot]

I believe we can close this one.

rlinoz avatar Sep 18 '24 21:09 rlinoz