App
App copied to clipboard
[$250] Dev: Connect to bank account is not opening Sandbox page on dev server, redirects to real bank website reported by @parasharrajat
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
- Run the local web server.
- Go to any workspace from the Settings page.
- Click the last menu item Connect Bank account.
- Click connect with Plaid .
- Follow the flow.
Expected Result:
User should be navigated to sandbox environment to test bank accounts.
Actual Result:
Dev server is taking the user to real bank website which is impossible to test VBA flow on dev.
Workaround:
unknown
Platform:
Where is this issue occurring?
- Web
Version Number: 1.2.21-4 Reproducible in staging?: Needs reproduction Reproducible in production?: Needs reproduction Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: n/a Expensify/Expensify Issue URL: Issue reported by: @parasharrajat Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1667222549786869
Triggered auto assignment to @adelekennedy (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
@adelekennedy Whoops! This issue is 2 days overdue. Let's get this updated quick!
still reproducible - moving forward
Triggered auto assignment to @stitesExpensify (Engineering
), see https://stackoverflow.com/c/expensify/questions/4319 for more details.
I think this can be an external issue - @stitesExpensify for confirmation
I think this is going to have to be internal. AFAIK this is because of how our proxy works. The proxy points to production, when the sandbox page can only be reached from our staging servers.
CC @marcaaron @AndrewGable since you worked on the original proxy
I tried changing my .env file to point to staging.expensify.com
but that just gave me CORS errors, so we may need to fix that too.
ty @stitesExpensify will wait for confirmation on making this internal
Ah yeh hmm so I think this can actually be fixed externally, but requires jumping through some hoops..
Pre-requisites
- Proxy server is enabled via
.env
- Staging version of the app is built
- Preferences > Test Preferences > Use Staging Server is checked
This doesn't work for secure because of this line here:
https://github.com/Expensify/App/blob/ae3f424d24bc1037fbf1cae460f22be83f43dc3f/src/libs/HttpUtils.js#L101-L103
The proxy is at the root /
see:
https://github.com/Expensify/App/blob/952e5c39e4be989bd4aaea251ce5d3c4c64faa7a/src/CONFIG.js#L21
So I think we need some way to:
- Use
/
to make the request to secure but maybe add something like a param&shouldUseSecure=true
to the/
url or a different path like/staging-api
that the proxy can use to switch the hostname in the proxy request. - Pipe the request to secure staging back to the client just like we do for regular production/staging server requests.
I am pretty sure that will work and we should not have to modify any headers.
So should we take a gamble on making this external or keep it internal @stitesExpensify @marcaaron?
I'm thinking we can make it external and see if we get some proposals
Triggered auto assignment to @CortneyOfstad (External
), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
Triggered auto assignment to @greg-schroeder (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @sobitneupane (External
)
Triggered auto assignment to @neil-marcellini (External
), see https://stackoverflow.com/c/expensify/questions/7972 for more details.
about to be offline - @greg-schroeder so reassigning you, only steps taken so far are re-producing the issue and deciding it should be external
Waiting for proposals based on https://github.com/Expensify/App/issues/12315#issuecomment-1308203506.
Internal: https://www.upwork.com/ab/applicants/1592388867882348544/job-details External: https://www.upwork.com/jobs/~01082e7a459734293a
@neil-marcellini @stitesExpensify this is one of the oldest issues in the /App repo. To help us clear out the large backlog of bugs, can you:
- Decide whether any proposals currently meet our guidelines and can be approved as-is
- For any that can't, please take this issue internal and treat it as one of your highest priorities
- If you have any questions, don't hesitate to start a discussion in #bug-zero
There are no current proposals, but there is a solution outlined here https://github.com/Expensify/App/issues/12315#issuecomment-1308203506. I posted in Slack asking if someone can take this over.
If no one takes this I'll work on it with Weekly priority.
@neil-marcellini, @greg-schroeder Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
No one has taken this and I wasn't able to get to it today. Hopefully tomorrow!
I didn't have time for this today unfortunately, but I'll try to get to it tomorrow.
👀
I see that if you run the web proxy by setting USE_WEB_PROXY=true
in the .env file then when you connect with Plaid it does not put you into the "sandbox" mode. What determines if you are in the Plaid sandbox?
I was able to get that result regardless of the "Use staging server" value. What should the host be for the proxy request? @marcaaron would you have time to hop on a quick call with me and explain how the proxy works?
Is this a WAQ issue or should we hold it until later?
I didn't have time for this today.
What determines if you are in the Plaid sandbox?
Anyone hitting the staging secure API should be using the sandbox
Yeah idk if this is a WAQ issue I think it's not really a "Bug" because it only affects contributors.
I will work on my monthly issues on Thursday so I should be able to make some progress on this.