MCCTeam / Minecraft-Console-Client

Lightweight console for Minecraft chat and automated scripts
https://mccteam.github.io
Other
1.61k stars 388 forks source link

[BUG] timeout on WSL mono #1929

Closed nedisy closed 1 year ago

nedisy commented 2 years ago

Prerequisites

Minecraft Version

1.18.1

Console Client Version

20220206-9

Expected Behavior

The Executable (MinecraftClient.exe) should be able to run in Windows Subsystem for Linux using mono normally as it is in Windows 11. It should be able to connect to ideally all IPs I know.

Actual Behavior

When using the Windows Subsystem for Linux (WSL), I keep getting timeout exceptions when connecting to a certain server (in this case claritymc.net). Some other servers can be connected (like us.mineplex.com), although it's slow. But when I use the app without WSL (directly double click in windows explorer), it works as expected, can connect to all servers I knew and it's not slow at all.

Steps to Reproduce the bug

  1. Install Windows Subsystem for Linux (WSL) (I use ubuntu)
  2. Install mono-complete in WSL using apt-get
  3. Download console client release 20220206-9
  4. Open ubuntu terminal on the executable directory
  5. Run "mono minecraftclient.exe", Server IP:claritymc.net

Attach screenshot here (If applicable)

WSL Failed: image

WSL Successful: image

Windows 11 Successful: image

Anythings that could help diagnosing the bug

# Windows 11 Log:
Minecraft Console Client v1.18.1 - for MC 1.4.6 to 1.18.1 - Github.com/MCCTeam
GitHub build 9, built on 2022-02-06 from commit 6986902
[MCC] [Settings] Loading Settings from C:\Users\nedis\Downloads\Minecraft\Minecraft Client  Console\MinecraftClient.ini
[MCC] [Translations] No translation file found for en. (Looked 'C:\Users\nedis\Downloads\Minecraft\Minecraft Client  Console\\lang\mcc\en.ini'
[MCC] [Translations] No translation file found for system language (id). (Looked 'C:\Users\nedis\Downloads\Minecraft\Minecraft Client  Console\\lang\mcc\id.ini'
Color test: Your terminal should display [0123456789ABCDEF]: [0123456789ABCDEF]
[SessionCache] Initializing FileSystemWatcher for file: C:\Users\nedis\Downloads\Minecraft\Minecraft Client  Console\SessionCache.ini
Loading Minecraft profiles: launcher_profiles.json
Loading session cache from disk: SessionCache.ini
Loaded session: [redacted@email]:[redacted-sessionid]
Session data has been successfully loaded from disk.
Login [redacted]
Access token expiration time is 08/02/2022 08.58.27
Cached session is still valid for nedisy.
Saving session cache to disk
Success. (session ID: [redacted])
Performing request to pc.realms.minecraft.net
Loading Minecraft profiles: launcher_profiles.json
Loading session cache from disk: SessionCache.ini
Loaded session: [redacted@email]:[redacted-sessionid]
> GET /worlds HTTP/1.1
> Cookie: sid=token:[redacted];user=nedisy;version=1.18.1
> Cache-Control: no-cache
> Pragma: no-cache
> Host: pc.realms.minecraft.net
> User-Agent: Java/1.6.0_27
> Accept-Charset: ISO-8859-1,UTF-8;q=0.7,*;q=0.7
> Connection: close
>
>

< HTTP/1.1 200 OK
< Date: Mon, 07 Feb 2022 16:09:44 GMT
< Content-Type: application/json
< Content-Length: 14
< Connection: close
<
< {"servers":[]}
Server IP :claritymc.net
Resolving claritymc.net...
Found server proxy.claritymc.net:44888 for domain claritymc.net
Retrieving Server Info...
{"version":{"name":"","protocol":757},"players":{"max":250,"online":74},"description":"§f§f           §f§lC§f§lL§f§lA§f§lR§f§lI§f§lT§f§lY§f§lM§f§lC §f[1.8.x-1.18.1]\n§c     Survival | Anarchy | OneBlock | Bedwars","favicon":"data:image/png;base64,[redacted]","modinfo":{"type":"FML","modList":[]}}
Server is running Forge without mods.
Server version :  (protocol v757)
Translations file loaded.
[MCC] Version is supported.
Logging in...
[DEBUG] Crypto keys & hash generated.
[MCC] Checking Session...
Performing request to sessionserver.mojang.com
> POST /session/minecraft/join HTTP/1.1
> Host: sessionserver.mojang.com
> User-Agent: MCC/1.18.1
> Content-Type: application/json
> Content-Length: 519
> Connection: close
>
> {"accessToken":"[redacted]","selectedProfile":"[redacted]","serverId":"[redacted]"}

< HTTP/1.1 204 No Content
< Connection: close
< Date: Mon, 07 Feb 2022 16:09:50 GMT
< x-minecraft-request-id: 7db92aa029fa3851
< Cache-Control: no-store
< X-Cache: Miss from cloudfront
< Via: 1.1 60781892a5625d9f8980c3ca1b8660a2.cloudfront.net (CloudFront)
< X-Amz-Cf-Pop: SIN2-P2
< X-Amz-Cf-Id: [redacted]
<
<
[MCC] Server was successfully joined.
Type '/quit' to leave the server.

              You have been auto logged as a premium user

You are already connected to this server!
[M

# WSL Log: 
nedisy@DESKTOP-ABCD123:/mnt/c/Users/nedis/Downloads/Minecraft/Minecraft Client  Console$ sh start.sh
Minecraft Console Client v1.18.1 - for MC 1.4.6 to 1.18.1 - Github.com/MCCTeam
GitHub build 9, built on 2022-02-06 from commit 6986902
[MCC] [Settings] Loading Settings from /mnt/c/Users/nedis/Downloads/Minecraft/Minecraft Client  Console/MinecraftClient.ini
[MCC] [Translations] No translation file found for en. (Looked '/mnt/c/Users/nedis/Downloads/Minecraft/Minecraft Client  Console//lang/mcc/en.ini'
[MCC] [Translations] No translation file found for system language (). (Looked '/mnt/c/Users/nedis/Downloads/Minecraft/Minecraft Client  Console//lang/mcc/.ini'
Color test: Your terminal should display [0123456789ABCDEF]: [0123456789ABCDEF]
[SessionCache] Initializing FileSystemWatcher for file: /mnt/c/Users/nedis/Downloads/Minecraft/Minecraft Client  Console/SessionCache.ini
Loading session cache from disk: SessionCache.ini
Loaded session: [redacted]
Session data has been successfully loaded from disk.
Access token expiration time is 02/08/2022 08:58:27
Cached session is still valid for nedisy.
Saving session cache to disk
Success. (session ID: [redacted] )
Performing request to pc.realms.minecraft.net
Loading session cache from disk: SessionCache.ini
Loaded session: [redacted]
> GET /worlds HTTP/1.1
> Cookie: [redacted]
> Cache-Control: no-cache
> Pragma: no-cache
> Host: pc.realms.minecraft.net
> User-Agent: Java/1.6.0_27
> Accept-Charset: ISO-8859-1,UTF-8;q=0.7,*;q=0.7
> Connection: close
>
>

< HTTP/1.1 200 OK
< Date: Mon, 07 Feb 2022 15:40:44 GMT
< Content-Type: application/json
< Content-Length: 14
< Connection: close
<
< {"servers":[]}
Server IP :claritymc.net
Resolving claritymc.net...
Retrieving Server Info...
A timeout occured while attempting to connect to this IP.
Failed to ping this IP.
Server version :
nedisy@DESKTOP-ABCD123:/mnt/c/Users/nedis/Downloads/Minecraft/Minecraft Client  Console$ sh start.sh
Minecraft Console Client v1.18.1 - for MC 1.4.6 to 1.18.1 - Github.com/MCCTeam
GitHub build 9, built on 2022-02-06 from commit 6986902
[MCC] [Settings] Loading Settings from /mnt/c/Users/nedis/Downloads/Minecraft/Minecraft Client  Console/MinecraftClient.ini
[MCC] [Translations] No translation file found for en. (Looked '/mnt/c/Users/nedis/Downloads/Minecraft/Minecraft Client  Console//lang/mcc/en.ini'
[MCC] [Translations] No translation file found for system language (). (Looked '/mnt/c/Users/nedis/Downloads/Minecraft/Minecraft Client  Console//lang/mcc/.ini'
Color test: Your terminal should display [0123456789ABCDEF]: [0123456789ABCDEF]
[SessionCache] Initializing FileSystemWatcher for file: /mnt/c/Users/nedis/Downloads/Minecraft/Minecraft Client  Console/SessionCache.ini
Loading session cache from disk: SessionCache.ini
Loaded session: [redacted]
Session data has been successfully loaded from disk.
Access token expiration time is 02/08/2022 08:58:27
Cached session is still valid for nedisy.
Saving session cache to disk
Success. (session ID: [redacted])
Performing request to pc.realms.minecraft.net
Loading session cache from disk: SessionCache.ini
Loaded session: [redacted]
> GET /worlds HTTP/1.1
> Cookie: sid=token:[redacted];user=nedisy;version=1.18.1
> Cache-Control: no-cache
> Pragma: no-cache
> Host: pc.realms.minecraft.net
> User-Agent: Java/1.6.0_27
> Accept-Charset: ISO-8859-1,UTF-8;q=0.7,*;q=0.7
> Connection: close
>
>

< HTTP/1.1 200 OK
< Date: Mon, 07 Feb 2022 15:41:31 GMT
< Content-Type: application/json
< Content-Length: 14
< Connection: close
<
< {"servers":[]}
Server IP :us.mineplex.com
Resolving us.mineplex.com...
Retrieving Server Info...
{"version":{"name":"BungeeCord 1.8.x-1.18.x","protocol":757},"players":{"max":256,"online":255},"description":{"extra":[{"color":"white","text":"                "},{"bold":true,"strikethrough":true,"color":"blue","text":"   "},{"bold":true,"strikethrough":true,"color":"dark_gray","text":"[ "},{"color":"white","text":" "},{"bold":true,"color":"gold","text":"Mineplex"},{"color":"white","text":" "},{"bold":true,"color":"white","text":"Games"},{"color":"white","text":" "},{"bold":true,"strikethrough":true,"color":"dark_gray","text":" ]"},{"bold":true,"strikethrough":true,"color":"blue","text":"   "},{"color":"white","text":"\n                   "},{"bold":true,"color":"yellow","text":"CLASSIC MINI-GAMES"}],"text":""},"favicon":"data:image/png;base64,[redacted]":{"type":"FML","modList":[]}}
Server is running Forge without mods.
Server version : BungeeCord 1.8.x-1.18.x (protocol v757)
Translations file loaded.
[MCC] Version is supported.
Logging in...
[DEBUG] Crypto keys & hash generated.
[MCC] Checking Session...
Performing request to sessionserver.mojang.com
> POST /session/minecraft/join HTTP/1.1
> Host: sessionserver.mojang.com
> User-Agent: MCC/1.18.1
> Content-Type: application/json
> Content-Length: 521
> Connection: close
>
> {"accessToken":"[redacted]","selectedProfile":"[redacted]","serverId":"[redacted]"}

< HTTP/1.1 204 No Content
< Connection: close
< Date: Mon, 07 Feb 2022 15:41:54 GMT
< x-minecraft-request-id: 260e10f1d13c5bc7
< Cache-Control: no-store
< X-Cache: Miss from cloudfront
< Via: 1.1 66d851b48249ff71df5688c84f41fec8.cloudfront.net (CloudFront)
< X-Amz-Cf-Pop: SIN52-C3
< X-Amz-Cf-Id: [redacted]
<
<
[MCC] Server was successfully joined.
Type '/quit' to leave the server.
>/quit

=============================================

ETERNAL SALE! Get your new ETERNAL rank today and enjoy the new EPIC Communities update! Shop now at Mineplex.com/shop
Link: http://Mineplex.com/shop

=============================================

nedisy@DESKTOP-ABCD123:/mnt/c/Users/nedis/Downloads/Minecraft/Minecraft Client  Console$

Device

Laptop

Operating System

Windows

Server Address (If applicable)

claritymc.net

ORelio commented 2 years ago

Would you mind explaining why you need to run a Windows executable over Linux over Windows? 🤯

nedisy commented 2 years ago

Too lazy to install an actual Linux on my laptop, and want to test it on Linux, because I used proot-distro on my phone and it failed the same way (because both are using Linux mono?)

nedisy commented 2 years ago

Maybe it's related to proxy detector, I tried to connect to it's proxy, and it works in linux. The proxy: proxy.claritymc.net:44888

ORelio commented 2 years ago

MCC is supposed to work on Mono for Linux, but Mono for other environments is untested. Just in case, you can try disabling advanced terminal features by launching it like this:

mono MinecraftClient.exe BasicIO-NoColor
milutinke commented 1 year ago

Since the Mono is no longer used, try using the latest build which uses .NET Core 6, I'll be closing the issue, if you experience any problems, open a new issue.