-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Remove unnecessary password field from add account via plaid step #4944
Conversation
@luacmartins I'm still struggling to verify Android/mobile Web due to this (SSL?) issue. I'll keep trying to resolve this, but for now please test on Android & mWeb to ensure we have covered all platforms, thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good! Test steps worked on all platforms, but Android. The Plaid modal does not open in my emulator. I tried several times, but can't tell what the issue is. Here's a video:
android-error.mov
Here are the console logs:
DEBUG [info] Making API request - {"command":"Plaid_GetLinkToken","type":"post","shouldUseSecure":true}
DEBUG [info] Flushing logs as app is going inactive - {}
DEBUG [info] Previous log requestID - {"requestID":"SW4vyV"}
DEBUG [info] [NetworkConnection] Firing reconnection callbacks because app became active - ""
DEBUG [info] Making API request - {"command":"Get","type":"post","shouldUseSecure":false,"rvl":"personalDetailsList"}
DEBUG [info] Making API request - {"command":"Get","type":"post","shouldUseSecure":false,"rvl":"chatList"}
DEBUG [info] Finished API request - {"command":"Plaid_GetLinkToken","type":"post","shouldUseSecure":true,"jsonCode":200,"requestID":"ZC1ROb"}
DEBUG [info] Finished API request - {"command":"Get","type":"post","shouldUseSecure":false,"jsonCode":200,"requestID":"STbVn6"}
DEBUG [info] Flushing logs as app is going inactive - {}
DEBUG [info] Finished API request - {"command":"Get","type":"post","shouldUseSecure":false,"jsonCode":200,"requestID":"cgneTa"}
DEBUG [info] Making API request - {"command":"Get","type":"post","shouldUseSecure":false,"rvl":"reportSummaryList"}
DEBUG [info] Previous log requestID - {"requestID":"wJmVxy"}
DEBUG [info] Finished API request - {"command":"Get","type":"post","shouldUseSecure":false,"jsonCode":200,"requestID":"Y3YPaq"}
DEBUG [info] [Report] successfully fetched report data - {"chatList":["648","649","650","651","652","653","654","655","656","657","658","659","660","661","662","663","664","665","666","667","668","671","672"]}
DEBUG [info] Making API request - {"command":"PersonalDetails_GetForEmails","type":"post","shouldUseSecure":false}
DEBUG [info] Finished API request - {"command":"PersonalDetails_GetForEmails","type":"post","shouldUseSecure":false,"jsonCode":200,"requestID":"x2nxNs"}
DEBUG [Report] Local reportActions up to date. Not fetching additional actions.
Am I missing something?
Nope! That's exactly my problem. I've been trying to resolve this here, with no luck so far. I think we should ask for testing from someone who is able to verify Android / mWeb to keep this moving forward. Edit: I have asked for another reviewer to keep things moving forward. |
I'm able to reproduce this issue on my Galaxy S8. Something is breaking the Plaid flow for sure. It looks like there's no problem with getting the token to launch the modal (verified by using the Network plugin in Flipper). But seems like we get caught in an infinite loop or something and then the app crashes. |
There's an issue here in the Plaid repository: plaid/react-native-plaid-link-sdk#398 And the suggestion seems to be that we are opening the Plaid link multiple times. Looking at the code it doesn't seem like this is the case, but maybe we are not cleaning things up properly when the Plaid flow is exited. FWIW when I tested this here's what I saw:
|
FWIW this issue also exists on |
|
Oh wait, it is actually NOT broken... it just takes... forever to load. Edit: And by forever I mean like 30+ seconds where there is also a completely blank screen for some time and then finally the Plaid UI appears. |
Ok, Going to create a new issue for this and make it a deploy blocker. |
@@ -93,7 +91,6 @@ class AddPlaidBankAccount extends React.Component { | |||
|
|||
this.state = { | |||
selectedIndex: undefined, | |||
password: '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we are still referencing this on line 116
account, password: this.state.password, plaidLinkToken: this.props.plaidLinkToken,
I honestly can't remember, but is it safe to just remove this / is nothing expecting the password?
What are we expecting on the API side here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good spot, I thought I had removed this 😕
Yes, I believe it is safe to remove this. The password param is sent at each step, but it is only required at step: CompanyStep
. I'll remove the param and add some additional test steps to prove this is the case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Notice that we don't send password for the 'Connect manually' step either:
App/src/pages/ReimbursementAccount/BankAccountStep.js
Lines 79 to 91 in 993bc0b
addManualAccount() { | |
setupWithdrawalAccount({ | |
acceptTerms: this.state.hasAcceptedTerms, | |
accountNumber: this.state.accountNumber, | |
routingNumber: this.state.routingNumber, | |
setupType: CONST.BANK_ACCOUNT.SETUP_TYPE.MANUAL, | |
// Note: These are hardcoded as we're not supporting AU bank accounts for the free plan | |
country: CONST.COUNTRY.US, | |
currency: CONST.CURRENCY.USD, | |
fieldsType: CONST.BANK_ACCOUNT.FIELDS_TYPE.LOCAL, | |
}); | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make this even clearer, I could raise a PR in Web-Secure which would only pass password to the API here if parameters.password
is not undefined (or only for those steps which require it).
However, as all it does is prevent an undefined param from being sent in the API, I'm not sure how valuable this is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I am mostly curious here if this was an oversight or if the Web-Secure API was ever expecting this parameter? Probably we just went off of mockups here and assumed the password is required.
I think it's necessary when calling BankAccount_Create
(for the PBA flow) but perhaps is not required for the VBA flow. I'm not too sure. I do want to point out that SetupWithdrawalAccount
does accept a password parameter and validates it under certain conditions.
But unsure if that's something we need to worry about here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah, that Auth line did make me question this too... But as my testing raised no issues I think it can be explained as an oversight or change.
I will retest this once #4959 is merged. |
Unsure if this will be fixed very soon 😬 - probably we should just merge this since the Plaid modal is already affected in staging and release builds. |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by @marcaaron in version: 1.0.91-1 🚀
|
🚀 Deployed to production by @roryabraham in version: 1.0.92-0 🚀
|
Details
Removes an unnecessary password field from the 'Add Bank Account' via Plaid step.
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/175424
Tests
A) Confirm that the password step is no longer seen
B) Confirm that removing the password does not block the flow
QA Steps
Run above test
Tested On
Screenshots
@trjExpensify
Web
Mobile Web
I have been unable to verify this due to a possible SSL issue
Desktop
iOS
Android
Note: Android is blocked by this issue, we should retest Android after this issue is resolved.