Jump to content
Forgot your email address? ×
×
×
  • Create New...
  • 0

[irregular error] unknown packet header


.JαyZoN

Question

Hello community,

 

before three days i compiled client binary, game and db (for Windows) without problems.

The binaries are working without problems but there's a little error which is annoying me.

 

The error only appears during the login and the error is irregular, sometimes the error appears directly, sometimes the error appears after login 20 times.

However, the client gets a crash during the message "Connected to server" with the following error message;

Unknown packet header: 140, last: 251 250

The unknown packet header (here 140) is random, but the part "last: 251 250" is always the same. If i get the error after login 20 times again, the packet is different.

I don't know how to fix this 'cause the packets do not exist. (of course i was looking for the packet id)

 

The error is really rare but it makes me angry when I start the client for the first time and then the error appears directly so i have to restart..

I've compared the packets in the clientbinary and serverside, there's no difference. It's only during login, ingame is working without mistakes. There are no errors serverside, too.

 

However, can you help me?

__

 

by the way; I think this topic is similar or maybe the same; http://metin2dev.org/board/topic/343-unknown-packet-header-xx-last-xxx-xxx/?hl=unknown+packet+header

 

Link to comment

22 answers to this question

Recommended Posts

  • 0
#ifdef _IMPROVED_PACKET_ENCRYPTION_
struct TPacketKeyAgreement
{
	static const int MAX_DATA_LEN = 256;
	BYTE bHeader;
	WORD wAgreedLength;
	WORD wDataLength;
	BYTE data[MAX_DATA_LEN];
};

struct TPacketKeyAgreementCompleted
{
	BYTE bHeader;
	BYTE data[3]; // dummy (not used)
};
#endif // _IMPROVED_PACKET_ENCRYPTION_

Try to disable _IMPROVED_PACKET_ENCRYPTION_, i don't know what is it exactly.

  • Love 3

$ uptime
1:26AM  up 732 days,  8:29, 1 user, load averages: 0.38, 0.31, 0.22

$ uname -srp
FreeBSD 9.1-RELEASE amd64

Link to comment
  • 0
 

The packet error can happen because of many things:

 

1. The packet variables are not the same on client/server side

2. The packet does not exist on client/server side

etc...

 

Now it sounds easy to fix, but not really...The syserr always report false or random (?) packets, sometimes it says "unknown packet header: 55", then few minutes later it says "unknown packet header: 101".I recommend you to use the mainline for server, because with that the dev and the novaline works too without any errors.

by Sanchez

I think need edit much things to fix this, In system already work much system and maybe we client dont have these system.. or Offical Servers using another system to start server, or load something on startup... etc

 

Link to comment
  • 0

 

it may be for the package files folder ?!

 

 

In the 34k game was the IMPROVED_PACKET_ENCRYPTION, too.

The same error appears with a pre-compiled binary from the official devs (28k bin, not compiled by me)

Link to comment
  • 0
  • Premium

Some of my friends are experienced unknown packet errors too at login, but it's not always really random. If their computer is a bit slow, so copying big files or doing something while trying to login then they are receiving an unknown packet header error.

Link to comment
  • 0

Some of my friends are experienced unknown packet errors too at login, but it's not always really random. If their computer is a bit slow, so copying big files or doing something while trying to login then they are receiving an unknown packet header error.

 

I have Intel Core i7, 32 GB RAM, NVIDIA Geforce GTX 675MX 4 GB DDR5 so this is not the problem. =D

However, i will look for the _IMPROVED_PACKET_ENCRYPTION_ code part.

Link to comment
  • 0

I was looking for the function a little bit.

If _IMPROVED_PACKET_ENCRYPTION_ is disabled, the client/server will use the old pong encryption system [2089(M)] again, it's really interesting.

Link to comment
  • 0

I was looking for the function a little bit.

If _IMPROVED_PACKET_ENCRYPTION_ is disabled, the client/server will use the old pong encryption system [2089(M)] again, it's really interesting.

I hope you can explain. How this system work ?

Link to comment
  • 0

I was looking for the function a little bit.

If _IMPROVED_PACKET_ENCRYPTION_ is disabled, the client/server will use the old pong encryption system [2089(M)] again, it's really interesting.

 

Is it really a problem?

$ uptime
1:26AM  up 732 days,  8:29, 1 user, load averages: 0.38, 0.31, 0.22

$ uname -srp
FreeBSD 9.1-RELEASE amd64

Link to comment
  • 0

Ok, "_IMPROVED_PACKET_ENCRYPTION_" is disabled.

I configured my client- and gamefiles for the packet encryption key (pong) "testtesttesttest"

 

Clientbinary (Release) 3,3MB changed to 3,03MB.

Gamefile (Debug) ~13MB changed to ~11MB.

 

I did logins 60 times, no bugs, nothing, i tested all. Fine!

 

2wxufyvk.png

Link to comment
  • 0

must remove all _IMPROVED_PACKET_ENCRYPTION_ customer source?

 

Just remove _IMPROVED_PACKET_ENCRYPTION_ in file ServiceDefs.h from client

and remove _IMPROVED_PACKET_ENCRYPTION_ in file service.h from /server/common for server

 

I finally remove all rather made ​​every comment

My Binary 3.031ko does well in release mode

But her but unable to connect
 
Auth => syserr
SYSERR: Mar 19 11:47:36 :: Process: UNKNOWN HEADER: 221, LAST HEADER: 0(0), REMAIN BYTES: 72, fd: 15

 

Link to comment
  • 0
  • Bot

That improved_packet_encryption shouldn't be disabled, i give you a only one problemativ which will come up, with more players on your server:

You will go online and then will be kicked in the loading screen, because of the "Entergame" packet. ("...header 10")

Link to comment
  • 0

^ Tested and this guy have right! The header 10 error will appear like this:

 

SYSERR: May 22 13:44:44 :: Process: SEQUENCE 373be300 mismatch 0x76 != 0x46 header 10
SYSERR: May 22 13:44:44 :: Process: SEQUENCE_LOG [[Name]-------------
    [109 : 0xd9]
    [006 : 0xea]
    [241 : 0x84]
    [010 : 0x76]

Link to comment
  • 0
10 minutes ago, M.Sorin said:

^ Tested and this guy have right! The header 10 error will appear like this:

 

SYSERR: May 22 13:44:44 :: Process: SEQUENCE 373be300 mismatch 0x76 != 0x46 header 10
SYSERR: May 22 13:44:44 :: Process: SEQUENCE_LOG [[Name]-------------
    [109 : 0xd9]
    [006 : 0xea]
    [241 : 0x84]
    [010 : 0x76]

Sequence it's send from client intro game. Header 10 it's ENTERGAME

Soo make the entergame packet to send sequence packet.

bool CPythonNetworkStream::SendEnterGame()
{
    TPacketCGEnterFrontGame EnterFrontGamePacket;
    EnterFrontGamePacket.header = HEADER_CG_ENTERGAME;

    if (!Send (sizeof (EnterFrontGamePacket), &EnterFrontGamePacket))
    {
        Tracen ("Send EnterFrontGamePacket");
        return false;
    }

    SendInternalBuffer();
    return SendSequence();
}

 

 

I'm waiting for you reply. All  CLIENT->GAME packet's should send sequence. I think sequence systems was unfinised when source was leaked and published.  I looked intro codes and always all Client->Game packet's should return seqeunce.

Link to comment
  • 0

Hmm , i checked too and ur right. I`ll try tonight to search for all sequence lines

 

Edit:   SendInternalBuffer(); just removed this and seems like the game is working fine now when i enter the game :)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Announcements

  • -15% Discount in Metin2 Dev Store (01/10/2021 => 31/12/2021) => Code => 15_PCT_OCT_TO_DEC_2021


  • Read our Rules
  • Activity

    1. 1

      [HELP] Costume bonusing with item not working

    2. 10

      Fix Taskbar Highlight Python

    3. 13

      Reduce server memory usage

    4. 87

      How To Enchant & Transform Costume

    5. 2

      Old m2 function

  • Recently Browsing

    • No registered users viewing this page.

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.