Mojira Archive
MC-240702

Attempting to load custom player head when off-line spams errors to log and always fails when back online

The bug

When attempting to load a custom player head when off-line, it fails, which is expected. However, re-opening the world or the game after internet connection is reinstated fails to load the player head skin again. Once this occurs, the skin does not show up anymore.

Multiple errors are spammed to the log.

Log (abridged, 21w44a)
Couldn't look up profile properties for com.mojang.authlib.GameProfile@14c816a[id=02a2b6ef-1d92-373a-92fd-153f3b082aa4,name=deadmau5,properties={},legacy=false]
com.mojang.authlib.exceptions.AuthenticationUnavailableException: Cannot contact authentication server
	at com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService.makeRequest(YggdrasilAuthenticationService.java:126) ~[authlib-3.1.36.jar:?]
	at com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService.makeRequest(YggdrasilAuthenticationService.java:100) ~[authlib-3.1.36.jar:?]
	at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillGameProfile(YggdrasilMinecraftSessionService.java:194) ~[authlib-3.1.36.jar:?]
	at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillProfileProperties(YggdrasilMinecraftSessionService.java:187) ~[authlib-3.1.36.jar:?]
	at clx.c(SourceFile:141) ~[21w44a.jar:?]
	at ad.a(SourceFile:496) ~[21w44a.jar:?]
	at clx.a(SourceFile:136) ~[21w44a.jar:?]
	at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1434) [?:?]
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:295) [?:?]
	at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1016) [?:?]
	at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1665) [?:?]
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1598) [?:?]
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183) [?:?]
Caused by: java.net.UnknownHostException: sessionserver.mojang.com
	at sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:567) ~[?:?]
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:333) ~[?:?]
	at java.net.Socket.connect(Socket.java:645) ~[?:?]
	at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:300) ~[?:?]
	at sun.net.NetworkClient.doConnect(NetworkClient.java:177) ~[?:?]
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:497) ~[?:?]
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:600) ~[?:?]
	at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:265) ~[?:?]
	at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:379) ~[?:?]
	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:189) ~[?:?]
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1277) ~[?:?]
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1120) ~[?:?]
	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:175) ~[?:?]
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1653) ~[?:?]
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1577) ~[?:?]
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:224) ~[?:?]
	at com.mojang.authlib.HttpAuthenticationService.performGetRequest(HttpAuthenticationService.java:140) ~[authlib-3.1.36.jar:?]
	at com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService.makeRequest(YggdrasilAuthenticationService.java:105) ~[authlib-3.1.36.jar:?]
	... 12 more

To reproduce

  1. Turn on internet connection and create a new world.
  2. Turn off internet connection.
  3. Give yourself a player head:
    /give @p minecraft:player_head{SkullOwner:"(NAME)"}

    It might be necessary to load a player head that you have not loaded recently before, to assure that the skin is not cached.

  4. The head does not show its skin, which is expected.
  5. Close the world and reinstate internet connection.
  6. Reopen the world.
  7. Attempt to load the player skin by executing the command again.
  8. The player skin fails to load.

Expected result

Custom player head would show its skin after internet connection is restored.