-
Notifications
You must be signed in to change notification settings - Fork 166
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
Couldn't register custom payload: Too many channels registered #488
Comments
Not a ProtocolSupport problem. |
I don't the issue without Protocol Support. Any idea what would be causing it then? |
java.lang.IllegalStateException: Too many channels registered Too many custom payload channels registered by mods. |
So it's a regression from Spigot or Vanilla on 1.11.x? there's no configuration we could change to workaround that? |
There isn't really a workaround, it's a hardcoded limit in the client and server |
From what I get, that limit is there for a long time: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/spigot/browse/CraftBukkit-Patches/0070-Cap-Channel-Registrations.patch#14 |
I'm not sure exactly, but it does a lot of work with Netty under the hood, possibly including a few extra channels. What else are you using? It's pretty hard to hit that limit. |
ProtocolSupport doesn't register custom payload channels itself. |
There's no plugins other than ProtocolSupport and latest Spigot on that server. |
Does it happen if you connect without bungee? |
Same with direct connection:
I'm trying to patch spigot, but their build tool is forcing the official sources, I'm missing something |
This is very strange to be honest. Can you verify that you're using the latest (stable) versions of HexaCord and Spigot, and the latest version of ProtocolSupport from Jenkins? |
FTB Beyond was updated yesterday. |
Wait, what? You're trying to use ProtocolSupport with a modpack? |
FTB Beyond is a forge modpack, yes. But the server itself is vanilla. It's just a hub. |
Does it work if you connect to the hub with a vanilla client? |
It works with :
|
Wouldn't that suggest that FTB Beyond is the problem? |
FTB Beyond worked fine for 3+ month on a vanilla 1.10.2 hub server. |
Right, but you just said it updated, and it's the only client setup you've tested that can reproduce the problem. |
I've tried removing mods but couldn't narrow it down, it's a form of accumulation. Yet, while being large, that modpack isn't that big for 1.10+. |
Well, to be specific, that limit is enforced by Spigot, which is not designed to use mods.
It's very difficult to say, yeah. The main thing is that I don't think there's much we can do about it - The enforcement is upstream, but you're making use of a hub server that is not designed for mods. An alternative solution that I used on my old network is a Bungee plugin that can place users on specific servers based on their Minecraft version and whether they're running Forge or not. That said, you'd be skipping the hub server in that case, so it may not be ideal for you. The limit is an upstream problem but ProtocolSupport doesn't create or make use of plugin channels on its own. It's a pretty confusing situation. |
It turns out the issue was already there on 1.10 but the exception doesn't kick players and wasn't visible in console. |
@LemADEC How did you do this? I have the same issue. |
@LemADEC Please, share your solution. |
@LemADEC Also would be interested in the solution if you are willing to share. |
We don't allow the sharing of JARs, but it would be acceptable for @LemADEC to post a patch file. Sadly this may be a more complicated problem, and they don't seem too keen on sharing... |
I found the patch he was talking about. I did the patch myself and it works great. Inside the Spigot.jar, you can go into the org/bukkit/craftbukkit/v[some numbers]/entity and inside there, you will find a file called CraftPlayer.class. I would suggest using WinRar to get to this point and then extract it to another folder or easily accessible place. Then, you can do it manually or take my file. My file has a max channel limit of 640 which I think is more than enough. I hope I am allowed to put .class files here :D If you take that and replace the CraftPlayer.class inside the jar with mine and rerun, you should be okay now. If you require more than 640, go get Dirty Joe from here: http://dirty-joe.com/ and open the .class file with it. (Run the exe in the zipped folder and do file open) If you head over to methods and look for a method called addChannel, it's moderately annoying to find in the scroll down menu. DO NOT CHANGE THE NAME! That is the variable name not the one you are selecting. Just hit 'a' until it pops up. Double click the code editor and edit the variable called sipush by double clicking on it and editing the values that pop up. The first 2 I am pretty sure are identifiers so don't touch those. You can mess around with the other numbers until you get something you are satisfied with. Click enter, close out of the code editor, save the file, and put it back into the jar. You can now rerun and you are done! You are welcome to share this tutorial, just please give credit where credit is due. (Unless I am not the first one to do this :/ ) |
@FatExplodingPig's class file was for 1.11 and I had to do it myself for 1.12.2.
|
Now it ends in this ... |
Can you tell us what server version you are running and what CraftPlayer file you are using? |
I use PaperSpigot-1.12.2-b1375 with the submittet CraftPlayer from this github page. |
I personally haven't worked with PaperSpigot before but I would guess that the optimizations put in may have edited the craft player class. You may have to edit it yourself with the method described above. |
A work around was added in this commit not too long ago PaperMC/Paper@d09826f |
Cool! Also, I kind of wish I had changed the wording of my explanation on that first post. Sounds so cringey now. |
Just in case anyone else runs into this problem, a simple solution is to add |
Can someone do this workaround for 1.14.4? |
is this possible on 1.19.x versions, i read somewhere that it doesnt work for anything past 1.13+ but im not sure as documentation and overall support for this issue seems scarce |
As of build 54, a client with 1.10.2 running FTB Beyond 1.8.0 can't connect to a spigot 1.11.2 r1251 server:
Issue seems related to an accumulation or interaction of multiple mods, and not a specific mod by itself.
Issue is reproduced with no other plugins installed.
The text was updated successfully, but these errors were encountered: