App icon indicating copy to clipboard operation
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

Open kavimuru opened this issue 2 years ago • 16 comments

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:

  1. Run the local web server.
  2. Go to any workspace from the Settings page.
  3. Click the last menu item Connect Bank account.
  4. Click connect with Plaid .
  5. 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

View all open jobs on GitHub

kavimuru avatar Oct 31 '22 21:10 kavimuru

Triggered auto assignment to @adelekennedy (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

melvin-bot[bot] avatar Oct 31 '22 21:10 melvin-bot[bot]

@adelekennedy Whoops! This issue is 2 days overdue. Let's get this updated quick!

melvin-bot[bot] avatar Nov 04 '22 08:11 melvin-bot[bot]

still reproducible - moving forward

adelekennedy avatar Nov 08 '22 05:11 adelekennedy

Triggered auto assignment to @stitesExpensify (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

melvin-bot[bot] avatar Nov 08 '22 05:11 melvin-bot[bot]

I think this can be an external issue - @stitesExpensify for confirmation

adelekennedy avatar Nov 08 '22 05:11 adelekennedy

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

stitesExpensify avatar Nov 08 '22 16:11 stitesExpensify

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.

stitesExpensify avatar Nov 08 '22 16:11 stitesExpensify

ty @stitesExpensify will wait for confirmation on making this internal

adelekennedy avatar Nov 09 '22 00:11 adelekennedy

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.

marcaaron avatar Nov 09 '22 04:11 marcaaron

So should we take a gamble on making this external or keep it internal @stitesExpensify @marcaaron?

adelekennedy avatar Nov 10 '22 23:11 adelekennedy

I'm thinking we can make it external and see if we get some proposals

stitesExpensify avatar Nov 10 '22 23:11 stitesExpensify

Triggered auto assignment to @CortneyOfstad (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

melvin-bot[bot] avatar Nov 12 '22 00:11 melvin-bot[bot]

Triggered auto assignment to @greg-schroeder (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

melvin-bot[bot] avatar Nov 12 '22 00:11 melvin-bot[bot]

Triggered auto assignment to Contributor-plus team member for initial proposal review - @sobitneupane (External)

melvin-bot[bot] avatar Nov 12 '22 00:11 melvin-bot[bot]

Triggered auto assignment to @neil-marcellini (External), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

melvin-bot[bot] avatar Nov 12 '22 00:11 melvin-bot[bot]

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

adelekennedy avatar Nov 12 '22 00:11 adelekennedy

Waiting for proposals based on https://github.com/Expensify/App/issues/12315#issuecomment-1308203506.

neil-marcellini avatar Nov 14 '22 23:11 neil-marcellini

Internal: https://www.upwork.com/ab/applicants/1592388867882348544/job-details External: https://www.upwork.com/jobs/~01082e7a459734293a

greg-schroeder avatar Nov 15 '22 05:11 greg-schroeder

@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

puneetlath avatar Nov 17 '22 21:11 puneetlath

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.

neil-marcellini avatar Nov 17 '22 21:11 neil-marcellini

If no one takes this I'll work on it with Weekly priority.

neil-marcellini avatar Nov 17 '22 21:11 neil-marcellini

@neil-marcellini, @greg-schroeder Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

melvin-bot[bot] avatar Nov 21 '22 08:11 melvin-bot[bot]

No one has taken this and I wasn't able to get to it today. Hopefully tomorrow!

neil-marcellini avatar Nov 22 '22 02:11 neil-marcellini

I didn't have time for this today unfortunately, but I'll try to get to it tomorrow.

neil-marcellini avatar Nov 23 '22 02:11 neil-marcellini

👀

neil-marcellini avatar Nov 23 '22 23:11 neil-marcellini

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?

neil-marcellini avatar Nov 24 '22 00:11 neil-marcellini

I didn't have time for this today.

neil-marcellini avatar Nov 26 '22 00:11 neil-marcellini

What determines if you are in the Plaid sandbox?

Anyone hitting the staging secure API should be using the sandbox

marcaaron avatar Nov 28 '22 21:11 marcaaron

Yeah idk if this is a WAQ issue I think it's not really a "Bug" because it only affects contributors.

marcaaron avatar Nov 28 '22 21:11 marcaaron

I will work on my monthly issues on Thursday so I should be able to make some progress on this.

neil-marcellini avatar Jan 03 '23 18:01 neil-marcellini