You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Exception when running ConsoleInteractive in a Docker environment #9
On a Docker Environment, Console.BufferWidth and Console.BufferHeight both return 0.
This causes some internal math logic for cursor positioning in InternalContext to go awry.
The fix for this is on a similar vein as #8, as .NET recognizes that the input/output is being redirected and thus requires the use of Console.IsInputRedirected and Console.IsOutputRedirected.
Try using the method for detecting docker environment and setting some arbitrary screen size manually so we can test it out. My guess it that it's gonna fix it.
Eg. something like 120x300
With this changes I was managed to get MinecraftClietn work in container (docker-compose + portainer)
Diff
But I see another issue with logging PrintUserInput it looks broken (or it just log binary) here is snippet
MinecraftClient output
Two questions:
1. Is anyone still interested in the solution?
2. Any insights about those Input logs, should they be fixed?
Yeah, I know, i've tried going down the rabbit hole, there is a problem after problem, I gave up on it.
You can see my fork and maybe you will get some ideas.
Yeah, I know, i've tried going down the rabbit hole, there is a problem after problem, I gave up on it.
You can see my fork and maybe you will get some ideas.
@milutinke Thanks for the response, but just to be on the same page, you also managed to fix the crash?
Right now I'm just trying understand why those suspicious logging statement Input: .... appears only in portainer, I don't see them when I run it locally with docker run -it ...
Yeah, I know, i've tried going down the rabbit hole, there is a problem after problem, I gave up on it.
You can see my fork and maybe you will get some ideas.
@milutinke Thanks for the response, but just to be on the same page, you also managed to fix the crash?
Right now I'm just trying understand why those suspicious logging statement Input: .... appears only in portainer, I don't see them when I run it locally with docker run -it ...
Maybe you have an idea about those Input: ....?
Yeah, we ran into the same issues.
My diff: 8381eeb
PS: Can't remember if I have done more than there is here, maybe i have but didn't commit, I do not remember.
If you can make a pull request with the changes, that would be great.
I've gained some motivation to continue working on MCC, so I'm planning to rewrite the entirety of the library (and hopefully migrate all the console legwork from MCC to this library, as it currently stands, MCC still does the majority of the color and vtcode work, and that should be thrown here instead) and this would be a good hotfix while I do that.
Activity
milutinke commentedon Sep 10, 2022
Try using the method for detecting docker environment and setting some arbitrary screen size manually so we can test it out. My guess it that it's gonna fix it.
Eg. something like 120x300
CAMOBAP commentedon Sep 22, 2023
@milutinke unfortunately
Console.SetBufferSizewill not work. This call will throw:There is a similar issue reported for MacOS dotnet/runtime#27216
With this changes I was managed to get MinecraftClietn work in container (docker-compose + portainer)
Diff
But I see another issue with logging
PrintUserInputit looks broken (or it just log binary) here is snippetMinecraftClient output
Two questions:
milutinke commentedon Sep 22, 2023
Yeah, I know, i've tried going down the rabbit hole, there is a problem after problem, I gave up on it.
You can see my fork and maybe you will get some ideas.
CAMOBAP commentedon Sep 22, 2023
@milutinke Thanks for the response, but just to be on the same page, you also managed to fix the crash?
Right now I'm just trying understand why those suspicious logging statement
Input: ....appears only in portainer, I don't see them when I run it locally withdocker run -it ...Maybe you have an idea about those
Input: ....?milutinke commentedon Sep 22, 2023
Yeah, we ran into the same issues.
My diff: 8381eeb
PS: Can't remember if I have done more than there is here, maybe i have but didn't commit, I do not remember.
breadbyte commentedon Sep 23, 2023
This output looks like it might be VT100 codes.
Turn these settings on in MCC, it might help.
CAMOBAP commentedon Sep 24, 2023
@breadbyte thanks for the support
Looks like
Enable_Color = falseDisplay_Input = falsedid the trick for me, but I don't really understand consequence of this configFrom one of it I don't see anymore command which I type but I see suggestion "menu"
Anyway for my needs now it works perfectly thanks @breadbyte @milutinke
For the record:
vt100_*codes works perfectly in portainerUPD. it was
Display_Input = falsemilutinke commentedon Sep 24, 2023
Awesome
You can open a pull request, so others can use this in docker
CAMOBAP commentedon Sep 24, 2023
@milutinke sure, sorry I misunderstood your response in #9 (comment)
I thought you resolved the crash and have only issues with strange
Input...logsWill prepare PR soon
breadbyte commentedon Sep 24, 2023
If you can make a pull request with the changes, that would be great.
I've gained some motivation to continue working on MCC, so I'm planning to rewrite the entirety of the library (and hopefully migrate all the console legwork from MCC to this library, as it currently stands, MCC still does the majority of the color and vtcode work, and that should be thrown here instead) and this would be a good hotfix while I do that.
CAMOBAP commentedon Sep 24, 2023
@breadbyte thanks you and all contributors for the hard work
Here is the PR #23, I'm not sure about the approach in general, but I can confirm that it works for me (tested more than 12h in a row, mostly for AFK)
breadbyte commentedon Sep 24, 2023
Update was pushed to MCC MCCTeam/Minecraft-Console-Client@911908b