Iapetus-11 / aio-mc-rcon

An asynchronous RCON client/wrapper for Minecraft Java Edition
MIT License
38 stars 4 forks source link

Freezes on command.send() #2

Closed MySixSenses closed 3 years ago

MySixSenses commented 3 years ago
async def exec_command(command: str):
    rconClient = Client("192.168.1.18", 25575, "passw")
    print("test")
    await rconClient.connect()
    print("test")
    response = await client.send_cmd(command)
    print("test")
    await rconClient.close()
    print("test")
    return response

Freezes after printing test twice.

Iapetus-11 commented 3 years ago

I don't think this is an issue with the library, but I'll investigate anyways. What type of server / server software are you using, and can you send me the server.properties file (remember to remove the rcon.password from it)? Also send the OS you're running the code on, and any other relevant information like are you using something like uvloop?

MySixSenses commented 3 years ago

Server is Paper server.properties: https://gist.github.com/MySixSenses/3a77fbdc2261cd5dc5cbc8ad20a64de0 OS: Raspbian/Debian

Iapetus-11 commented 3 years ago

What version of paper? (Like Minecraft version, like 1.17 or 1.16.5, etc...)

MySixSenses commented 3 years ago

1.16.5

Iapetus-11 commented 3 years ago

Weird, this library worked just fine when tested on my old 1.16.5 paper server, and still works on my spigot 1.17 server. Maybe double check that you don't have any firewall or something similar in place, I'm not sure what else to check.

Iapetus-11 commented 3 years ago

Would you mind showing me the entire program?

Iapetus-11 commented 3 years ago

I just doublechecked that it worked using my Discord bot, Villager Bot. I tested it on a spigot 1.17 server, using the latest version (3.0.2) of this library. Villager Bot runs on Raspberry Pi OS on a Raspberry Pi 4, so I'm pretty sure it's the server you have set up.

MySixSenses commented 3 years ago

Code here: https://gist.github.com/MySixSenses/24bc53b0b09b6d17093311ad764492d1 I'll check firewall.

Iapetus-11 commented 3 years ago

I looked at the code and everything seems fine. If i had to be a problem with your code I'd try temporarily removing the import for the other rcon library just to see if that fixes anything.

MySixSenses commented 3 years ago

An even weirder thing is that the script doesn't even seem to execute send_command(). Inserting print("testing') at the start of send_command() doesn't print.

MySixSenses commented 3 years ago

Sorry for being an idiot, but I realized that the rcon Client is named rconClient, while Client.send uses Client.