ChangeSkinX

ChangeSkinX

446k Downloads

FileNotFoundException for non premium users

i0xHeX opened this issue ยท 18 comments

commented

Spigot 1.12.2 / ChangeSkin b54

On player join (non premium nickname):
https://hastebin.com/iwumejihax.swift
Try to set skin of premium player for non premium:
https://hastebin.com/uviniloguh.swift

commented

This is the first time I experienced this error on a getResponseCode() call. What Java version do you use (Oracle or OpenJDK) and could you test it with Java 8_161 or even Java 9?

commented

Java VM: Java HotSpot(TM) 64-Bit Server VM
Java Version: 1.8.0_152
Java Vendor: Oracle Corporation

commented

getResponseCode() returned something else not 204?
https://i.imgur.com/ET7FWUu.png

commented

No if you follow the stacktrace the exception occurred during the call instead of returning an integer representing the return code.

BTW: You could also checkout the source code directly. That might be easier to read.

if (connection.getResponseCode() == HttpURLConnection.HTTP_NO_CONTENT) {

commented

Are you running a local Mojang API proxy?

commented

But exception occured on MojangSkinApi:107, then line getInputStream.
What you mean about local Mojang API proxy?

commented

I do not use any proxies and other webs, providing skins. Plugin runs like from the box, changed locale, default-skin: true and instant skin false.

commented

Do you still get this, because 404 (or 410?) would mean something is wrong at Mojang's API. It would only send a 204 for cracked users. I verified that some minutes ago.

But exception occured on MojangSkinApi:107, then line getInputStream.

You are completely right. I misread the getResponseCode()

commented

I added FileNotFoundException catch (with emulation as cracked user) and recompiled plugin yesterday. No problems for now idk.

commented

It's crazy, because you even got a FileNotFoundException for your own name (i0xHeX) and you seem to have a premium UUID.

commented

No no no, it reacts not on my nickname, but only if I join with non-premium nickname. I tried to set premium skin to cracked account.

commented

Yes but the plugin is independent on how you login to the server. If it connects to the Mojang servers it should still be able to read your UUID.

commented

I think Mojang returned some other info not 204 when exception was.

commented

I know you added an additional catch, but if you still log them could you tell me if they are still happening?

commented

Okay, I will add logging on catch.

commented

If your server is hosted on a game server (not VPS or root), what hosting provider do you have?

commented

MelonCube

commented

Closing it for now, because I think it was a bug at Mojang's side and it's fixed now. I added now some additional logging in case it occurs again. Could you report back then? I'll reopen this if it's still happening.