Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clan chat not working, as discord Srv Error (Duplicate key tal (attempted merging values <#1024818276108337162> and <#1022650576351273051>)) #434

Closed
TomLewis opened this issue Jul 23, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@TomLewis
Copy link
Contributor

Describe the bug
When using Clan chat throws an error about dupliate key tal, not sure what that is.

Im trying to upgrade from 2.18.1 to 2.19.2 on PurPur 1.18.2.

I previuosly had discord intergration working fine, then something happened with discord which needed DiscordSRV to be updated which ive done and running the latest 1.27.0 version.

I upated SimpleClans to 2.19.2 and re-enabled the discord intergration hoping it would just work again, but no. every single message sent in clan chat sends an error message about a dupliate key tal.

[10:39:07] [Server thread/INFO]: GodsDead issued server command: /c test
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] Exception in command: c test
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] java.lang.IllegalStateException: Duplicate key tal (attempted merging values <#1024818276108337162> and <#1022650576351273051>)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at java.base/java.util.stream.Collectors.duplicateKeyException(Collectors.java:135)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at java.base/java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Collectors.java:182)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at java.base/java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at SimpleClans_2.19.2.jar//net.sacredlabyrinth.phaed.simpleclans.hooks.discord.DiscordHook.setupDiscord(DiscordHook.java:262)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at SimpleClans_2.19.2.jar//net.sacredlabyrinth.phaed.simpleclans.hooks.discord.DiscordHook.<init>(DiscordHook.java:98)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at SimpleClans_2.19.2.jar//net.sacredlabyrinth.phaed.simpleclans.managers.ChatManager.registerDiscord(ChatManager.java:49)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at SimpleClans_2.19.2.jar//net.sacredlabyrinth.phaed.simpleclans.managers.ChatManager.getDiscordHook(ChatManager.java:59)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at SimpleClans_2.19.2.jar//net.sacredlabyrinth.phaed.simpleclans.chat.handlers.DiscordChatHandler.sendMessage(DiscordChatHandler.java:39)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at SimpleClans_2.19.2.jar//net.sacredlabyrinth.phaed.simpleclans.managers.ChatManager.processChat(ChatManager.java:93)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at SimpleClans_2.19.2.jar//net.sacredlabyrinth.phaed.simpleclans.managers.ChatManager.processChat(ChatManager.java:101)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at SimpleClans_2.19.2.jar//net.sacredlabyrinth.phaed.simpleclans.commands.clan.ChatCommand.sendMessage(ChatCommand.java:29)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at SimpleClans_2.19.2.jar//net.sacredlabyrinth.phaed.simpleclans.acf.RegisteredCommand.invoke(RegisteredCommand.java:152)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at SimpleClans_2.19.2.jar//net.sacredlabyrinth.phaed.simpleclans.acf.BaseCommand.executeCommand(BaseCommand.java:578)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at SimpleClans_2.19.2.jar//net.sacredlabyrinth.phaed.simpleclans.acf.BaseCommand.execute(BaseCommand.java:513)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at SimpleClans_2.19.2.jar//net.sacredlabyrinth.phaed.simpleclans.acf.RootCommand.execute(RootCommand.java:99)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at SimpleClans_2.19.2.jar//net.sacredlabyrinth.phaed.simpleclans.acf.BukkitRootCommand.execute(BukkitRootCommand.java:84)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:172)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at org.bukkit.craftbukkit.v1_18_R2.CraftServer.dispatchCommand(CraftServer.java:906)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2390)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2201)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2182)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.network.protocol.game.PacketPlayInChat.a(PacketPlayInChat.java:46)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.network.protocol.game.PacketPlayInChat.a(PacketPlayInChat.java:6)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.network.protocol.PlayerConnectionUtils.lambda$ensureRunningOnSameThread$1(PlayerConnectionUtils.java:51)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.server.TickTask.run(TickTask.java:18)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.util.thread.IAsyncTaskHandler.d(IAsyncTaskHandler.java:153)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.d(IAsyncTaskHandlerReentrant.java:24)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1427)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:188)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.util.thread.IAsyncTaskHandler.y(IAsyncTaskHandler.java:126)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.server.MinecraftServer.be(MinecraftServer.java:1404)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.server.MinecraftServer.y(MinecraftServer.java:1397)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.util.thread.IAsyncTaskHandler.c(IAsyncTaskHandler.java:136)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1375)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1257)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:321)
[10:39:07] [Server thread/ERROR]: [SimpleClans] [ACF] 	at java.base/java.lang.Thread.run(Thread.java:840)

Settings;

discordchat:
  enable: true
  auto-creation: false
  discord-format: '%player% » %message%'
  format: '&b[&9D&b] &b[%clan%&b] &4<%nick-color%%player%&4> %rank%: &b%message%'
  spy-format: '&8[Spy] [&9D&8] <%clean-tag%&8> <%nick-color%*&8%player%>&8 %rank%&8:
    %message%'
  rank: '[%rank%]'
  leader-role: Leader
  leader-color: 231, 76, 60, 100
  leader-id: '968137540248944671'
  min-linked-players-to-create: 3
  text:
    category-format: Crew Chat
    category-ids:
    - '947854910911811685'
    - '1000188397995958382'
    whitelist: []
    clans-limit: 100

To Reproduce
Steps to reproduce the behavior:

  1. Run simpleclans 2.19.2 on purpur 1.18.2 with latest DiscordSRV 1.27.0
  2. Send a clan message
  3. See error

Expected behavior
To send a message to the discord channel for the crew

Screenshots
image

Software (please complete the following information):

  • Server: PurPur 1.18.2
  • Plugin version 2.19.2
@TomLewis TomLewis added the bug Something isn't working label Jul 23, 2024
@TomLewis TomLewis changed the title Crew chat not working, as discord Srv Error (Duplicate key tal (attempted merging values <#1024818276108337162> and <#1022650576351273051>)) Clan chat not working, as discord Srv Error (Duplicate key tal (attempted merging values <#1024818276108337162> and <#1022650576351273051>)) Jul 23, 2024
@Tomut0
Copy link
Collaborator

Tomut0 commented Jul 23, 2024

Check your discord, you possibly have 2 text chats with same name tal.

@TomLewis
Copy link
Contributor Author

TomLewis commented Jul 23, 2024

Oh like the Clan tag! omg now you mention it, its made a right mess...

Yeah, what on earth has SimpleClans done, its made 6 channels for one Clan, I can see the old chats still from other channels.

I dont have automatic discord channel enabled, they had to pay for it in the past...

Look at "be" 6 channels have been made

image

What should I do, delete all the channels via discord and reboot the minecraft server? Will it re-create them, I know the chat history will be lost which is a massive pain, but if it fixes it...

@Tomut0
Copy link
Collaborator

Tomut0 commented Jul 23, 2024

It's weird that you have faced with it.

Can you send your terminal log with settings.show-debug-info enabled mode?
It could help why it happened.

And yes, you can't have discord feature enabled with the same clan tags.
You may leave one tc discord channel.

@TomLewis
Copy link
Contributor Author

Right, deleted all the duplicate crews, and was using /c test as a way to see if there was any more, I would send a message and it tells me if there was another dupe, then I ran out of duplicate channels and it throws a new error!

[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] Exception in command: c test
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] java.lang.IncompatibleClassChangeError: Found interface github.scarsz.discordsrv.objects.managers.AccountLinkManager, but class was expected
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at SimpleClans_2.19.2.jar//net.sacredlabyrinth.phaed.simpleclans.hooks.discord.DiscordHook.getMember(DiscordHook.java:513)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at SimpleClans_2.19.2.jar//net.sacredlabyrinth.phaed.simpleclans.hooks.discord.DiscordHook.getDiscordPlayers(DiscordHook.java:620)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at SimpleClans_2.19.2.jar//net.sacredlabyrinth.phaed.simpleclans.hooks.discord.DiscordHook.validateChannel(DiscordHook.java:594)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at SimpleClans_2.19.2.jar//net.sacredlabyrinth.phaed.simpleclans.hooks.discord.DiscordHook.clearChannels(DiscordHook.java:531)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at SimpleClans_2.19.2.jar//net.sacredlabyrinth.phaed.simpleclans.hooks.discord.DiscordHook.setupDiscord(DiscordHook.java:264)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at SimpleClans_2.19.2.jar//net.sacredlabyrinth.phaed.simpleclans.hooks.discord.DiscordHook.<init>(DiscordHook.java:98)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at SimpleClans_2.19.2.jar//net.sacredlabyrinth.phaed.simpleclans.managers.ChatManager.registerDiscord(ChatManager.java:49)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at SimpleClans_2.19.2.jar//net.sacredlabyrinth.phaed.simpleclans.managers.ChatManager.getDiscordHook(ChatManager.java:59)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at SimpleClans_2.19.2.jar//net.sacredlabyrinth.phaed.simpleclans.chat.handlers.DiscordChatHandler.sendMessage(DiscordChatHandler.java:39)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at SimpleClans_2.19.2.jar//net.sacredlabyrinth.phaed.simpleclans.managers.ChatManager.processChat(ChatManager.java:93)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at SimpleClans_2.19.2.jar//net.sacredlabyrinth.phaed.simpleclans.managers.ChatManager.processChat(ChatManager.java:101)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at SimpleClans_2.19.2.jar//net.sacredlabyrinth.phaed.simpleclans.commands.clan.ChatCommand.sendMessage(ChatCommand.java:29)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at jdk.internal.reflect.GeneratedMethodAccessor210.invoke(Unknown Source)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at SimpleClans_2.19.2.jar//net.sacredlabyrinth.phaed.simpleclans.acf.RegisteredCommand.invoke(RegisteredCommand.java:152)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at SimpleClans_2.19.2.jar//net.sacredlabyrinth.phaed.simpleclans.acf.BaseCommand.executeCommand(BaseCommand.java:578)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at SimpleClans_2.19.2.jar//net.sacredlabyrinth.phaed.simpleclans.acf.BaseCommand.execute(BaseCommand.java:513)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at SimpleClans_2.19.2.jar//net.sacredlabyrinth.phaed.simpleclans.acf.RootCommand.execute(RootCommand.java:99)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at SimpleClans_2.19.2.jar//net.sacredlabyrinth.phaed.simpleclans.acf.BukkitRootCommand.execute(BukkitRootCommand.java:84)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:172)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at org.bukkit.craftbukkit.v1_18_R2.CraftServer.dispatchCommand(CraftServer.java:906)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2390)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2201)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2182)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.network.protocol.game.PacketPlayInChat.a(PacketPlayInChat.java:46)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.network.protocol.game.PacketPlayInChat.a(PacketPlayInChat.java:6)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.network.protocol.PlayerConnectionUtils.lambda$ensureRunningOnSameThread$1(PlayerConnectionUtils.java:51)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.server.TickTask.run(TickTask.java:18)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.util.thread.IAsyncTaskHandler.d(IAsyncTaskHandler.java:153)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.d(IAsyncTaskHandlerReentrant.java:24)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1427)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:188)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.util.thread.IAsyncTaskHandler.y(IAsyncTaskHandler.java:126)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.server.MinecraftServer.be(MinecraftServer.java:1404)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.server.MinecraftServer.y(MinecraftServer.java:1397)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.util.thread.IAsyncTaskHandler.c(IAsyncTaskHandler.java:136)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1375)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1257)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:321)
[22:19:28] [Server thread/ERROR]: [SimpleClans] [ACF] 	at java.base/java.lang.Thread.run(Thread.java:840)
[22:19:28] [Server thread/INFO]: [SimpleClans] Permission simpleclans.member.chat.color is false for GodsDead
[22:19:28] [Server thread/INFO]: [SimpleClans] Permission simpleclans.member.chat.format is false for GodsDead
[22:19:28] [Server thread/INFO]: [SimpleClans]  GodsDead » test

tried with /crew admin reload too and for some reason each time I reload, it shows less messages!

@Tomut0
Copy link
Collaborator

Tomut0 commented Jul 23, 2024

This error is thrown because of changes in DiscordSRV, the right way to fix it: update SimpleClans to Jenkins build or downgrade the DiscordSRV plugin (1.23.0).

@TomLewis
Copy link
Contributor Author

Oh cool, so is this the maven? Not used this web ui before, how do I download the latest dev build that's most stable?

https://repo.roinujnosde.me/#/releases/net/sacredlabyrinth/phaed/simpleclans/SimpleClans

@Tomut0
Copy link
Collaborator

Tomut0 commented Jul 24, 2024

Yes, what you found is the maven repository for RoinujNosde plugins.

You need another website: https://ci.roinujnosde.me/job/SimpleClans/
427 build is the latest. Simply click on SimpleClans.jar below Artifacts and the download will begin.
All development builds are usually stable, they change small parts of code.

A good indicator for stable version is a second number of SimpleClans' version.
As example, if there was 2.19.2 and then 2.19.3 comes, it means, developers fixed a bug.
Shouldn't have an impact.

2.20.0 is the current snapshot (development version). The second number has changed that means
developers have added some new features. So, you could be a bit cautiously to that version,
since it may break something. In that case, as server owner you could look what it changes or wait a few days
until it will be tested by other people.

2.20.2 changelog can be found here: #404

(btw, I want to live so that I can catch SimpleClans 3.0.0 😃 )

@TomLewis
Copy link
Contributor Author

oh fantastic, I was just reading over all the commits on github to try and figure out what has changed, that 404 pull request is very handy, I will get this version pushed for tomorrows reboot! lets hope that's the resolve!

@TomLewis
Copy link
Contributor Author

Solved with removing the duplicate channels & updating to the dev build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants