Closed IuliiaHerets closed 1 month ago
Triggered auto assignment to @sakluger (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.
@sakluger 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
Job added to Upwork: https://www.upwork.com/jobs/~021831395256513073087
Triggered auto assignment to Contributor-plus team member for initial proposal review - @akinwale (External
)
@IuliiaHerets it would be super helpful to open the JS console > network, then press the button to hit the error, and check the response of the failed API command.
Throw ExpException - d1cbd3c64a46b9acc503d06b59a1e863 ~~ message: '403 Invalid payment type' exceptionMessage: 'Auth PayMoneyRequest returned an error' exceptionFile: '/git/releases/expensify.com/544aee4/lib/Auth.php' exceptionLine: '128' exceptionCode: '403'
API threw ExpError Expensify\Libs\Error\ExpError - 85427d9f-f33a-47af-ae93-2249272d9fa6 ~~ onyxData: '[0: '[onyxMethod: 'merge' key: 'reportActions_1878202399790691' value: '[8653849744632496594: '[errors: '[1725421051483334: 'An unexpected error occurred. Please try again.']']']']']' exceptionJsonCode: '666' exceptionUserMessage: 'An unexpected error occurred. Please try again.' exceptionMessage: 'An unexpected error occurred. Please try again.' exceptionFile: '/git/releases/expensify.com/544aee4/lib/ReportAPI.php' exceptionLine: '5085' exceptionCode: '666'
That's throwing in Auth here: https://github.com/Expensify/Auth/blob/47faeb84d60f0f9b7a56f99dc5f4e8e533c7ee54/auth/command/PayMoneyRequest.cpp#L138-L142
paymentType = request["paymentType"];
const set<string> allowedPaymentTypes = {Report::PAYMENT_TYPE_ELSEWHERE, Report::PAYMENT_TYPE_ACH};
if (!SContains(allowedPaymentTypes, paymentType)) {
STHROW("403 Invalid payment type");
}
I suspect this is another bug coming from changes made in this issue and this PR.
We can see here in the payMoneyRequest
request that the paymentMethodType is businessBankAccount
and that's not valid, so we're hitting the error paying expense reports.
Processing 'PayMoneyRequest' for 'expensify.com' from '50.88.198.46' ~~ browserGUID: '66d7c963cdbeb' initialReferer: '<REDACTED>' command: 'PayMoneyRequest' iouReportID: '1878202399790691' chatReportID: '7261543974099434' reportActionID: '8653849744632496594' paymentMethodType: 'businessBankAccount' full: 'true' amount: '11000' pusherSocketID: '766448.11880468' authToken: '<REDACTED>' referer: 'ecash' platform: 'ios' api_setCookie: 'false' email: 'fischer9966+090324badm@gmail.com' isFromDevEnv: 'false' appversion: '9.0.29-0' clientUpdateID: '1599539467' partnerName: 'expensify.com' HTTP_CF_BOT_SCORE: '99' HTTP_CF_JA3_HASH: 'b76d503360ae441d410a85a7f8d648ab'
Going to fix this with a revert here: https://github.com/Expensify/App/pull/48639#issuecomment-2331681141
Do we need to keep this opened? Or assigned someone who is leading charge on the refactor?
Nah, we can use the parent issue for the PR that tried to introduce these changes.
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.29-0 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4922007 Email or phone of affected tester (no customers): fischer9966+090324badm@gmail.com Issue reported by: Applause Internal Team
Action Performed:
Precondition NewDot:
Precondition OldDot:
Steps NewDot:
Expected Result:
Admin gets a message "Payment is on hold until Employee One adds a bank account." Report in approved state. No payment button.
Actual Result:
Admin gets an error message "An unexpected error occurred. Please try again." Expense remains unpaid. "Pay with bank account" button is present.
Workaround:
Unknown
Platforms:
Screenshots/Videos
https://github.com/user-attachments/assets/54fb3f6b-f0c3-42e1-b871-b20477a2b443
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @akinwale