Skip to content
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

Getting a quota exceeded error when login edit: now it's a bad request error (vercel issue) #89

Open
h4rqq opened this issue Mar 6, 2024 · 21 comments

Comments

@h4rqq
Copy link

h4rqq commented Mar 6, 2024

What is this about? 🤔

@bodnar07
Copy link

bodnar07 commented Mar 6, 2024

same here

@h4rqq
Copy link
Author

h4rqq commented Mar 7, 2024

Don't know if BeReal are messing up something again or if it is just a firebase problem

@h4rqq h4rqq changed the title Getting a quota exceeded error when login Getting a quota exceeded error when login edit: now it's a bad reques error Mar 7, 2024
@h4rqq h4rqq changed the title Getting a quota exceeded error when login edit: now it's a bad reques error Getting a quota exceeded error when login edit: now it's a bad request error Mar 7, 2024
@h4rqq
Copy link
Author

h4rqq commented Mar 7, 2024

image anyone who can explain this?

@AVS1508
Copy link

AVS1508 commented Mar 7, 2024

Tried running it locally on Docker, and it's working fine. There seems to be an issue with the deployed Vercel app making too many requests perhaps

@Jornvz
Copy link

Jornvz commented Mar 7, 2024

Tried running it locally on Docker, and it's working fine. There seems to be an issue with the deployed Vercel app making too many requests perhaps

How did you run it locally?

@AVS1508
Copy link

AVS1508 commented Mar 7, 2024

In the cloned repository, just run a Docker container like:

$ docker build . -t toofake 
$ docker run -p 3000:3000 toofake

Then, you can access TooFake on localhost:3000

@s-alad
Copy link
Owner

s-alad commented Mar 7, 2024

local still works, checking out logs on vercel it seems everything is limited. will look in a bit more

@retoheusser
Copy link
Collaborator

Hi folks, I also have issues only when running it on Vercel. I debugged a bit what is sent from Vercel using requestbin and I found out that Vercel includes a header x-vercel-id with every request, which BeReal has likely started blocking. For me it happens only on the token refresh endpoint https://auth.bereal.team/token?grant_type=refresh_token, so it prevents me from refreshing the token while all other endpoints work.

I think there's no way getting rid of the x-vercel-id in outbound requests as long as the project is hosted. So the only option is to host the project somewhere else, or, as I did, proxy the faulty request over another service that doesn't send any headers that are identified by BeReal as third-party clients. I created a workflow on Pipedream that acts as a proxy, calls BeReal without any additional headers and returns its response. That workflow can be called from Vercel.

@Jornvz
Copy link

Jornvz commented Mar 7, 2024

I am not fermiliar with al this coding stuff. Is there a simple explenation someone can give me?

@retoheusser
Copy link
Collaborator

I think you can fix it entirely without coding by just hosting it somewhere else than Vercel :)

@Jornvz
Copy link

Jornvz commented Mar 7, 2024

How do I do that I know nothing about this stuff. Can you maybe explain in simple steps

@retoheusser
Copy link
Collaborator

Deploying it to a cloud provider like Vercel, Netlify, Heroku etc. always requires some steps that are specific and are best taken from their documentation. By far the simplest approach has already been mentioned above. Just install Docker for Mac or Windows and run these two commands:

In the cloned repository, just run a Docker container like:

$ docker build . -t toofake 
$ docker run -p 3000:3000 toofake

Then, you can access TooFake on localhost:3000

@Jornvz
Copy link

Jornvz commented Mar 7, 2024

how do you make a docker

@retoheusser
Copy link
Collaborator

  1. Install Docker for Windows or Docker for Mac
  2. Clone this GitHub repository in order to have it local: git clone https://github.com/s-alad/toofake.git
  3. Run docker build . -t toofake
  4. Run docker run -d -p 3000:3000 toofake
  5. Go to http://localhost:3000 to access your own running instance of toofake

@Jornvz
Copy link

Jornvz commented Mar 7, 2024

it says is still need to install git but i have already done that

@sme061
Copy link

sme061 commented Mar 7, 2024

After I run step 3 I get ERROR: failed to solve: failed to read dockerfile: open Dockerfile: no such file or directory
Any tips on how to move forward?

EDIT: Nevermind, I managed to fix it myself. Running it locally works perfectly

@AVS1508
Copy link

AVS1508 commented Mar 7, 2024

After I run step 3 I get ERROR: failed to solve: failed to read dockerfile: open Dockerfile: no such file or directory Any tips on how to move forward?

Are you in the project's root directory? After step 2, make sure you change the directory to the repository's root (cd toofake right after git clone)

@sme061
Copy link

sme061 commented Mar 7, 2024

After I run step 3 I get ERROR: failed to solve: failed to read dockerfile: open Dockerfile: no such file or directory Any tips on how to move forward?

Are you in the project's root directory? After step 2, make sure you change the directory to the repository's root (cd toofake right after git clone)

Thank you for the response :) I managed on my own

@s-alad
Copy link
Owner

s-alad commented Mar 7, 2024

Hi folks, I also have issues only when running it on Vercel. I debugged a bit what is sent from Vercel using requestbin and I found out that Vercel includes a header x-vercel-id with every request, which BeReal has likely started blocking. For me it happens only on the token refresh endpoint https://auth.bereal.team/token?grant_type=refresh_token, so it prevents me from refreshing the token while all other endpoints work.

I think there's no way getting rid of the x-vercel-id in outbound requests as long as the project is hosted. So the only option is to host the project somewhere else, or, as I did, proxy the faulty request over another service that doesn't send any headers that are identified by BeReal as third-party clients. I created a workflow on Pipedream that acts as a proxy, calls BeReal without any additional headers and returns its response. That workflow can be called from Vercel.

Got to the same conclusion yesterday, tried messing around with vercel but couldn't get it to work. Shame as Vercel handled thousands of daily active users quite well. I'll be moving the platform to a different hosted place for now and see how the costs rack up

@s-alad
Copy link
Owner

s-alad commented Mar 7, 2024

https://toofake.lol/ back up

@h4rqq
Copy link
Author

h4rqq commented Mar 7, 2024

It's working for me tho, let me see if it logs me out later

@s-alad s-alad changed the title Getting a quota exceeded error when login edit: now it's a bad request error Getting a quota exceeded error when login edit: now it's a bad request error (vercel issue) Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants