CustomSkinLoader

CustomSkinLoader

1M Downloads

[Cannot get proper skin from mojang api]

Slarper opened this issue ยท 4 comments

commented

log:

[2022-05-08 15:52:35] [BionicEngels INFO] 1/8 Try to load profile from 'Mojang'.
[2022-05-08 15:52:35] [BionicEngels DEBUG] Try to request 'https://api.mojang.com/profiles/minecraft'.
[2022-05-08 15:52:35] [BionicEngels INFO] Payload: ["BionicEngels"]
[2022-05-08 15:52:46] [BionicEngels DEBUG] Failed to request https://api.mojang.com/profiles/minecraft (Exception: java.net.SocketTimeoutException: Read timed out)
[2022-05-08 15:52:46] [BionicEngels INFO] Profile not found.(BionicEngels's profile not found.)
commented

https://api.mojang.com/profiles/minecraft is also a Mojang API that can be used to get multiple UUIDs for specifying usernames. You can get a detailed description of this API here.

I think the reason for the problem shown in the log is simply because of your network, because I just tested it here and it works as expected.
image

commented

The requested url (https://api.mojang.com/profiles/minecraft) is wrong. (BionicEngels is my ID ) It should be https://api.mojang.com/users/profiles/minecraft/BionicEngels

commented

You're right, now you can close the issue.
Successful log:

[2022-05-08 16:32:40] [BionicEngels INFO] 1/8 Try to load profile from 'Mojang'.
[2022-05-08 16:32:40] [BionicEngels DEBUG] Try to request 'https://api.mojang.com/profiles/minecraft'.
[2022-05-08 16:32:40] [BionicEngels INFO] Payload: ["BionicEngels"]
[2022-05-08 16:32:49] [BionicEngels DEBUG] Successfully request (Response Code: 200 , Content Length: 65)
[2022-05-08 16:32:49] [BionicEngels DEBUG] Content: [{"id":"ebebda7dd7d94793a28ac52956b6d6a0","name":"BionicEngels"}]
[2022-05-08 16:32:49] [BionicEngels DEBUG] Try to request 'https://sessionserver.mojang.com/session/minecraft/profile/ebebda7dd7d94793a28ac52956b6d6a0'.
[2022-05-08 16:32:51] [BionicEngels DEBUG] Successfully request (Response Code: 200 , Content Length: 592)
[2022-05-08 16:32:51] [BionicEngels DEBUG] Saved to cache (Length: 592 , Path: 'D:\Minecraft\HMCL\.minecraft\versions\Venus\CustomSkinLoader\caches\1297726b784e3b1bf3d89563c3582e413581d25a' , Expire: 1651998864)
[2022-05-08 16:32:51] [BionicEngels DEBUG] Content: {
  "id" : "ebebda7dd7d94793a28ac52956b6d6a0",
  "name" : "BionicEngels",
  "properties" : [ {
    "name" : "textures",
    "value" : "ewogICJ0aW1lc3RhbXAiIDogMTY1MTk5ODc3MDYwMCwKICAicHJvZmlsZUlkIiA6ICJlYmViZGE3ZGQ3ZDk0NzkzYTI4YWM1Mjk1NmI2ZDZhMCIsCiAgInByb2ZpbGVOYW1lIiA6ICJCaW9uaWNFbmdlbHMiLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMjlmMmY1M2M4YTE0NzBiYTlhZjQ3ODg0N2NhNDJiN2U2MjU5MDhmYWQ2MTVkYWFhZWUwNzJhM2I4ZjQ3NjlkOCIsCiAgICAgICJtZXRhZGF0YSIgOiB7CiAgICAgICAgIm1vZGVsIiA6ICJzbGltIgogICAgICB9CiAgICB9CiAgfQp9"
  } ]
}
[2022-05-08 16:32:51] [BionicEngels INFO] BionicEngels's profile loaded.
[2022-05-08 16:32:51] [BionicEngels INFO] (SkinUrl: http://textures.minecraft.net/texture/29f2f53c8a1470ba9af478847ca42b7e625908fad615daaaee072a3b8f4769d8 , Model: slim , CapeUrl: null  , Expiry: 1651998801)
[2022-05-08 16:32:51] [BionicEngels DEBUG] Try to request 'http://textures.minecraft.net/texture/29f2f53c8a1470ba9af478847ca42b7e625908fad615daaaee072a3b8f4769d8'.
[2022-05-08 16:32:52] [BionicEngels DEBUG] Successfully request (Response Code: 200 , Content Length: 1253)
[2022-05-08 16:32:52] [BionicEngels DEBUG] Saved to cache (Length: 1253 , Path: 'D:\Minecraft\HMCL\.minecraft\assets\skins\29\29f2f53c8a1470ba9af478847ca42b7e625908fad615daaaee072a3b8f4769d8' , Expire: -1)
[2022-05-08 16:32:52] [Render thread DEBUG] Loading type: SKIN