Spigot Error: Invalid or corrupt jarfile

Hello. Im not sure if this is the right place to post this so sorry if its not. I am unable to get spigot to work but i have managed to get vanilla and forge to work. I have googled but did not find anything helpful
When ever i got to the spigot tab and press build spigot(1.16.1) "BuildTools jar compilation failed
Error undefined (undefined): undefined’ pops up.

Output From BuildTools.Jar:Error:
Invalid or corrupt jarfile /var/games/minecraft/profiles/spigot_1.16.1/BuildTools.jar

From /var/log
{“level”:“error”,“message”:“stderr: Error: Invalid or corrupt jarfile /var/games/minecraft/profiles/spigot_1.16.1/BuildTools.jar\n”,“timestamp”:“2020-07-31T02:51:12.170Z”}
{“level”:“info”,“message”:"[WEBUI] BuildTools jar compilation finished unsuccessfully in /var/games/minecraft/profiles/spigot_1.16.1",“timestamp”:“2020-07-31T02:51:12.172Z”}
{“level”:“info”,“message”:"[WEBUI] Buildtools used: /var/games/minecraft/profiles/spigot_1.16.1/BuildTools.jar",“timestamp”:“2020-07-31T02:51:12.172Z”}
{“level”:“error”,“message”:“Unable to retrieve profile: bungeecord. The definition for this profile may be improperly formed or is pointing to an invalid URI.”,“timestamp”:“2020-07-31T02:51:33.987Z”}
{“level”:“error”,“message”:“Unable to retrieve profile: spongevanilla. The definition for this profile may be improperly formed or is pointing to an invalid URI.”,“timestamp”:“2020-07-31T02:51:33.989Z”}
{“level”:“error”,“message”:“Unable to retrieve profile: cuberite. The definition for this profile may be improperly formed or is pointing to an invalid URI.”,“timestamp”:“2020-07-31T02:51:33.990Z”}

Thats just a piece of the log, i can post the whole thing if needed but dont want to fill the entire page up


I went ahead and created a spigot server outside of mineos, zipped it, and put it in /var/games/minecraft/import



From mineos log:
{“command”:“create_from_archive”,“new_server_name”:“KcrewClub”,“filename”:“Spigot.rar”,“awd_dir”:null,“level”:“info”,“message”:"[WEBUI] Received emit command from IP:mc",“timestamp”:“2020-07-31T19:35:47.569Z”}
{“command”:“create_from_archive”,“new_server_name”:“KcrewClub”,“filename”:“Spigot.rar”,“awd_dir”:null,“level”:“info”,“message”:"[WEBUI] Received emit command from IP:mc",“timestamp”:“2020-07-31T19:37:29.958Z”}
Even after doing all that it still isn’t in my server list (yes i refreshed it)

I go it working by replacing the jar in the server folder

Yea this is a common problem seems you have found the same solution as I did in a previous post found here: Error 1020 when download latest Spigot BuildTools

Edit: Read through that too quick but you have a solution for a better solution I would advise following the above which fixes the whole buildtools situation

1 Like

Thanks for the reply.
I checked out the link.
“You will need to go to “/var/games/minecraft/profiles/BuildTools-latest” on the server and then delete the files in that folder (should only be the corrupt BuildTools.jar)”
That was the first thing i had thought of and did but since it didn’t work for me i didn’t bother to post that step

I am also having this issue at the moment, from what I’ve discovered when you click download it should build a folder within the /var/games/minecraft/profiles/ for whatever build you choose

for example, if you download spigot 1.16.1 from the webui, you should see a folder in /profiles labeled spigot_1.16.1- inside that should be apache-maven, BuildData, Bukkit, CraftBukkit, Spigot, work, BuildTools.jar, BuildTools.log and Spigot.

What’s happening for me is it is creating the spigot_1.16.1 folder, but it only downloads the BuildTools.jar and it is only 1kb.

Right now, the only thing I’ve been able to do is manually create the spigot_1.16.1 folder in /profiles. Then downloading the https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar into that folder (or whatever version you’re looking for). From there the webui is still able to copy that folder into your created server build and run.

At least that’s the workaround that I found until this issue is resolved.

cd /var/games/minecraft/profiles/BuildTools-latest/
mv BuildTools.jar BuildTools.jar_b
wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar