Cosmetica-cc / Cosmetica

Custom public cosmetics, Free for everyone. Forever. Ongoing Development is happening at Cosmetica-2, still WIP
https://cosmetica.cc
Apache License 2.0
54 stars 11 forks source link

Issue with multiplayer #20

Closed lordofthecarrots closed 2 years ago

lordofthecarrots commented 2 years ago

For some reason when I join my server (for context it runs 1.17 spigot) it crashes my game. The mod works fine in singleplayer and other servers and I'm pretty much 100% sure this is an issue with cosmetica as my game works fine without it. The crash log isnt helping me work out whats causing it but hopefully you could have a better look: https://crashy.net/EkJ1eG6WvDxdQQPYTA5j . I think this mod is amazing and I would love to use it so I hope you can fix the issue (unless i'm just being stupid).

valoeghese commented 2 years ago

Uh, that issue doesn't look like us. We don't save files aside from test/debug configs in our mod, and mojang's skin cache just stores by the image hash

valoeghese commented 2 years ago

I looked into this further, and it was triggered by code that could potentially be related to what we do. However, extremely unlikely.

The issue is with the URL the cape is retrieved from's final segment (what would be the base name if treated as a file path) having a : character in it, which is illegal in windows operating systems. This shouldn't be possible in unmodified versions of cosmetica. Did you modify your installation or DNS somehow? Because I highly doubt this would happen in cosmetica as-is.

valoeghese commented 2 years ago

Actually, there's one way this could happen.

Does your server have NPCS with usernames with a : in them, @lordofthecarrots ?

lordofthecarrots commented 2 years ago

it looks like that was the issue, I appreciate your help.

valoeghese commented 2 years ago

No problem!

The upcoming update should fix this issue by making it not try to look up cosmetics for most npcs, and also by using a different method for retrieving capes.