MrLetsplay2003 / ShittyAuthServer

Host your own (shitty) authentication server for Minecraft using the Yggdrasil authentication scheme
12 stars 5 forks source link

Uploading a Skin is not possible #5

Closed x0rp01s0n closed 1 year ago

x0rp01s0n commented 1 year ago

Problem: When uploading a skin, i get Malformed request.

What i did yet: Fresh setup with MariaDB, created admin account setup https -> working, created minecraft account with admin account, uploaded skin -> malformed request same when trying to upload a cape. also tryed the same without ssl, same result.

backend log:

MoTTY X11 proxy: Unsupported authorisation protocol
java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at me.mrletsplay.webinterfaceapi.page.action.ActionHandler.handle(ActionHandler.java:28)
        at me.mrletsplay.webinterfaceapi.page.action.WebinterfaceActionHandlers.handle(WebinterfaceActionHandlers.java:13)
        at me.mrletsplay.webinterfaceapi.document.FileUploadDocument.createContent(FileUploadDocument.java:47)
        at me.mrletsplay.simplehttpserver.http.HttpConnection.receive(HttpConnection.java:100)
        at me.mrletsplay.simplehttpserver.http.HttpConnection.lambda$startRecieving$0(HttpConnection.java:53)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class java.awt.GraphicsEnvironment$LocalGE
        at java.desktop/java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:129)
        at java.desktop/java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1181)
        at me.mrletsplay.shittyauth.webinterface.ShittyAuthWIHandler.uploadSkin(ShittyAuthWIHandler.java:64)
        ... 14 more
2023-01-31 17:44:06 [pool-3-thread-13 | Webinterface] ERROR: Malformed request
java.lang.reflect.InvocationTargetException: null
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at me.mrletsplay.webinterfaceapi.page.action.ActionHandler.handle(ActionHandler.java:28)
        at me.mrletsplay.webinterfaceapi.page.action.WebinterfaceActionHandlers.handle(WebinterfaceActionHandlers.java:13)
        at me.mrletsplay.webinterfaceapi.document.FileUploadDocument.createContent(FileUploadDocument.java:47)
        at me.mrletsplay.simplehttpserver.http.HttpConnection.receive(HttpConnection.java:100)
        at me.mrletsplay.simplehttpserver.http.HttpConnection.lambda$startRecieving$0(HttpConnection.java:53)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class java.awt.GraphicsEnvironment$LocalGE
        at java.desktop/java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:129)
        at java.desktop/java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1181)
        at me.mrletsplay.shittyauth.webinterface.ShittyAuthWIHandler.uploadSkin(ShittyAuthWIHandler.java:64)
        ... 14 common frames omitted

frontend (browser):

no errors in console, seems like backend to me. image image image

MrLetsplay2003 commented 1 year ago

Looks like you're possibly missing a library the JVM requires to create a graphics environment. According to this post, installing libtinfo5 might fix the issue.

It could also be that you're running a headless JVM that does not provide a graphics environment at all.

x0rp01s0n commented 1 year ago

OK so i solved it by typing: unset DISPLAY before running the server, it seems like java tryed to reach out for a non existing x11 display, also installing the library you provided.