Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.55k stars 2.89k forks source link

[HOLD for payment 2023-04-06] [$250] Web - Connect Bank Account - Console error "Too many requests" is showing after click on Plaid Option #16497

Closed kbecciv closed 1 year ago

kbecciv commented 1 year ago

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Go to staging.new.expensify.com
  2. Login with expensifail account and open console logs
  3. Go to Settings - Workspace - Connect Bank Account
  4. Select Plaid option

Expected Result:

Should be no console error "Too many requests" after click on Plaid Option

Actual Result:

Console error "Too many requests" is showing after click on Plaid Option

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

Version Number: 1.2.89.0

Reproducible in staging?: Yes

Reproducible in production?: Yes

If this was caught during regression testing, add the test name, ID and link from TestRail:

Email or phone of affected tester (no customers):

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

https://user-images.githubusercontent.com/93399543/227647461-08578135-eed0-4d8f-bd83-baa9031353b2.mp4

image (28)

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0199a8defe0df0cc4c
  • Upwork Job ID: 1641753609326379008
  • Last Price Increase: 2023-04-06
MelvinBot commented 1 year ago

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

MelvinBot commented 1 year ago

Bug0 Triage Checklist (Main S/O)

zanyrenney commented 1 year ago

Is this issue the console error or not being able to progress through the whole flow @kbecciv ? What happens after you click continue? Are you able to progress?

kbecciv commented 1 year ago

Yes, able to proceed with vba flow

MelvinBot commented 1 year ago

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

zanyrenney commented 1 year ago

I wasn't sure this was a bug, because the user can progress, but I chatted to AlexB and he confirmed we still want to fix these! Applying External.

MelvinBot commented 1 year ago

Job added to Upwork: https://www.upwork.com/jobs/~0199a8defe0df0cc4c

MelvinBot commented 1 year ago

Current assignee @zanyrenney is eligible for the External assigner, not assigning anyone new.

MelvinBot commented 1 year ago

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

MelvinBot commented 1 year ago

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

spantheslayer commented 1 year ago

Login with expensifail account

is it same as my normal expensify account? if not how can I get one?

mountiny commented 1 year ago

I think it does not matter @spantheslayer

@nkuoch is this something we can do anything about though

alitoshmatov commented 1 year ago

Proposal

Please re-state the problem that we are trying to solve in this issue.

Continuing to plaid option, there should not be "Too many request error"

What is the root cause of that problem?

This problem is caused by plaid api. When plaid view(iframe) opens, plaid api itself is making request to https://analytics.plaid.com/sentry/api/5/store/ and it is returning with 429 http error code.

What changes do you think we should make in order to solve the problem?

Well there is no solution to fix this issue by our side, even official plaid demo itself is having exactly the same issue. Based on response message I think the error is originating from sentry service itself.

Sentry dropped data due to a quota or internal rate limit being reached. This will not affect your application. See https://docs.sentry.io/product/accounts/quotas/ for more information.

I am going to report this to plaid api team too. I think when they increase their quota in sentry service this issue will go away

Screenshot 2023-03-31 at 11 53 57 PM

What alternative solutions did you explore? (Optional)

mountiny commented 1 year ago

Thanks for the update @alitoshmatov Do you reckon we should close this issue out then? there is nothing actionable from our side

alitoshmatov commented 1 year ago

@mountiny Yes

mountiny commented 1 year ago

Can you create the issue in the Plaid repo and link it here and then maybe leave update if they will resolve this?

I would like to offer you $250 reward for your investigation and reporting this to Plaid. Does that sound good to you?

alitoshmatov commented 1 year ago

Sure. Here is a created issue in plaid repo - https://github.com/plaid/react-plaid-link/issues/305

mountiny commented 1 year ago

Nice, @zanyrenney once you are back from ooo, could you issue a payment of $250 to @alitoshmatov for help on this issue.

@alitoshmatov if you could keep this issue in sync with the Plaid issue that would be great (basically if there will be resolution in some update version, we can update the dependency in the App)

MelvinBot commented 1 year ago

Upwork job price has been updated to $250

MelvinBot commented 1 year ago

📣 @alitoshmatov You have been assigned to this job by @mountiny! Please apply to this job in Upwork and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻 Keep in mind: Code of Conduct | Contributing 📖

mountiny commented 1 year ago

This should be ready to be paid @alitoshmatov cc @zanyrenney

alitoshmatov commented 1 year ago

Applied for the job

chetan-dexoc commented 1 year ago

It appears that the Plaid API rate limit is being exceeded, which is causing the "Too many requests" error message to appear. To resolve this issue, I propose the following technical changes:

Implement request throttling: To reduce the number of requests being sent to the Plaid API and avoid hitting the rate limit, I recommend implementing request throttling. This can be done using a library like Bottleneck, which allows you to limit the number of requests sent over a specified time period.

Cache API responses: Another way to reduce the number of requests and avoid hitting the rate limit is to cache API responses. This can be done using a library like Axios Cache Adapter, which caches responses based on the request URL, method, and parameters.

Monitor API usage: To ensure that the rate limit is not exceeded in the future, I recommend implementing monitoring and logging of API usage. This can be done using a logging library like Winston or Log4js, which allows you to log API requests and responses and monitor usage over time.

By implementing these changes, we should be able to reduce the number of requests being sent to the Plaid API and avoid hitting the rate limit, which should resolve the "Too many requests" error message.

MelvinBot commented 1 year ago

@mountiny, @zanyrenney, @alitoshmatov, @Santhosh-Sellavel Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

MelvinBot commented 1 year ago

@mountiny, @zanyrenney, @alitoshmatov, @Santhosh-Sellavel Huh... This is 4 days overdue. Who can take care of this?

mountiny commented 1 year ago

@chetan-dexoc Thank you for the proposal, I think for now, we wont be acting with anything specific as we got some other priorities going on, but we will see if this issue is coming at us more often in future.

zanyrenney commented 1 year ago

Offer sent @alitoshmatov please accept this so I can pay this out.

alitoshmatov commented 1 year ago

@zanyrenney accepted

zanyrenney commented 1 year ago

Hey @alitoshmatov - that is all paid out. Closing this out until we hear if there are any updates from the Plaid API team in future.