Grasscutters / Grasscutter

A server software reimplementation for a certain anime game.
https://grasscutter.io/
GNU Affero General Public License v3.0
16.21k stars 4.47k forks source link

[Bug] Linux install script bombs out while running (install.sh) #1690

Open SoftwareGuy opened 2 years ago

SoftwareGuy commented 2 years ago

Did you look for other closed issues that have the same problem?

Yes.

Describe the bug

When running the linux installer, it will silently exit after a certain step in the Bash script. Removing some -q parameters allows the script to reveal what it's doing.

Please refer to the additional context below.

Which branch did you use? Git master (development)

Screenshots N/A

Additional context It seems that line 175 is potentially problematic. The code there is:

# Download and rename jar
wget --show-progress "https://nightly.link/Grasscutters/Grasscutter/workflows/build/$BRANCH/Grasscutter.zip"
echo "unzipping"
unzip -qq Grasscutter.zip
mv $(find -name "grasscutter*.jar" -type f) grasscutter.jar

However, the mv command can throw an error that says:

mv: target 'grasscutter.jar': Not a directory

Then the script seems to just die due to the set -e command earlier in the script. Working around this, it gets up to download the resources for 2.7 (not 2.8). This causes an error as well (installer lines starting 178):

Downloading resources... (this will take a moment)
--2022-08-23 11:25:36--  https://github.com/Koko-boya/Grasscutter_Resources/archive/refs/heads/main.zip
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving github.com (github.com)... 20.248.137.48
Connecting to github.com (github.com)|20.248.137.48|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/Koko-boya/Grasscutter_Resources/zip/2.7 [following]
--2022-08-23 11:25:37--  https://codeload.github.com/Koko-boya/Grasscutter_Resources/zip/2.7
Resolving codeload.github.com (codeload.github.com)... 20.248.137.55
Connecting to codeload.github.com (codeload.github.com)|20.248.137.55|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2022-08-23 11:25:37 ERROR 404: Not Found.

Changing this to:

# Download resources
echo "Downloading resources... (this will take a moment)"
wget --show-progress https://github.com/Koko-boya/Grasscutter_Resources/2.8.zip -O resources.zip
echo "Extracting..."
unzip -qq resources.zip
mv ./Grasscutter_Resources-2.8/Resources ./resources

Should resolve the issue.... and then my arch linux VM package manager died (stuff about error: GPGME error: No data which is beyond me atm), so I couldn't continue grabbing packages it needed etc.

On that note however, I could attempt a PR to fix this up to assist.

Cheers!

SoftwareGuy commented 2 years ago

tl;dr version of the above ticket is the linux install scripts need some TLC.