Closed lunatic-gh closed 8 months ago
Can you please provide the exact command that resulted in this error?
I just tried the /skin set web classic "http://textures.minecraft.net/texture/long_string_of_characters" MyMinecraftUsername
command as mentioned in #3 and it worked fine (for the URL I used the Texture URL
of a skin I found on mineskin.org. You can also upload your own skins and use their Texture URL
).
Very weird. Now it seems to work just fine with every skin i tried on namemc. Maybe it was just some temporary downtime or something, no idea.
reappear
on an offline server , 1.20.1 fabric server with skin-restorer-1.2.3
and an offline player (named Elysia)
/skin set web slim "https://littleskin.cn/raw/322776" Elysia
log:
[20:17:07 ERROR]: Cannot get the skin for com.mojang.authlib.GameProfile@49ccd7bc[id=f36c9363-7398-39fe-9357-e1cb09d136a5,name=Elysia,properties={textures=[com.mojang.authlib.properties.Property@69c31460]},legacy=false]
but
If I replace the url field for https://littleskin.cn/raw/153616
then it be ok
The source of the problem is unclear, and it can be repeats steadily
I tried opening the 1st URL on a browser an hour ago and it wouldn't load (got a Gateway time-out so it's probably a host error). The 2nd URL opened just fine.
A few minutes ago I tried again they both loaded. Now, only the 1st one loads and the other one throws an error.
So my guess would be that it's a problem of the skin hosting service rather than the SkinRestorer mod. You could try using mineskin.org instead.
I tried opening the 1st URL on a browser an hour ago and it wouldn't load (got a Gateway time-out so it's probably a host error). The 2nd URL opened just fine.
But for my pc and server, I opened smoothly and could get files normally. @NikolasPpd
Both https://littleskin.cn/raw/322776
and https://littleskin.cn/raw/153616
There were times when they both loaded fine on my computer and times when one of them wouldn't load. If it's a server issue (which I suspect it is), when you try to load a skin in-game and the server hosting the skin doesn't respond properly it won't work.
For me, it's also the 1st loading, the 2nd not loading.
Yesterday when trying, both didn't load and showed a time-out.
On this case, i'd also assume it's an issue with the api of littleskin, if it's even using one, which doesn't seem to be the case.
For me, it's also the 1st loading, the 2nd not loading.
By the way, this site is from China, so it has two CDN systems (for China / foreign), after local testing it turns out that their CDN is not on cloudflare.com but on ksyun.com, so I have a question, what is the process of obtaining files in web mode?
Judging from the code here https://github.com/Suiranoil/SkinRestorer/blob/1.20.2/src/main/java/net/lionarius/skinrestorer/MineskinSkinProvider.java and MineSkin's API docs https://rest.wiki/?https://api.mineskin.org/openapi.yml#, I think your client makes a request to MineSkin's API, which then tries to load the skin from the URL you provided so you can finally be able to load it in-game.
I think your client makes a request to MineSkin's API, which then tries to load the skin from the URL you provided so you can finally be able to load it in-game.
Oh, I see. I'd like to get the skin files locally and transfer them through the server, can it be realized?
MineSkin does provide an endpoint to upload skin files directly but SkinRestorer only supports setting skins via URL.
The easiest way to set custom skins would be to visit https://mineskin.org/, upload the skin you want
and when a window like this one pops up
copy the
Texture URL
and use that as the URL when setting your skin in-game.
I mean can I save the skin file on the server of SkinRestorer and show it to other players through SkinRestorer when they need it?
This way I don't have to worry about Failed to set skin
, and I can just move the file to the server
@NikolasPpd
Skimming through the mod's code and seeing its directory on my server, it seems like it stores skins locally on your Minecraft server so that it doesn't have to load them from a 3rd party every single time. Therefore you only have to load a skin once using the command and then it's cached inside your server's directory.
Keep in mind though that there's probably only one cached skin per player. Meaning that if you swap between multiple skins you need to use the /set
command and provide a URL for the skin each time and only the skin you're currently using is being cached on the server (replacing any previous skin).
This mod may not provide the skin to the client directly. As I know, official client only allows skins from *.mojang.com
or *.minecraft.net
. This mod may just download "web" skin to the server and upload it to mineskin, and mineskin will upload it to mojang, and then it can provide mojang link in player's profile to every players' client.
This mod may not provide the skin to the client directly. As I know, official client only allows skins from
*.mojang.com
or*.minecraft.net
. This mod may just download "web" skin to the server and upload it to mineskin, and mineskin will upload it to mojang, and then it can provide mojang link in player's profile to every players' client.
So, if the server could't connect to mojang api fluently, /skin set web
might fail and sometimes skin can't be shown even it was correctly set. When client or server can't connect to mojang api, it of course can't correctly get or set skin.
When using the web sub-command (/skin set web slim) it always says "Failed to set skin" in chat, and the console just logs following:
decoding the "value" key from the property gives me a json object, showing my exact profile details (username, cape, etc), so it's not an issue with my profile itself.
edit: the subcommand "mojang" works fine for every existing username, only "web" doesn't.