You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-10-30] [$250] Bank Account - "Please provide a valid website" error is shown #50103
Version Number: v9.0.43-2 Reproducible in staging?: Y Reproducible in production?: Y Issue was found when executing this PR:#49957 Email or phone of affected tester (no customers):gibethlehem@gmail.com Issue reported by: Applause Internal Team
Action Performed:
Log in to an account
Create a workspace > Enable Workflow > Connect bank account > Connect online with plaid
Continues the flow until you reached "Company website" page
Write invalid email
Click "next"
After the error is show, clear the invalid email and go back.
Return to "Company website" page
Expected Result:
"Please provide a valid website" error is not shown
Actual Result:
"Please provide a valid website" error is shown and it is not dismissed even after navigating back
@anmurali 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
Please re-state the problem that we are trying to solve in this issue.
"Please provide a valid website" error is shown and it is not dismissed even after navigating back
What is the root cause of that problem?
The company website is a step that occurs after the company tax step.
When starting the bank account setup and reaching the company tax page, clicking the "Next" button triggers the UpdateCompanyInformationForBankAccount function, passing the website data as "". No error is returned by the backend here.
Next, it redirects to the company website page. If you input something like "https://123" and then reset it to "https://", the system saves website: "https://" in the reimbursementAccountDraft.
When navigating back to the company tax page, clicking the "Next" button again triggers UpdateCompanyInformationForBankAccount with the website data as "https://", which is an invalid value. As a result, the backend returns an Onyx error:
{
"onyxMethod": "merge",
"key": "reimbursementAccount",
"value": {
"errors": {
"1727918521418387": "Please provide a valid Website"
}
}
}
So the "Please provide a valid Website" error message is shown.
What changes do you think we should make in order to solve the problem?
When we are in company website page and go back, we need to clear the reimbursementAccountDraft.website if its value is https://.
So in here we introduce a ref const websiteRef = useRef() to keep track the company website input. Then add onChangeText={(t) => (websiteRef.current = t)} to InputWrapper.
changed the title [-]Bank Account - "Please provide a valid website" error is shown[/-][+][$250] Bank Account - "Please provide a valid website" error is shown[/+]on Oct 5, 2024
[@ishpaul777] 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: Not required
[@ishpaul777] Determine if we should create a regression test for this bug. No this was a one time small bug now its fixed.
[@ishpaul777] 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. N/A
Activity
melvin-bot commentedon Oct 2, 2024
Triggered auto assignment to @anmurali (
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 commentedon Oct 2, 2024
@anmurali 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
Krishna2323 commentedon Oct 2, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Bank Account - "Please provide a valid website" error is shown
What is the root cause of that problem?
App/src/pages/ReimbursementAccount/BusinessInfo/substeps/WebsiteBusiness.tsx
Line 22 in 3b15d84
What changes do you think we should make in order to solve the problem?
WebsiteBusiness, we need to clear the errors when the screen index is changed.What alternative solutions did you explore? (Optional)
What alternative solutions did you explore? (Optional 2)
We can call
FormActions.clearErrorFields(formId);&FormActions.clearErrors(formId);inuseStepFormSubmitoruseReimbursementAccountStepFormSubmit.App/src/hooks/useStepFormSubmit.ts
Lines 23 to 41 in 3b15d84
What alternative solutions did you explore? (Optional 3)
FormActions.clearErrorFields(formId);&FormActions.clearErrors(formId);insideBusinessInfowhen callingprevScreen()App/src/pages/ReimbursementAccount/BusinessInfo/BusinessInfo.tsx
Lines 111 to 113 in 3b15d84
Result
mkzie2 commentedon Oct 3, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
The company website is a step that occurs after the company tax step.
When starting the bank account setup and reaching the company tax page, clicking the "Next" button triggers the UpdateCompanyInformationForBankAccount function, passing the website data as "". No error is returned by the backend here.
Next, it redirects to the company website page. If you input something like "https://123" and then reset it to "https://", the system saves website: "https://" in the reimbursementAccountDraft.
When navigating back to the company tax page, clicking the "Next" button again triggers UpdateCompanyInformationForBankAccount with the website data as "https://", which is an invalid value. As a result, the backend returns an Onyx error:
What changes do you think we should make in order to solve the problem?
When we are in company website page and go back, we need to clear the
reimbursementAccountDraft.websiteif its value ishttps://.So in here we introduce a ref
const websiteRef = useRef()to keep track the company website input. Then addonChangeText={(t) => (websiteRef.current = t)}to InputWrapper.Finally, add cleanup function:
What alternative solutions did you explore? (Optional)
melvin-bot commentedon Oct 5, 2024
Job added to Upwork: https://www.upwork.com/jobs/~021842647294027107619
[-]Bank Account - "Please provide a valid website" error is shown[/-][+][$250] Bank Account - "Please provide a valid website" error is shown[/+]melvin-bot commentedon Oct 5, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ishpaul777 (
External)27 remaining items
ishpaul777 commentedon Oct 30, 2024
will fillout checklist soon...
ishpaul777 commentedon Oct 31, 2024
melvin-bot commentedon Nov 1, 2024
@anmurali, @techievivek, @ishpaul777, @mkzie2 Whoops! This issue is 2 days overdue. Let's get this updated quick!
ishpaul777 commentedon Nov 1, 2024
only pending payment
melvin-bot commentedon Nov 5, 2024
@anmurali, @techievivek, @ishpaul777, @mkzie2 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
anmurali commentedon Nov 6, 2024
@ishpaul777 is paid
@mkzie2 - your offer is here
mkzie2 commentedon Nov 7, 2024
@anmurali I accepted, it can be paid out and closed
melvin-bot commentedon Nov 11, 2024
@anmurali, @techievivek, @ishpaul777, @mkzie2 Huh... This is 4 days overdue. Who can take care of this?
ishpaul777 commentedon Nov 11, 2024
not overdue on me