Prerequisites
Minecraft Version
1.16.5
Console Client Version
Latest
Expected Behavior
BasicIO mode should never throw
MCC] Unhandled exception. System.InvalidOperationException: Cannot see if a key has been pressed when either application does not have a console or when console input has been redirected from a file. Try Console.In.Peek.
Actual Behavior
BasicIO is supposed to set to interative mode, yet subprocess breaks.
Following is the offending line
public static void HandleFailure(string? errorMessage = null, bool versionError = false, ChatBots.AutoRelog.DisconnectReason? disconnectReason = null)
{
if (!String.IsNullOrEmpty(errorMessage))
{
ConsoleIO.Reset();
HERE>>>>
while (Console.KeyAvailable)
Console.ReadKey(true);
ConsoleIO.WriteLine(errorMessage);
HandleFailure is called in multiple places but doesn't check for BasicIO.
Steps to Reproduce the bug
- Run MCC Client using python subprocess
- Reach any situation which calls HandleFailure (eg single dash arguments or server offline)
- Code tries to use Console.KeyAvailable and gives error
Attach screenshot here (If applicable)
No response
Anythings that could help diagnosing the bug
Device
None
Operating System
None
Server Address (If applicable)
No response
Prerequisites
debugmessages=truein config to diagnose my issueMinecraft Version
1.16.5
Console Client Version
Latest
Expected Behavior
BasicIO mode should never throw
MCC] Unhandled exception. System.InvalidOperationException: Cannot see if a key has been pressed when either application does not have a console or when console input has been redirected from a file. Try Console.In.Peek.Actual Behavior
BasicIO is supposed to set to interative mode, yet subprocess breaks.
Following is the offending line
HandleFailure is called in multiple places but doesn't check for BasicIO.
Steps to Reproduce the bug
Attach screenshot here (If applicable)
No response
Anythings that could help diagnosing the bug
Device
None
Operating System
None
Server Address (If applicable)
No response