cnrad / lanyard-profile-readme

🏷️ Discord Presence in your GitHub Profile
https://lanyard.cnrad.dev
751 stars 101 forks source link

500 Internal Server Error #20

Closed vascYT closed 3 years ago

vascYT commented 3 years ago

Hey, a friend of mine tried to use this tool, but got a 500 error (https://lanyard-profile-readme.vercel.app/api/224270178836283392). It is a valid user id and it's not a problem with the lanyard api, because it shows all of his details as normal (https://api.lanyard.rest/v1/users/224270178836283392).

I then tried to run the project locally to read the error message, but then saw that it worked perfectly fine.

cnrad commented 3 years ago

Gonna try redeploying the project to see if that fixes anything, if not I'll try to figure out why it's doing that

cnrad commented 3 years ago

Still doesn't work on Vercel, but works on my localhost as well, this is very annoying and I'm not sure what is going wrong

vascYT commented 3 years ago

Yeah. I am also confused.

cnrad commented 3 years ago

Ok, we're getting somewhere. Adding ?animated=false to the end makes it work, so I'm assuming it has to do something with the gif size or the conversion to base64

vascYT commented 3 years ago

Okay, but why does it work on localhost then?

vascYT commented 3 years ago

I mean his pfp is 20mb. In comparison mine is 1mb. I think it's a Vercel limitation.

vascYT commented 3 years ago

Yeah, the rendered svg is 16mb big...

vascYT commented 3 years ago

That's why it works with animated set to false. Because then the svg is only 24kb.

vascYT commented 3 years ago

"The maximum payload size for the request body or the response body of a Serverless Function is 5 MB."

cnrad commented 3 years ago

Thanks for bringing this to my attention, pushed a fix and it should be working now :+1:

vascYT commented 3 years ago

Thanks for fixing it 👍