Skip to content

[BUG]Duplicate key exception during player authentication (Key: Player [connId=1]) #858

Description

@N1NA-MMK

Describe the bug
When a player attempts to connect to the server, an exception occurs during the authentication phase. The player fails to authenticate and is disconnected immediately. The exception is thrown from Exiled.Events.Patches.Events.Player.Verified and indicates that a dictionary already contains the key "Player [connId=1]".

To Reproduce

  1. Start the SCP: Secret Laboratory server with EXILED loaded.
  2. Have any player try to connect (via Steam, using Radmin LAN IP 26.186.114.254 in this case).
  3. Observe the server console/logs – the exception appears and the player is disconnected.

Expected behavior
The player should authenticate successfully, be added to the game, and be able to play without errors.

Server logs
[2026-07-23 18:54:28.800 +08:00] 76561199244861168@steam authenticated from endpoint 26.186.114.254:63471. Player ID assigned: 2. Auth token serial number: V7nKvBpg -e3rdCaiO.
[2026-07-23 18:54:28.812 +08:00] Nickname of 76561199244861168@steam is now 刺刺邦第一突破手mmk.
[2026-07-23 18:54:28.823 +08:00] Player 刺刺邦第一突破手mmk (76561199244861168@steam) (2) connected with the IP: 26.186.114.254
[2026-07-23 18:54:28.835 +08:00] Exception during authentication (client address: 26.186.114.254): An item with the same key has already been added. Key: Player [connId=1] (UnityEngine.GameObject)
[2026-07-23 18:54:28.846 +08:00] at System.Collections.Generic.Dictionary2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x001cc] in <13c0c460649d4ce49f991e2c222fa635>:0 at System.Collections.Generic.Dictionary2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <13c0c460649d4ce49f991e2c222fa635>:0
at Exiled.Events.Patches.Events.Player.Verified.PlayerVerified (ReferenceHub hub) [0x00027] in <6e6460b026aa462c8694a764a5da34cd>:0
at Exiled.Events.Patches.Events.Player.Verified.Postfix (CentralAuth.PlayerAuthenticationManager __instance) [0x00000] in <6e6460b026aa462c8694a764a5da34cd>:0
at (wrapper dynamic-method) CentralAuth.PlayerAuthenticationManager.CentralAuth.PlayerAuthenticationManager.FinalizeAuthentication_Patch2(CentralAuth.PlayerAuthenticationManager)
at CentralAuth.PlayerAuthenticationManager.ProcessAuthenticationResponse (CentralAuth.AuthenticationResponse msg) [0x003d9] in <10377bb2bb7443198012e8bb2801498d>:0
[2026-07-23 18:54:28.859 +08:00] Player (unknown) (26.186.114.254) failed to authenticate: server exception during authentication!
[2026-07-23 18:54:28.924 +08:00] Player 刺刺邦第一突破手mmk disconnected
[2026-07-23 18:54:28.936 +08:00] Player 刺刺邦第一突破手mmk disconnected
[2026-07-23 18:54:29.102 +08:00] Server has entered the idle mode.

EXILED Version ("latest" is not a version):
v9.14.2

Results of pluginmanager show command in console:
[2026-07-23 19:05:50.932 +08:00] Total number of plugins: 21
Enabled plugins: 21
Disabled plugins: 0

                             Exiled.Events:
                                    - Author: ExMod Team
                                    - Version: 9.14.2.0
                                    - Required Exiled Version: 9.14.2.0
                                    - Prefix: exiled_events
                                    - Priority: Highest
                             scp106:
                                    - Author: FishCare
                                    - Version: 1.0.0.0
                                    - Required Exiled Version: 9.14.2.0
                                    - Prefix: scp106
                                    - Priority: Medium
                             Exiled.CustomItems:
                                    - Author: ExMod Team
                                    - Version: 9.14.2.0
                                    - Required Exiled Version: 9.14.2.0
                                    - Prefix: exiled_custom_items
                                    - Priority: Medium
                             MVPMusicBox:
                                    - Author: 萌新社区开发团队
                                    - Version: 1.0.0.0
                                    - Required Exiled Version: 9.14.2.0
                                    - Prefix: m_v_p_music_box
                                    - Priority: Medium
                             HallowenCandies:
                                    - Author: jack
                                    - Version: 1.0.0.0
                                    - Required Exiled Version: 9.14.2.0
                                    - Prefix: hallowen_candies
                                    - Priority: Medium
                             O5Protocol:
                                    - Author: YourName
                                    - Version: 1.0.0.0
                                    - Required Exiled Version: 9.14.2.0
                                    - Prefix: O5Protocol
                                    - Priority: Medium
                             RespawnUpgrade:
                                    - Author: MMK
                                    - Version: 1.0.0
                                    - Required Exiled Version: 9.0.0
                                    - Prefix: RespawnUpgrade
                                    - Priority: Medium
                             DDSurrender:
                                    - Author: Crystal
                                    - Version: 2.5.5
                                    - Required Exiled Version: 9.6.3
                                    - Prefix: d_d_surrender
                                    - Priority: Medium
                             Xiuer'sPlugin:
                                    - Author: Xiuer_Talent Bilibili:LittleSure_
                                    - Version: 8.0.0
                                    - Required Exiled Version: 9.14.2.0
                                    - Prefix: xiuers_plugin
                                    - Priority: Medium
                             Exiled.CustomRoles:
                                    - Author: ExMod Team
                                    - Version: 9.14.2.0
                                    - Required Exiled Version: 9.14.2.0
                                    - Prefix: exiled_custom_roles
                                    - Priority: Medium
                             CapybaraGunPlugin:
                                    - Author: Codex
                                    - Version: 1.0.0
                                    - Required Exiled Version: 9.12.0
                                    - Prefix: capybara_gun
                                    - Priority: Medium
                             击杀判定:
                                    - Author: jack
                                    - Version: 1.0.0.0
                                    - Required Exiled Version: 9.14.2.0
                                    - Prefix: 
                                    - Priority: Medium
                             Grenade:
                                    - Author: 
                                    - Version: 1.0.0.0
                                    - Required Exiled Version: 9.14.2.0
                                    - Prefix: grenade
                                    - Priority: Medium
                             Exiled.CreditTags:
                                    - Author: Babyboucher20 & iRebbok & Exiled Team
                                    - Version: 9.14.2.0
                                    - Required Exiled Version: 9.14.2.0
                                    - Prefix: exiled_credits
                                    - Priority: Medium
                             GOC间谍插件:
                                    - Author: MMK&早饭祥
                                    - Version: 1.1.0
                                    - Required Exiled Version: 9.13.2
                                    - Prefix: g_o_c
                                    - Priority: Medium
                             cleanbody:
                                    - Author: FishCare
                                    - Version: 1.0.0.0
                                    - Required Exiled Version: 9.14.2.0
                                    - Prefix: cleanbody
                                    - Priority: Medium
                             律法左手:
                                    - Author: MMK&早饭祥
                                    - Version: 1.0.0
                                    - Required Exiled Version: 9.13.2
                                    - Prefix: 
                                    - Priority: Medium
                             Exiled.Permissions:
                                    - Author: ExMod Team
                                    - Version: 9.14.2.0
                                    - Required Exiled Version: 9.14.2.0
                                    - Prefix: exiled_permissions
                                    - Priority: Medium
                             AudioPlayer:
                                    - Author: Antoniofo
                                    - Version: 2.4.5
                                    - Required Exiled Version: 9.9.2
                                    - Prefix: audioplayer
                                    - Priority: Medium
                             ClassDScientistNoHarm:
                                    - Author: YourName
                                    - Version: 1.0.0.0
                                    - Required Exiled Version: 9.14.2.0
                                    - Prefix: ClassDScientistNoHarm
                                    - Priority: Medium
                             Ammon:
                                    - Author: FishCare
                                    - Version: 1.0.0.0
                                    - Required Exiled Version: 9.14.2.0
                                    - Prefix: ammon
                                    - Priority: Medium

Additional context

  • The player was connecting via Radmin LAN (IP 26.186.114.254), a virtual LAN tool — this should not affect authentication logic.
  • The issue appears to be caused by EXILED's internal dictionary not being cleared properly when a player reconnects or when multiple connection attempts occur with the same connId.
  • This occurs consistently for every connection attempt on this server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions