File corruption when downloading from SpigotMC?

Discussion in 'Server & Community Management' started by PikaMug, Mar 26, 2020.

  1. Hello all,

    A sole French user of one of my premium plugins is seeing the file size shrink when downloading from this website. The actual file size is ~137 kB, but when they download with either Firefox or Chrome, it ends up being ~127 kB:


    This seems to cause at least one error during runtime, rendering the jar useless. My resource does not currently obfuscate, but I noticed there were recent updates to those guidelines and am wondering if an associated site change may be responsible for this corruption. Can anyone point me in the right direction?

    Note: In a correctly formed jar, the method does, in fact, exist. Here it is online at

    [10:19:24] [Server thread/INFO]: magicprog issued server command: /quests editor
    [10:19:25] [Server thread/ERROR]: Could not pass event QuestsEditorPostOpenStringPromptEvent to QuestsGUI v0.11
    java.lang.NoSuchMethodError: 'net.wesjd.anvilgui.AnvilGUI$Builder net.wesjd.anvilgui.AnvilGUI$Builder.onClose(java.util.function.Consumer)'
    at me.pikamug.questsgui.editor.quests.questsfactory.SelectCreateGUI.showInventory( ~[?:?]
    at me.pikamug.questsgui.listeners.QuestsListener.onQuestsPostOpenStringPrompt( ~[?:?]
    at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor391.execute(Unknown Source) ~[?:?]
    at org.bukkit.plugin.EventExecutor.lambda$create$1( ~[patched_1.15.2.jar:git-Paper-133]
    at co.aikar.timings.TimedEventExecutor.execute( ~[patched_1.15.2.jar:git-Paper-133]
    at org.bukkit.plugin.RegisteredListener.callEvent( ~[patched_1.15.2.jar:git-Paper-133]
    at org.bukkit.plugin.SimplePluginManager.callEvent( ~[patched_1.15.2.jar:git-Paper-133]
    at me.blackvein.quests.QuestFactory$QuestSelectCreatePrompt.getPromptText( ~[?:?]
    at org.bukkit.conversations.Conversation.outputNextPrompt( ~[patched_1.15.2.jar:git-Paper-133]
    at org.bukkit.conversations.Conversation.acceptInput( ~[patched_1.15.2.jar:git-Paper-133]
    at org.bukkit.craftbukkit.v1_15_R1.conversations.ConversationTracker.acceptConversationInput( ~[patched_1.15.2.jar:git-Paper-133]
    at org.bukkit.craftbukkit.v1_15_R1.entity.CraftPlayer.acceptConversationInput( ~[patched_1.15.2.jar:git-Paper-133]
    at me.pikamug.questsgui.editor.quests.questsfactory.QuestMenuGUI.onGUIClick( ~[?:?]
    at me.pikamug.questsgui.listeners.PlayerListener.onInventoryClick( ~[?:?]
    at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor386.execute(Unknown Source) ~[?:?]
    at org.bukkit.plugin.EventExecutor.lambda$create$1( ~[patched_1.15.2.jar:git-Paper-133]
    at co.aikar.timings.TimedEventExecutor.execute( ~[patched_1.15.2.jar:git-Paper-133]
    at org.bukkit.plugin.RegisteredListener.callEvent( ~[patched_1.15.2.jar:git-Paper-133]
    at org.bukkit.plugin.SimplePluginManager.callEvent( ~[patched_1.15.2.jar:git-Paper-133]
    at net.minecraft.server.v1_15_R1.PlayerConnection.a( ~[patched_1.15.2.jar:git-Paper-133]
    at net.minecraft.server.v1_15_R1.PacketPlayInWindowClick.a(SourceFile:32) ~[patched_1.15.2.jar:git-Paper-133]
    at net.minecraft.server.v1_15_R1.PacketPlayInWindowClick.a(SourceFile:10) ~[patched_1.15.2.jar:git-Paper-133]
    at net.minecraft.server.v1_15_R1.PlayerConnectionUtils.lambda$ensureMainThread$0( ~[patched_1.15.2.jar:git-Paper-133]
    at ~[patched_1.15.2.jar:git-Paper-133]
    at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeTask( ~[patched_1.15.2.jar:git-Paper-133]
    at net.minecraft.server.v1_15_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.15.2.jar:git-Paper-133]
    at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeNext( ~[patched_1.15.2.jar:git-Paper-133]
    at ~[patched_1.15.2.jar:git-Paper-133]
    at net.minecraft.server.v1_15_R1.MinecraftServer.executeNext( ~[patched_1.15.2.jar:git-Paper-133]
    at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeAll( ~[patched_1.15.2.jar:git-Paper-133]
    at net.minecraft.server.v1_15_R1.MinecraftServer.a( ~[patched_1.15.2.jar:git-Paper-133]
    at ~[patched_1.15.2.jar:git-Paper-133]
    at [?:?]

    As it would appear in a non-corrupted jar:
    Code (Java):
    package me.pikamug.questsgui.editor.quests.questsfactory;

    import org.bukkit.Bukkit;
    import org.bukkit.Material;
    import org.bukkit.conversations.Conversable;
    import org.bukkit.conversations.ConversationContext;
    import org.bukkit.entity.Player;
    import org.bukkit.inventory.ItemStack;
    import org.bukkit.scheduler.BukkitRunnable;
    import org.bukkit.scoreboard.DisplaySlot;
    import org.bukkit.scoreboard.Objective;
    import org.bukkit.scoreboard.Score;
    import org.bukkit.scoreboard.Scoreboard;

    import me.blackvein.quests.Quest;
    import me.blackvein.quests.QuestFactory;
    import me.blackvein.quests.Quests;
    import me.blackvein.quests.util.Lang;
    import me.pikamug.questsgui.QuestsGUI;
    import net.md_5.bungee.api.ChatColor;
    import net.wesjd.anvilgui.AnvilGUI;

    public class SelectCreateGUI extends QuestFactory {
        private final ConversationContext context;
        private final QuestsGUI plugin;
        private final Quests quests;
        private Material firstSlot;
        private String text = "Enter quest name";
        private int pageLimit = 0;
        private boolean below114;
        public SelectCreateGUI(QuestsGUI plugin, Quests quests, ConversationContext context) {
            this.plugin = plugin;
            this.context = context;
            this.quests = quests;
            firstSlot = plugin.questsSelectCreateAnvilFirstSlot;
            text = plugin.questsSelectCreateAnvilText;
            pageLimit = plugin.questsSelectCreateAnvilScoreboardLimit;
            below114 = plugin.isBelow114();
        public void showInventory() {
            Conversable c = (Conversable)context.getForWhom();
            new AnvilGUI.Builder()
            .onClose(player -> {               // <-- Line 84
            .onComplete((player, text) -> {    //called when the inventory output slot is clicked
                try {
                    if (pageLimit > 0) {
                        board.getObjective(ChatColor.YELLOW + Lang.get("quests") + ":").unregister();
                } catch (Exception e) {
                    // Fail silently
                new BukkitRunnable() {
                    public void run() {
                  }.runTaskLater(plugin, 20);
                return AnvilGUI.Response.close();
            .preventClose()                 //prevents the inventory from being closed
            .text(below114 ? text : " ")    //sets the text the GUI should start with
            .item(new ItemStack(firstSlot)) //use a custom item for the first slot
            .title(below114 ? "" : text)    //set the title of the GUI (only works in 1.14+)
            .plugin(plugin)                 //set the plugin instance
            .open((Player)c);               //opens the GUI for the player provided
    #1 PikaMug, Mar 26, 2020
    Last edited: Mar 27, 2020
  2. Have you tried to reupload the jar file?
  3. @jessegeerts No, because it isn't happening for anyone else - just this one user. Although, I'm open to trying it if you think that'd help.
  4. Have him open it with WinRAR, then push the 'Test' button. See if any errors are reported.
  5. As this is only the one person experiencing the problem, I would question their Intenet connection quality.
  6. I doubt that's coming from my connection
  7. Tried that, no error.
  8. Then the file is fine. The problem is with his computer or server.
  9. Formal disclosure that @ghorg12110 is the client.

    @Bobcat00 Thanks for your input, but all that command does is perform a dummy extraction with no output (source). So while it's not corrupted in the sense of being beyond extraction, the file has still mysteriously lost ~10 kB between clicking "Download Now" and reaching their download window. I should also state that no-one else, including myself, is able to replicate the error they're getting with a properly formed jar. As you said, it could be a problem with their computer, but given they've tried two separate browsers, I'm partial to opening a ticket on JIRA. However, I'll be updating the resource shortly, so we'll first see it's specific to that jar.
  10. Cannot reproduce, files from free and premium resources download just fine. Stuff from 6 months ago as well as recently updated jar files.

    Tried on iOS to Files export, Opera on macOS and Chrome in win10 on virtualbox.
  11. Disable his anti-virus.

    Run the server with a minimal set of plugins.

    Have him send the downloaded file back to you, and you compare the contents of the jar files.