IllegalArgumentException: too many channels: 1024 + 6 > 1024
Expected Behavior
Feature to customize max number of channels
Actual Behavior
No customiziblilty
Steps to Reproduce
Get a client to register more than 1024 channels
Plugin List
Velocity, StaffChat, Staff mod, CustomMoonSync, CustomDataSync, LuckPermsVelocity, SignedVelocity
Velocity Version
latest
Additional Information
java.lang.IllegalArgumentException: too many channels: 1024 + 6 > 1024 at com.google.common.base.Preconditions.checkArgument(Preconditions.java:453) ~[guava-31.0.1-jre.jar:?] at com.velocitypowered.proxy.protocol.util.PluginMessageUtil.getChannels(PluginMessageUtil.java:116) ~[main/:?] at com.velocitypowered.proxy.connection.client.ClientPlaySessionHandler.handle(ClientPlaySessionHandler.java:313) ~[main/:?] at com.velocitypowered.proxy.protocol.packet.PluginMessagePacket.handle(PluginMessagePacket.java:104) ~[main/:?] at com.velocitypowered.proxy.connection.MinecraftConnection.channelRead(MinecraftConnection.java:154) ~[main/:?] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:359) ~[netty-transport-4.2.0.Final.jar:4.2.0.Final] at com.velocitypowered.proxy.protocol.netty.MinecraftDecoder.tryDecode(MinecraftDecoder.java:91) ~[main/:?] at com.velocitypowered.proxy.protocol.netty.MinecraftDecoder.channelRead(MinecraftDecoder.java:60) ~[main/:?] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:359) ~[netty-transport-4.2.0.Final.jar:4.2.0.Final] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:107) ~[netty-codec-base-4.2.0.Final.jar:4.2.0.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:359) ~[netty-transport-4.2.0.Final.jar:4.2.0.Final] at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:289) ~[netty-handler-4.2.0.Final.jar:4.2.0.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-transport-4.2.0.Final.jar:4.2.0.Final] at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346) ~[netty-codec-base-4.2.0.Final.jar:4.2.0.Final] at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318) ~[netty-codec-base-4.2.0.Final.jar:4.2.0.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:359) ~[netty-transport-4.2.0.Final.jar:4.2.0.Final] at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1429) ~[netty-transport-4.2.0.Final.jar:4.2.0.Final] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:918) ~[netty-transport-4.2.0.Final.jar:4.2.0.Final] at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:167) ~[netty-transport-4.2.0.Final.jar:4.2.0.Final] at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.handle(AbstractNioChannel.java:445) ~[netty-transport-4.2.0.Final.jar:4.2.0.Final] at io.netty.channel.nio.NioIoHandler$DefaultNioRegistration.handle(NioIoHandler.java:383) ~[netty-transport-4.2.0.Final.jar:4.2.0.Final] at io.netty.channel.nio.NioIoHandler.processSelectedKey(NioIoHandler.java:577) ~[netty-transport-4.2.0.Final.jar:4.2.0.Final] at io.netty.channel.nio.NioIoHandler.processSelectedKeysOptimized(NioIoHandler.java:552) ~[netty-transport-4.2.0.Final.jar:4.2.0.Final] at io.netty.channel.nio.NioIoHandler.processSelectedKeys(NioIoHandler.java:493) ~[netty-transport-4.2.0.Final.jar:4.2.0.Final] at io.netty.channel.nio.NioIoHandler.run(NioIoHandler.java:470) ~[netty-transport-4.2.0.Final.jar:4.2.0.Final] at io.netty.channel.SingleThreadIoEventLoop.runIo(SingleThreadIoEventLoop.java:204) ~[netty-transport-4.2.0.Final.jar:4.2.0.Final] at io.netty.channel.SingleThreadIoEventLoop.run(SingleThreadIoEventLoop.java:175) ~[netty-transport-4.2.0.Final.jar:4.2.0.Final] at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:1073) ~[netty-common-4.2.0.Final.jar:4.2.0.Final] at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.2.0.Final.jar:4.2.0.Final] at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.2.0.Final.jar:4.2.0.Final] at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
What do you have on the client trying to register that many channels?
Different packets and staff utilities
There is a pr for this exact reason https://github.com/PaperMC/Velocity/issues/1562
Added system property for this in #1557