Minecraft-Console-Client icon indicating copy to clipboard operation
Minecraft-Console-Client copied to clipboard

[BUG] Docker container starting/keeping bot online problems

Open Art0sh opened this issue 3 years ago • 2 comments

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=true in config to diagnose my issue
  • [X] I have redacted session tokens and passwords before attaching screenshots

Minecraft Version

1.18.1 / 1.16.4

Console Client Version

Latest

Expected Behavior

Using "docker start mcc-kawaii" (Thats my name for the docker container) should start the bot and keep it running

Actual Behavior

Using named command, it starts the bot and crashes it almost immediately with almost no error/stacktrace

Steps to Reproduce the bug

  1. Create Container using the readme
  2. Set up the MinecraftClient.ini with login data and a server to connect to (Server is 1.18.1 but I try connecting using 1.16.4, because Inventory handling)
  3. Start the docker container
  4. Observe how the bot manages to connect to the server for a second, just to disconnect shortly after joining

Attach screenshot here (If applicable)

No response

Anythings that could help diagnosing the bug

I started the container using "docker start mcc-kawaii && mcc-kawaii > docker_attached.log" 
to get an idea why it is crashing, but all I got was an almost completely empty log file.
I'll put two pastebin links here. 
One with ALL the lines in it (~14500 but almost completely empty, but maybe theres just stuff I just cant see?) 
and one with the "empty" lines removed.
1. Full: https://pastebin.com/tWETMUgm
2. Cleared: https://pastebin.com/tg6GZrKB

Device

VPS

Operating System

Linux

Server Address (If applicable)

No response

Art0sh avatar Feb 06 '22 21:02 Art0sh

According to your log file:

Stack overflow in unmanaged: IP: 0x5573ab431beb, fault addr: 0x7f8186208fc8 Stack overflow: IP: 0x5573ab431beb, fault addr: 0x7f81861fffc8

I'd say the error occurs outside MCC, directly in Mono. I think that it is most likely happening in the terminal manipulation feature, e.g. when trying to move the cursor. If you plan to run your container unattended, I'd suggest to disable terminal formatting; try BasicIO or BasicIO-NoColor as last argument when launching MCC.

To do this, try editing start-latest.sh to edit the launch arguments:

mono MinecraftClient.exe BasicIO-NoColor

Then rebuild the Docker image and test if it's more stable. If you need formatting because you use it interactively, I'd suggest to install Mono and run it manually.

ORelio avatar Feb 06 '22 21:02 ORelio

Thanks for the quick response. Yes, I wanted to leave it unattended and restart it using cron. Tasks and remote control will do just fine. Thats just when I found out about these crashing problems. And for the fix: Just tried, looks like that did the trick. Bot stays online, no crashes for now 👍🏻

Art0sh avatar Feb 06 '22 22:02 Art0sh

Since Mono is no longer used and the docker image was updated recently, take a look at our new docker manual: https://mccteam.github.io/guide/installation.html#using-docker Everything should work correctly. NOTE: Read the warnings on proper usage for Docker on the documentation page.

I'll be closing the issue, if you experience any problems with the latest build, open a new issue.

milutinke avatar Sep 17 '22 19:09 milutinke