CraftTweaker

CraftTweaker

151M Downloads

CraftTweaker being present on the server AT ALL causes java.util.zip.ZipException: invalid entry CRC (expected 0x3af28b75 but got 0xea5b59e2)

Roadhog360 opened this issue ยท 19 comments

commented

Issue description

Note: This is possibly a Linux-specific issue, and a very rare one at that. I've asked in r/feedthebeast's Discord but they just suggested to go here, even though I'm pretty sure this will be closed as 'cannot reproduce' and is not an issue with the mod, rather the mod is likely exposing another issue and isn't doing anything wrong. However since they insist on using their Discord for support, which since this error is rare and not many people have seen it probably, it gets immediately buried because I they deleted my attempt to ask in their Subreddit where it wouldn't be drowned out. My apolgies, I've basically run out of places to ask about this and am desperate to solve it.

This error happens with CraftTweaker installed on my server AT ALL, whatsoever. No matter what mods I remove, even all of them, if CraftTweaker is there, so is this error. Works just fine on my home computer when I run the client.
I've redownloaded the mod, checked multiple ways for jar corruption, tried copying it directly from my computer, making sure the hash is the same, updating the entire system (it was on a pretty old release of Ubuntu but I updated it hoping for a fix) and even tried re-downloading Forge's libraries, nothing worked.

I've Googled this error to hell and back and I found very few results overall, apparently this might have to do with zlib but I tried updating it to no avail. This mod is the core necessity of my pack and I'm on the cusp of just giving up and cancelling it. I'm baffled at how this can run on my computer fine but when I try starting it on my server machine it just refuses to run and spits out this absolutely cryptic error.

Steps to reproduce

  1. Install on a modded Forge server
  2. Wait for it to crash
  3. Profit

Script used

none

The crafttweaker.log file

none

Minecraft version

1.16

Modloader

Forge

Modloader version

36.2.34

CraftTweaker version

7.1.2.511

Other relevant information

Java on both systems is at 1.8.0_342. Ubuntu is 20.04 on both systems, zlib1g on both systems is (1:1.2.11.dfsg-2ubuntu1.3)

The latest.log file

https://pastebin.com/KF0zRCLQ

commented

Okay, so from the Stacktrace I can at least tell you this:
While booting, ZenCode (the scripting Engine) loads the StdLibs.jar from CraftTweaker's Classpath (that file is bundled within the CraftTweaker Jar).

Then, ZenCode opens that Jar file and loads all entries within the StdLibs.jar archive into memory.
While doing this, it errors due to an entry having an incorrect Checksum.
Usually, this points to an invalid zip archive, though it puzzles me that it would work for one OS and not for another then...

When you say you made sure that the CRCs match, did you also check the StdLibs.jar file, or only the CraftTweaker.jar?
Have you checked if the issue persists with an older version of CraftTweaker?
Do you have any other Linuxoid systems where you could test (if so, is it reproducable there as well)?

commented

Running the server on my home computer seems to work. For trying old versions of CraftTweaker, what do you suggest I try first?

commented

I only checked the CraftTweaker jar itself, but if their sums match, that must mean the files inside also match.
I checked just 1.2.510 but no other older version. There are a daunting amount of releases before it and I don't have the energy to sift through all of them right now.
The server and my home PC are the only two Linux systems I own. I can try to see what happens if I run the jar on a server on my PC.

@kindlich

Okay, so from the Stacktrace I can at least tell you this: While booting, ZenCode (the scripting Engine) loads the StdLibs.jar from CraftTweaker's Classpath (that file is bundled within the CraftTweaker Jar).

Then, ZenCode opens that Jar file and loads all entries within the StdLibs.jar archive into memory. While doing this, it errors due to an entry having an incorrect Checksum. Usually, this points to an invalid zip archive, though it puzzles me that it would work for one OS and not for another then...

When you say you made sure that the CRCs match, did you also check the StdLibs.jar file, or only the CraftTweaker.jar? Have you checked if the issue persists with an older version of CraftTweaker? Do you have any other Linuxoid systems where you could test (if so, is it reproducable there as well)?

commented

I really promised I'd launch my server for my friends today and the crash still refuses to go away. Is my only option for now painstakingly replacing the entire script I have with a massive datapack?

commented

How are you transferring the mod to the server? No one else has reported this issue and a majority of servers run linux, so I'm not convinced of it being a linux issue (I used to develop the mod on linux and have hosted servers using the mod on linux).

Is there anything else about your environment that could be a bit, non conventional?

commented

Using Ubuntu's built-in file explorer, Nautilus, I simply connect to the server through SFTP, and copy it over. My environmental is pretty normal as far as I'm aware, I can't really think of anything off.

I've copied it via CTRL+C and CTRL+V, and drag and drop with right click, neither made a difference.

commented

try

wget https://maven.blamejared.com/com/blamejared/crafttweaker/CraftTweaker-1.16.5/7.1.2.511/CraftTweaker-1.16.5-7.1.2.511.jar
commented

Still same error.

commented

Yea I'm not sure what to say here, I know these files are good, a quick google reveals that it could be a zlib issue, try downgrade it as suggested here?

https://stackoverflow.com/a/71771437

commented

I tried that before posting this issue, but that command is for Arch Linux, and I couldn't find out what to put for Ubuntu's apt-get. I'm also not convinced it's zlib either because my home PC is using the same version and it was able to start the server fine.

commented

As this comment says:
https://stackoverflow.com/a/71912756
They suspect it has to do with the cpu type, what does your home pc use and what does the server use?

commented

4-core Intel(R) Xeon(R) CPU L5420 @ 2.50GHz on the server

6-core Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz at home

I can share the entire output of more /proc/cpuinfo if needed.

commented

What is the output of apt list | grep zlib on the server?

commented
clisp-module-zlib/focal 1:2.49.20180218+really2.49.92-3build3 amd64
erlang-p1-zlib/focal 1.0.6-2 amd64
gambas3-gb-compress-bzlib2/focal 3.14.3-2ubuntu3.1 amd64
gambas3-gb-compress-zlib/focal 3.14.3-2ubuntu3.1 amd64
gauche-zlib/focal 0.9.6-10build1 amd64
libcompress-raw-zlib-perl/focal 2.093-1 amd64
libghc-bzlib-dev/focal 0.5.0.5-8build1 amd64
libghc-bzlib-doc/focal,focal 0.5.0.5-8build1 all
libghc-bzlib-prof/focal 0.5.0.5-8build1 amd64
libghc-pipes-zlib-dev/focal 0.4.4.2-2build1 amd64
libghc-pipes-zlib-doc/focal,focal 0.4.4.2-2build1 all
libghc-pipes-zlib-prof/focal 0.4.4.2-2build1 amd64
libghc-zlib-bindings-dev/focal 0.1.1.5-9build1 amd64
libghc-zlib-bindings-doc/focal,focal 0.1.1.5-9build1 all
libghc-zlib-bindings-prof/focal 0.1.1.5-9build1 amd64
libghc-zlib-dev/focal 0.6.2-2build1 amd64
libghc-zlib-doc/focal,focal 0.6.2-2build1 all
libghc-zlib-prof/focal 0.6.2-2build1 amd64
libgnatcoll-zlib1-dev/focal 19-2 amd64
libgnatcoll-zlib1/focal 19-2 amd64
libjzlib-java/focal,focal 1.1.3-2 all
librte-pmd-zlib20.0/focal-updates,focal-security 19.11.12-0ubuntu0.20.04.1 amd64
librust-zip+deflate-zlib-dev/focal 0.5.3-2 amd64
lua-zlib-dev/focal 1.2-1 amd64
lua-zlib/focal 1.2-1 amd64
node-browserify-zlib/focal,focal 0.2.0+20170820git8b3f0a862f6b+dfsg-3 all
r-bioc-zlibbioc/focal,focal 1.32.0+dfsg-1 all
zlib-gst/focal 3.2.5-1.3build3 amd64
zlib-gst/focal 3.2.5-1.3build3 i386
zlib1g-dev/focal-updates,focal-security 1:1.2.11.dfsg-2ubuntu1.3 amd64
zlib1g-dev/focal-updates,focal-security 1:1.2.11.dfsg-2ubuntu1.3 i386
zlib1g/focal-updates,focal-security 1:1.2.11.dfsg-2ubuntu1.3 amd64 [upgradable from: 1:1.2.11.dfsg-2ubuntu1]
zlib1g/focal-updates,focal-security 1:1.2.11.dfsg-2ubuntu1.3 i386
zlibc/focal 0.9k-4.3 amd64
commented

Okay so, there is nothing I can do to remedy this, from the looks of it, zlib is having issues with their crc32 stuff:
https://github.com/madler/zlib/issues?q=invalid+entry+CRC
more specifically
madler/zlib#613

This isn't related to CraftTweaker itself, even the issue report for it on the arch linux bug tracker mentions Fabric itself being broken: https://bugs.archlinux.org/task/74371

However for them apparently downgrading to 1.2.11 works, but I believe you are already using 1.2.11, I suspect that the 1.2.11 you have installed is different than the 1.2.11 that arch has.

zlib has fixed this though, they just need to make a new release, which from the looks of it, they are dragging their feet on doing.

The only option I can suggest would be to build the latest version from source, or try downgrade to the next available package version, unfortunately I can't help you with that as I don't know your machine, and you really shouldn't trust commands given to you by strangers on the internet (Also I don't want to be blamed if you accidentally run rm -rf /).

I'm sorry this isn't the outcome you probably wanted, but there really isn't anything I can do here, so I'm going to be closing this.

commented

For installing specific versions:

https://askubuntu.com/a/428778

I am not sure how you would find older versions to install unfortunately, I did a bit of googling on that before and didn't come up with much.

I think installing from source may be your best bet, otherwise you could try running the server in a docker container? Could potentially work

commented

I understand. Every other time I tried to post about this people wouldn't listen to me when I said I was positive this wasn't an issue on your end, I posted here because I knew it would eventually come to this and I'd have proof it's not your problem. I thank you for everything you've suggested. You've further built my case that it's not your fault.

I asked on a Reddit thread how to downgrate and apt-get does not host older versions of packages, and Ubuntu can't run pacman, and I don't have any on hand. I guess the next million-dollar question is how to downgrade on Ubuntu, or how to build and install the new version.

commented

I'll give the docker container an attempt. I remember someone had a guide for Minecraft servers in Docker, got a link to that?
I remember it tried for the latest vanilla version. Do you know how to make it run 1.16.5 Forge? And will I need to move the server's files to some other folder, or can the Docker container simply run everything from the same folder I have everything in now?