pyCraft icon indicating copy to clipboard operation
pyCraft copied to clipboard

My PyCraft client gets disconnected from server

Open Czikoss opened this issue 6 years ago • 5 comments

Hi, my PyCraft client is getting disconnected from public server (Internal Network Exception) when i'm sending any chat message starting with "/". I checked on oryginal MC client and it is not disconnecting me from server. I checked Minecraft Console Client and it isnt getting disconnected as well. Checked on different server and it isnt disconnecting PyCraft client. So i dont know if problem is on client site or server site, but i just really want my bot to work :P

Czikoss avatar Jul 19 '18 19:07 Czikoss

Hello; thanks for the report. Can you set packet listeners as in start.py to print the incoming and outgoing packets, and post here the packet log preceding the disconnection?

joodicator avatar Jul 19 '18 21:07 joodicator

IN: 0x2E PlayerListItemPacket
IN: 0x2E PlayerListItemPacket
IN: 0x2E PlayerListItemPacket
IN: 0x2E PlayerListItemPacket
IN: 0x2E PlayerListItemPacket
IN: 0x2E PlayerListItemPacket
IN: 0x2E PlayerListItemPacket
IN: 0x2E PlayerListItemPacket
IN: 0x2E PlayerListItemPacket
IN: 0x2E PlayerListItemPacket
IN: 0x2E PlayerListItemPacket
IN: 0x2E PlayerListItemPacket
IN: 0x2E PlayerListItemPacket
IN: 0x2E PlayerListItemPacket
IN: 0x2E PlayerListItemPacket
IN: 0x2E PlayerListItemPacket
IN: 0x2E PlayerListItemPacket
IN: 0x0F ChatMessagePacket(json_data='{"text":"§aJestes zalogowany, wybierz serwer."}', position=GAME_INFO)
Message (GAME_INFO): {"text":"§aJestes zalogowany, wybierz serwer."}

OUT: 0x02 ChatPacket(message='/test')
IN: 0x1A DisconnectPacket(json_data='{"text":"Internal Network Exception"}')

I'm using slightly modified start.py, so it was printing all packets already :) It happens every single time i try sending some command, but only using PyCraft and on this exact server.

edit: now i think that it can be some protocol version problem, but not i'm sure how to define protocol version that i want my bot to use

Czikoss avatar Jul 20 '18 11:07 Czikoss

I'm getting this error

[...]
minecraft\networking\connection.py", line 128, in __init__
    allowed_versions = set(map(proto_version, allowed_versions))
TypeError: 'int' object is not iterable

when connection = Connection( ADRESS_IP, username=NICK,allowed_versions=340)

Czikoss avatar Jul 20 '18 12:07 Czikoss

try

allowed_versions=[340]

Also, is there any way you can get the error stack trace on the server side if it gets printed?

ammaraskar avatar Jul 20 '18 21:07 ammaraskar

I don't think getting server side error stack trace from this server is possible for me, but i will try anyway

Czikoss avatar Jul 21 '18 10:07 Czikoss