s-alad / toofake

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

API calls returning 400 #98

Open ffernn-dev opened 3 months ago

ffernn-dev commented 3 months ago

[In Australia if it makes a difference] So my 'today' feed is loading fine, but /me, /memories and /comment are spitting HTTP 400s. Here's the browser console output:

[Log] D (memories-cf17d99fae2b5e22.js, line 1)
code: "ERR_BAD_REQUEST"
config: {transitional: {silentJSONParsing: true, forcedJSONParsing: true, clarifyTimeoutError: false}, adapter: ["xhr", "http"], transformRequest: Array, transformResponse: Array, timeout: 0, …}
message: "Request failed with status code 400"
name: "AxiosError"
request: XMLHttpRequest {listeners: Object, onreadystatechange: null, readyState: 4, timeout: 0, withCredentials: false, …}
response: {data: {status: "error"}, status: 400, statusText: "", headers: tm, config: Object, …}
stack: "@https://toofake.lol/_next/static/chunks/154-26c97a7090d4b522.js:6:3999…"
D Prototype

And HTTP request/response:

:method: POST
:scheme: https
:authority: toofake.lol
:path: /api/memories
Content-Type: application/json
Accept: application/json, text/plain, */*
Sec-Fetch-Site: same-origin
Accept-Encoding: gzip, deflate, br
Accept-Language: en-AU,en;q=0.9
Sec-Fetch-Mode: cors
Host: toofake.lol
Origin: https://toofake.lol
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.2 Safari/605.1.15
Connection: keep-alive
Content-Length: 349
Sec-Fetch-Dest: empty

:status: 400
Content-Type: application/json; charset=utf-8
ETag: "v1uzzlc7sri"
Date: Mon, 01 Apr 2024 05:56:00 GMT
Content-Length: 18
Cache-Control: public, max-age=0, must-revalidate
Server: Vercel
Strict-Transport-Security: max-age=63072000
x-vercel-id: syd1::iad1::tbzhp-1711950960093-ecdfaa1229e5
x-matched-path: /api/memories
x-vercel-cache: MISS

Will try running locally and see what I can debug.

ffernn-dev commented 3 months ago

Hrm I've cloned and run it, and there are no issues now... Everything loads fine, no errors.

s-alad commented 3 months ago

think it might have to do with BeReal blocking requests from the hosted instance on vercel

ffernn-dev commented 3 months ago

Ahh gotcha.