toofake icon indicating copy to clipboard operation
toofake copied to clipboard

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

Open h4rqq opened this issue 1 year ago • 21 comments

What is this about? 🤔

h4rqq avatar Mar 06 '24 21:03 h4rqq

same here

bodnar07 avatar Mar 06 '24 23:03 bodnar07

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

h4rqq avatar Mar 07 '24 00:03 h4rqq

image anyone who can explain this?

h4rqq avatar Mar 07 '24 00:03 h4rqq

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

AVS1508 avatar Mar 07 '24 06:03 AVS1508

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?

Jornvz avatar Mar 07 '24 07:03 Jornvz

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

AVS1508 avatar Mar 07 '24 07:03 AVS1508

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

s-alad avatar Mar 07 '24 07:03 s-alad

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.

retoheusser avatar Mar 07 '24 10:03 retoheusser

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

Jornvz avatar Mar 07 '24 11:03 Jornvz

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

retoheusser avatar Mar 07 '24 12:03 retoheusser

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

Jornvz avatar Mar 07 '24 13:03 Jornvz

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

retoheusser avatar Mar 07 '24 13:03 retoheusser

how do you make a docker

Jornvz avatar Mar 07 '24 13:03 Jornvz

  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

retoheusser avatar Mar 07 '24 14:03 retoheusser

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

Jornvz avatar Mar 07 '24 14:03 Jornvz

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

sme061 avatar Mar 07 '24 18:03 sme061

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)

AVS1508 avatar Mar 07 '24 19:03 AVS1508

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

sme061 avatar Mar 07 '24 19:03 sme061

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 avatar Mar 07 '24 20:03 s-alad

https://toofake.lol/ back up

s-alad avatar Mar 07 '24 20:03 s-alad

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

h4rqq avatar Mar 07 '24 21:03 h4rqq