samolego/FabricTailor

[BUG] Discord Skin URL doesn't work sometime

Closed this issue · 5 comments

For skin fetching problems

Issue

  • I'm not using TLauncher (it messes up the skins, also, piracy is not supported)

Describe the bug

I use discord(https://cdn.discordapp.com/) link to generating skin but some link that copy from discord cant change skin in game it show You have to provide URL

Example link that work well
https://cdn.discordapp.com/attachments/1165643950779019385/1192098639137480754/crocodile.png?ex=65df365f&is=65ccc15f&hm=7a2b4f00985e3fb30517386ddfc06a3c1f7fc879308837b6851ae23013befeb6&

Example link that doesn't work
https://cdn.discordapp.com/attachments/1165643950779019385/1208484015288356954/Thai.png?ex=65e37371&is=65d0fe71&hm=b75f22f90070d3484df7f7f796f4c8cfadf1db343b68d3ebd3ee749a2fd6797b&

To Reproduce

Steps to reproduce the behavior:

  1. use /skin set URL classic
  2. show error

Logs
no errors related to fabric Tailor.

Are you using any other mods?
yes but I use sodium iris etc

Additional context
Curseforge,Windows11

Discord links expire outside of discord

I use the same link that doesn't work in other mods and other programs. It works well elsewhere; I think the issue isn't with the Discord app.

Make sure you have it in allowed domains.
Also attach logs please

Apparent it's caused by mineskin's api. This is in the log of my home's Wireshark:

METHOD: POST
URL: https://api.mineskin.org/generate/url?url=https://cdn.discordapp.com/attachments/1165643950779019385/1208484015288356954/Thai.png?ex=65e37371&is=65d0fe71&hm=b75f22f90070d3484df7f7f796f4c8cfadf1db343b68d3ebd3ee749a2fd6797b&model=steve
HEADERS
Accept: text/html, image/gif, image/jpeg, *; q=.2, /; q=.2
Cache-Control: no-cache
Connection: keep-alive
Host: api.mineskin.org
Pragma: no-cache
User-Agent: Java/17.0.8.1

STATUS: 400 Bad Request
HEADERS
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: X-Requested-With, Accept, Content-Type, Origin, Authorization, Cookie
Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE, PUT
Access-Control-Allow-Origin: *
Access-Control-Request-Headers: X-Requested-With, Accept, Content-Type, Origin, Authorization, Cookie
alt-svc: h3=":443"; ma=86400
CF-Cache-Status: DYNAMIC
CF-Ray: 85d0166eaea285e6-HKG
Connection: keep-alive
Content-Length: 186
Content-Type: application/json; charset=utf-8
Date: Thu, 29 Feb 2024 10:05:15 GMT
ETag: W/"ba-s8cDy1q9jZGBRCQjCCEt37sPWbk"
NEL: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
Report-To: {"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v3?s=%2B1ZZkIiGZWgK1YXPZL5zXLNovMjNoVT4PJH021OANSwhv%2BTLIlRO3PCjadOH38yLoO9XEZUWSx9D%2F7o9bkOjJ8xmCkzeMR%2F%2BjNUapIWABWe8kAnhqkeTLfKvnKnTi84sJ%2BU%3D"}],"group":"cf-nel","max_age":604800}
Server: cloudflare
X-MineSkin-Breadcrumb: d1b7c720
X-MineSkin-Delay: 6
X-MineSkin-Delay-Millis: 6000
X-MineSkin-Delay-Seconds: 6
X-MineSkin-Server: toast
X-Powered-By: Express
X-RateLimit-Limit: 2
X-RateLimit-Remaining: 1
X-RateLimit-Reset: 1709201119
RESPONSE BODY
{
"success": false,
"errorType": "GeneratorError",
"errorCode": "invalid_image_url",
"error": "Failed to find image from url",
"nextRequest": 1709201120.12,
"delayInfo": {
"seconds": 6,
"millis": 6000
}
}

Thanks for the info! This should probably be forwarded to Mineskin :| ...