elyby / chrly

Lightweight implementation of Minecraft skins system server. It's packaged and distributed as a Docker image.
Apache License 2.0
35 stars 4 forks source link

Using the skin from SkinsRestorer, if there's no skin on Ely.by #14

Closed Brikster closed 4 years ago

Brikster commented 4 years ago

Currently Ely.by SkinSystem doesn't work correctly with Mojang skins. When skin is not found, it returns URL for the old version of Mojang API, such as "skins.minecraft.net/MinecraftSkins/%player%.png".

Most of offline-mode servers uses plugins for restoring Mojang skins: SkinsRestorer, Custom Skins Manager etc. They make request to Mojang API and get original skin URL, using network and CPU resources of dedicated server.

Now Ely.by authlib has the following algorithm (will describe partially simplifed):

Since Minecraft launcher "TL" uses Ely.by skin system by default, all the players have broken Mojang skins on offline-mode servers even with installed skin restoring plugin.

Here we can see logs of Minecraft client: https://hastebin.brikster.ru/mocowewato.shell

My player with nickname Brikster has Mojang skin and it was restored by the server. Client got correct Mojang link with my skin texture, but finally chose broken Mojang link, that was returned by Ely.by's chrly.

Possible solution (until #11 will be completely solved): In the last case (when profile, received by client, isn't empty, and player name is equals to name of profile), we can request Ely.by skin from chrly. Then, if chrly replied, that skin is not found, we shouldn't use broken link to a Mojang skin. Instead of that we can use textures, that was provided by the server.

erickskrauch commented 4 years ago

Hello. Thanks for the well described issue :+1:

For internal reasons, the production of the Ely.by is now using Chrly 4.1.1-ely, which still uses outdated and broken links to Mojang skins. In subsequent versions, we have fixed it, but unfortunately, we can't use newer versions yet.

I really need to finalize the event_dispatcher_refactoring branch and fix https://github.com/elyby/chrly/issues/13 to migrate to the latest version of Chrly in our production.

I think I can do it in the next few days. Chrly will no longer use outdated and broken links for the unknown usernames. A little later we'll also restore the proxy of signed skins, so you won't need a skin restorer either.

erickskrauch commented 4 years ago

@Brikster, please check the behavior now. At the moment, the production uses the latest version of Chrly from the master, with all fixes, including the elimination of the old Mojang's API.

Brikster commented 4 years ago

Now on production: image

And client gets null textures: https://hastebin.brikster.ru/uqirakivek.shell

erickskrauch commented 4 years ago

:thinking: Ok, I'll investigate it deeper.

erickskrauch commented 4 years ago

@Brikster, we had to roll back the latest version of chrly to 4.1.1-ely because it caused problems with the existing authlib implementation. We have made the necessary fixes and are waiting a week for the update to reach all users. Tomorrow we'll enable the latest version again which will solve the problem.

erickskrauch commented 4 years ago

@Brikster, for now, all TL users should already receive the update. Please check your cases. Everything should work exactly as you described.

erickskrauch commented 4 years ago

I'm gonna close this issue. If there's still a problem, please let me know.