s-alad / toofake

View friends BeReals without posting or them knowing. Post custom BeReal's whenever. Add custom realmojis
https://toofake.lol/
MIT License
154 stars 35 forks source link

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

Open h4rqq opened 7 months ago

h4rqq commented 7 months ago

What is this about? 🤔

bodnar07 commented 7 months ago

same here

h4rqq commented 7 months ago

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

h4rqq commented 7 months ago

image anyone who can explain this?

AVS1508 commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

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

retoheusser commented 7 months ago

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 commented 7 months ago

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

retoheusser commented 7 months ago

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

Jornvz commented 7 months ago

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

retoheusser commented 7 months ago

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 commented 7 months ago

how do you make a docker

retoheusser commented 7 months ago
  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 commented 7 months ago

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

sme061 commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

https://toofake.lol/ back up

h4rqq commented 7 months ago

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