startersclan / asp

The new BF2Statistics 3.0 ASP 🎖 currently in public Beta. Dockerized 🐳
http://bf2statistics.com
3 stars 4 forks source link

Bug communication between ASP and the BF2 server #78

Open Harpyie02 opened 6 days ago

Harpyie02 commented 6 days ago

I found a bug in the communication between ASP and the BF2 server. After restarting the Battlefield 2 server, it cannot query all ribbons stats correctly. You get the ribbons again via the BF2 server even though you have already received them in the database and they are also displayed in BF2HQ, but you still get the ribbons again after a server restart.

The same is with the badges. If you have already received Tier 2, for example Anit-Tank Silver. Do you keep getting Tier 1 (Bronze) again

Because of these errors, ranks that have award requirements also do not work properly. The server receives information that you do not have a Tier 1 badge but do have Tier 2 and therefore cannot be promoted to Sergeant Major of the Corps

Then there is a bug when login in BF2HQ, i have weapons unlock loop

leojonathanoh commented 2 days ago

If you are getting the same in-game medals every new round or new map, it means somehow the snapshots are not being sent by the gameserver to the ASP.

Harpyie02 commented 1 day ago

Game with 1031120_1 (Basic).log Game with 1031120_2 (Silver).log Good evening, the error is reproducible. Not after changing a map The server must be offline after awarding a medal and ribbon in order to reproduce the error.

I don't think it's because of the DNS.

The server can collect the information from ASP and also passes the information to the ASP after the end of the round. I see my progress in BF2 Admin Center. I think that the server is not getting complete information

This is Server Log with Anti-Tank Badge Basic (1031120_1)

Added player 0, [AAA] TEST2 (500000161) to medal/rank checking Getting STATS for player [AAA] TEST2 (500000161)... Requesting player STATS via Host Requesting player AWARDS via Host Unlock module: onPlayerConnect Requesting unlocks: Success Added player 0 to unlock checking Running CSE Verification Check on Player ([AAA] TEST2) URI: /ASP/verifyplayer.aspx?pid=500000161&nick=[AAA]%20TEST2 Backend CSE Response on Player ([AAA] TEST2): OK - Player Is Valid onAwardsResponse -> Awards response received: ((1031120, 1), (2051902, 1)) onAwardsResponse -> Medal 2051902_1 not found in medal data. onAwardsResponse -> Player medals: {'1031120_1': 1} onStatsResponse -> Stats response received for player 0 size 920. Assembling STATS dictionary with 111 keys Processing STATS response for player 0, size 110.

The Server found my Anti-Tank Badger with ID 1031120_1

here are the logs from game with Anti-Tank Badge Veteran (1031120_2)

Added player 0, [AAA] TEST2 (500000161) to medal/rank checking Getting STATS for player [AAA] TEST2 (500000161)... Requesting player STATS via Host Requesting player AWARDS via Host Unlock module: onPlayerConnect Requesting unlocks: Success Added player 0 to unlock checking Running CSE Verification Check on Player ([AAA] TEST2) URI: /ASP/verifyplayer.aspx?pid=500000161&nick=[AAA]%20TEST2 Backend CSE Response on Player ([AAA] TEST2): OK - Player Is Valid onAwardsResponse -> Awards response received: ((1031120, 2), (2051902, 1), (2051907, 2)) onAwardsResponse -> Medal 2051902_1 not found in medal data. onAwardsResponse -> Medal 2051907_2 not found in medal data. onAwardsResponse -> Player medals: {'1031120_2': 1} onStatsResponse -> Stats response received for player 0 size 926. Assembling STATS dictionary with 111 keys Processing STATS response for player 0, size 110.

Here the server found Anti-Tank Badger Veteran, but not Anti-Tank Basic The server thinks I'm missing Anti-Tank Basic and gives it again That at least explains why it gives me basic but not the veteran again

I think it should look like this in the logs onAwardsResponse -> Awards response received: ((1031120, 2), (1031120, 1)) or onAwardsResponse -> Player medals: {'1031120_1': 2} but not {'1031120_2': 1}