partiusfabaa / cs2-VIPCore

48 stars 18 forks source link

[BUG] Duplicate entry '0' for key 'PRIMARY' #74

Open crashzk opened 2 weeks ago

crashzk commented 2 weeks ago
2024-11-02 10:01:32.780 -03:00 [EROR] plugin:[VIP] Core MySqlConnector.MySqlException (0x80004005): Duplicate entry '0' for key 'PRIMARY'
   at MySqlConnector.Core.ServerSession.ReceiveReplyAsync(IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/ServerSession.cs:line 936
   at MySqlConnector.Core.ResultSet.ReadResultSetHeaderAsync(IOBehavior ioBehavior) in /_/src/MySqlConnector/Core/ResultSet.cs:line 37
   at MySqlConnector.MySqlDataReader.ActivateResultSet(CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlDataReader.cs:line 130
   at MySqlConnector.MySqlDataReader.InitAsync(CommandListPosition commandListPosition, ICommandPayloadCreator payloadCreator, IDictionary`2 cachedProcedures, IMySqlCommand command, CommandBehavior behavior, Activity activity, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlDataReader.cs:line 483
   at MySqlConnector.Core.CommandExecutor.ExecuteReaderAsync(CommandListPosition commandListPosition, ICommandPayloadCreator payloadCreator, CommandBehavior behavior, Activity activity, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/CommandExecutor.cs:line 56
   at MySqlConnector.MySqlCommand.ExecuteNonQueryAsync(IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlCommand.cs:line 309
   at Dapper.SqlMapper.ExecuteImplAsync(IDbConnection cnn, CommandDefinition command, Object param) in /_/Dapper/SqlMapper.Async.cs:line 662
   at VIPCore.Database.CreateTable() in E:\github\cs2-VIPCore\VIPCore\VIPCore\Database.cs:line 71
   at VIPCore.Database.CreateTable() in E:\github\cs2-VIPCore\VIPCore\VIPCore\Database.cs:line 78

css_plugins list

  List of all plugins currently loaded by CounterStrikeSharp: 31 plugins loaded.
  [#1:LOADED]: "AFK Manager" (0.2.6) by NiGHT & K4ryuu (forked by Глеб Хлебов)
  [#2:LOADED]: "Tags" (1.0) by schwarper
  [#3:LOADED]: "CS2 GOTV Discord" (1.3.3) by K4ryuu @ KitsuneLab
  [#4:LOADED]: "PlayerSettings [Core]" (0.7) by Nick Fox
    One storage for player's settings (aka ClientCookies)
  [#5:LOADED]: "[VIP] Core" (v1.3.3) by thesamefabius
  [#6:LOADED]: "TeamLimiter" (0.1.0)
  [#7:LOADED]: "CustomCommands" (3.0.0) by HerrMagic
    Create your own commands per config
  [#8:LOADED]: "Reserved Slots" (1.1.0) by Nocky (SourceFactory.eu)
  [#9:LOADED]: "Language Manager Plugin" (0.0.3) by aproxje
  [#10:LOADED]: "AzLink" (1.0.0) by Azuriom
    Link your Azuriom website with an Counter-Strike 2 server.
  [#11:LOADED]: "Fix Voice Chat in Demo Recordings" (2.0.0) by BOINK
  [#12:LOADED]: "InventorySimulator" (1.0.0) by Ian Lucas
    Inventory Simulator (cs2.zkservidores.com)
  [#13:LOADED]: "[Custom] Plugin Commands Blocker" (V. 1.0.1 [Beta]) by Manifest @Road To Glory
    Prevents players from accessing your server's plugin information through the player console.
  [#14:LOADED]: "[VIP] Test" (v1.0.0) by thesamefabius
  [#15:LOADED]: "MenuManager [Core]" (0.9) by Nick Fox
    All menus interacts in one core
  [#16:LOADED]: "SteamGroupRestrict" (1.0.0) by BMathers
  [#17:LOADED]: "Auto Delete Files" (1.0.0) by Gold KingZ
    https://github.com/oqyh
  [#18:LOADED]: "Auto Map Changer" (1.0.8A) by skaen
  [#19:LOADED]: "DeadShowImage" (v1.2.1) by CYBERC4T
  [#20:LOADED]: "Discord Utilities" (2.1.0) by Nocky (SourceFactory.eu)
  [#21:LOADED]: "High Ping Kicker" (0.0.6) by conch
    Kicks users with high ping
  [#22:LOADED]: "Steam Restrict" (1.4.1) by K4ryuu, Cruze @ KitsuneLab
    Restrict certain players from connecting to your server.
  [#23:LOADED]: "GG1_MapChooser" (v1.5.1) by Sergey
    Map chooser, voting, rtv, nominate, etc.
  [#24:LOADED]: "Advertisement" (v1.0.8) by thesamefabius
  [#25:LOADED]: "AutoUpdater" (1.0.4) by dranix
    Auto Updater for Counter-Strike 2.
  [#26:LOADED]: "[VIP] Flags" (v1.0.1) by thesamefabius
  [#27:LOADED]: "Advanced Friendly Fire [Extracted from Argentum Suite]" (1.1.2) by phara1
    https://steamcommunity.com/id/kenoxyd
  [#28:LOADED]: "[Discord Utilities] Server Status" (1.3) by SourceFactory.eu
  [#29:LOADED]: "CS2-SimpleAdmin (RELEASE)" (1.6.5a) by daffyy & Dliix66
    Simple admin plugin for Counter-Strike 2 :)
  [#30:LOADED]: "MatchZy" (0.8.6) by WD- (https://github.com/shobhit-pathak/)
    A plugin for running and managing CS2 practice/pugs/scrims/matches!
  [#31:LOADED]: "NeedSystem" (1.1.1) by luca.uy
    Allows players to send a message to discord requesting players.
crashzk commented 2 weeks ago

I also noticed that it removed all the VIPS it had in the database.

image

Before the update everything was fine.

crashzk commented 2 weeks ago

I believe it may be due to the config I use:

{
    "TimeMode": 3,
    "ServerId": 0,
    "UseCenterHtmlMenu": true,
    "ServerIP": "XXXXXXXXXXXX",
    "ServerPort": XXXX,
    "ReOpenMenuAfterItemClick": true,
    "VipLogging": true,
    "Connection": {
        "Host": "XXXXXXXXXXXX",
        "Database": "XXXXXXXXXXXX",
        "User": "XXXXXXXXXXXX",
        "Password": "XXXXXXXXXXXX",
        "Port": 3306
    }
}

ServerID use the same for all servers. In this case, I would like to make the VIP active on all servers, so I put the same ID for everyone.