Minecraft-Console-Client
Minecraft-Console-Client copied to clipboard
[BUG] Docker is broken since 20220816-25, because it does not ship a MinecraftClient.exe anymore
Prerequisites
- [X] I made sure I am running the latest development build
- [X] I tried to look for similar issues before opening a new one
- [X] I have set
debugmessages=truein config to diagnose my issue - [X] I have redacted session tokens and passwords before attaching screenshots
Minecraft Version
n/a
Console Client Version
20220816-25+
Expected Behavior
Running the docker container minecraft-console-client:latest (manually or via the docker-compose file within the repo) should start up the latest linux-release of the MCC in a docker container.
Actual Behavior
I get the following output:
sudo docker compose build; sudo docker compose up
[+] Running 2/2
⠿ Network docker_default Created 0.1s
⠿ Container MinecraftConsoleClient Created 0.1s
Attaching to MinecraftConsoleClient
MinecraftConsoleClient | % Total % Received % Xferd Average Speed Time Time Time Current
MinecraftConsoleClient | Dload Upload Total Spent Left Speed
100 9 100 9 0 0 38 0 --:--:-- --:--:-- --:--:-- 38
MinecraftConsoleClient | Cannot open assembly 'MinecraftClient.exe': File does not contain a valid CIL image.
MinecraftConsoleClient exited with code 2
Steps to Reproduce the bug
- Checkout current Release
- navigate to "./Docker"
- run
sudo docker compose build; sudo docker compose up
Attach screenshot here (If applicable)
No response
Anythings that could help diagnosing the bug
I assume, that's because the `start-latest.sh` still expects a mono-able `MinecraftClient.exe` to be present as a build-artifact, but now it's a shell-native `MinecraftClient`-file within the artifact `MinecraftClient-linux.zip`.
Device
Other
Operating System
Linux
Server Address (If applicable)
No response
Mono is no longer used, the docker image should be updated to use the dotnet and new builds.
For now you could run it manually with screen, take a look at the documentation on: https://mccteam.github.io/docs/guide/usage.html#linux-macos
I'll take a look at updating it when I can.
@ORelio Accidentally forked the repo (Minecraft-Console-Client-1.19) in the organization instead on to my profile, can you delete it? Sorry for the trouble 😅
@milutinke Deleted. I think you could do it yourself, too.
@milutinke Deleted. I think you could do it yourself, too.
Nope, I don't have a permission. Thanks.
Fixed the image to use .NET, but I have a problem with Console Interactive
Unhandled exception. System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension. (Parameter 'top')
Actual value was -1.
at System.Console.SetCursorPosition(Int32 left, Int32 top)
at ConsoleInteractive.InternalContext.SetLeftCursorPosition(Int32 leftPos)
at ConsoleInteractive.ConsoleBuffer.ClearCurrentLine()
at ConsoleInteractive.InternalWriter.Write(String value)
at ConsoleInteractive.InternalWriter.WriteLine(String value)
at ConsoleInteractive.ConsoleWriter.WriteLine(String value)
at MinecraftClient.ConsoleIO.WriteLine(String line)
at MinecraftClient.Program.Main(String[] args)
Aborted
@breadbyte Could you take a look into this?
Dockerfile:
# Using the .NET official image for .NET 6.0
FROM mcr.microsoft.com/dotnet/sdk:6.0
# Copy over the script and give it execution permissions
COPY --chmod=0755 start-latest.sh /opt/start-latest.sh
RUN apt-get update && \
apt-get install -y jq && \
apt-get install -y unzip && \
mkdir /opt/data
ENTRYPOINT ["/bin/sh", "-c", "/opt/start-latest.sh"]
start-latest.sh
#!/bin/sh
cd /opt/data || exit 1
# Get latest release tag
RELEASE_TAG=$(curl -s -v https://github.com/MCCTeam/Minecraft-Console-Client/releases/latest 2>&1 | grep -i location: | tr -d '\r' | cut -d/ -f8)
# Download latest version
curl -L https://github.com/MCCTeam/Minecraft-Console-Client/releases/download/${RELEASE_TAG}/MinecraftClient-linux.zip --output MinecraftClient-linux.zip
# Unzip it
unzip MinecraftClient-linux.zip
# Remove the ZIP
rm MinecraftClient-linux.zip
# Start the Client
./MinecraftClient
PS: Also tried an image that builds from the source code, got the same result. The base image for .NET image is a Debian 11. Tried making a whole new image from Arch and Alpine, just to determine if it was not a problem with this image, got the same results.
Question: when you touch the dockerfile&script anyway, wouldn't it be nice to be able to pin the mcc version with some .env variable?
Question: when you touch the dockerfile&script anyway, wouldn't it be nice to be able to pin the mcc version with some .env variable?
That would be easy to add.
In the Dockerfile:
ENV MCC_VERSION=custom version here
Example: MCC_VERSION=20220817-29
And then in the start-latest.sh:
RELEASE_TAG=${MCC_VERSION:-$(curl -s -v https://github.com/MCCTeam/Minecraft-Console-Client/releases/latest 2>&1 | grep -i location: | tr -d '\r' | cut -d/ -f8)}
@mmodrow Got it working, check out the #2112
@breadbyte Could you take a look into this?
Will take a look at it when I get the chance. Currently have my hands full at the moment.
Glad to know you've gotten it to work though.
@breadbyte Could you take a look into this?
Will take a look at it when I get the chance. Currently have my hands full at the moment.
Glad to know you've gotten it to work though.
It randomly started working for me on Windows, but seems that other people still experience it.
Since we have merged and added warnings to the documentation, I'll be closing this issue. There is a separate issue on the ConsoleInteractive bug in that repo. Thanks for the help with testing.