Closed ProsperCraft closed 7 years ago
You seem to have a lot of plugins installed, if the serialized message is longer than 32k characters ;)
/sponge plugins
output should be split into multiple lines in cases like this
That command should use pagination in this case or just something like this: https://github.com/SpongePowered/SpongeAPI/issues/1312#issuecomment-236357288
Should we always use pagination or just above a certain number of plugins? ( I would prefer always pagination)
@ProsperCraft Could you give us a number of plugins/mods you have installed? Just for comparison.
What if the command only showed plugins instead of all plugins and mods?
[18:05:25] [Server thread/INFO] [nucleus]: Server ran the command: /sponge plugins [18:05:25] [Server thread/INFO]: Plugins (157): Minecraft, Minecraft Coder Pack, Forge Mod Loader, Minecraft Forge, OpenComputers (Core), SpongeAPI, SpongeForge, ExtraUtils2, Mantle, Tinkers' Construct, Immersive Engineering, Just Enough Items, AbyssalCraft, Actually Additions, AppleCore, AppleSkin, ArchitectureCraft, TheDragonCore, ArmorPlus, AutoPackager, Morph-o-Tool, Psi, Quark, AutoRegLib, Bagginses, Baubles, BetterBedrockGen, BD Lib, Better Agriculture, Biomes O' Plenty, Guide-API, Blood Magic: Alchemical Wizardry, Bloodmoon, Bookshelf, Botania, Brandon's Core, Bullseye, Waila, SonarCore, Calculator, Chameleon, MCMultiPart, ‽, ♫, U, �?, !, ;, &, |, #, *, +, /, Chisel, Chisels & Bits, Cooking for Blockheads, Correlated Potentialistics, Crafting Tweaks, MineTweaker 3, Crossroads, Cyberware, Dark Utilities, Forestry, ElecCore, OpenComputers, DeepResonance, Draconic Evolution, Easy Breeding, EnderBags, EnderCore, Ender IO, ShetiPhian-Core, EnderTanks, Enderthing, Ender Zoo, End Metals, Valkyrie Lib, Environmental Tech, ShadowMC, Extra Rails, Zero CORE, Extreme Reactors, Fast Leave Decay, Flat Colored Blocks, FTBLib, FTBUtilities, GenDustry, Pressure Pipes, Advanced Generators, Fishing Net Mod, Grapple Hooks, Infernal Mobs, Inventory Tweaks, Iron Chest, Just Enough Forestry Bees, JourneyMap, Just Enough Calculation, Login Shield, MalisisCore, Malisis Blocks, MalisisDoors, Mekanism, MekanismGenerators, MekanismTools, MmmMmmMmmMmm, Mob Totems, More Bees, Morpheus, Nashorn Library, Natural Pledge, Nether Metals, Nether Portal Fix, No Mob Spawning on Trees, NoMoreRecipeConflict, Not Enough Wands, Nucleus, Ore Dictionary Converter, Ore Spawn, Packing Tape, Pam's HarvestCraft, CustomCommands, PermissionManager, Platforms, Polis, Prism, Progressive Automation, PSIonic Upgrades, Random Things, RebornCore, reborncore-MCMultiPart, Storage Drawers, Refined Storage, Reliquary, RFTools, RFTools Dimensions, Roguelike Dungeons, Roots, Signals, Simple Retrogen, Sleeping Bag, Soul Shards - The Old Ways, The Spice of Life, Discord Bridge, Substratum, TechReborn, TESLA, The One Probe, Tomb Many Graves, Total Economy, Water Strainer, I Can See Everything, What Are We Looking At, WorldEdit, wtfcore, Experience Rings, UniDict
I think the problem is that it is showing all mods and plugins.
The problem is that it is crashing clients. ideally all messages sent to clients would be split across multiple messages if they exceed the limit.
Paginating the command is a good idea, as is separating the mods and plugins, but neither of these fix the root cause.
Maybe split /sponge plugins, and show only plugins. About mods, would be nice a /sponge mods command.
IMO Sponge should not differenciate between mods and plugins. It should either detect them and show them all at one or ignore them. @ryantheleach is right too.
I agree with @ryantheleach: It should never be possible to crash a client by sending a message to them through the API. The implementation should either split up the Text
(which might be difficult), or throw an exception if it exceeds the length limit
Just verified, this is still happening in SpongeAPI: 6.0.0-SNAPSHOT-cebc736 SpongeForge: 1.10.2-2107-6.0.0-BETA-1837 Minecraft Forge: 12.18.2.2107
In this specific case, the message is becoming very long due to the amount of nested Text objects created, which serialize to a lot of nested JSON.
The best solution is probably to just try and cut down on the complexity of the built Text
object. I don't think there's really any good way for the implementation to split up a long text object. At a minimum, it would require splitting it over multiple lines, most likely at a very non-intuitive place.
https://github.com/SpongePowered/SpongeCommon/blob/bleeding/src/main/java/org/spongepowered/common/command/SpongeCommand.java#L490-L506 Removing the hover action would be a good start - show plugins, click to get details (version, etc).
Or...it would be really cool if it only showed plugins ;) In running modpacks you can care less what version of the mods you are running because the modpack keeps that up to date, and if you are maintaining the mods you will just look at the filenames not mouse over ingame. As a user I don't want to see mods when I type /plugins If you really want to show mods make a /mods command?
Re-open in SpongeCommon.
[01:09:01] [Server thread/INFO] [nucleus]: Goshen ran the command: /sponge plugins [01:09:01] [Netty Epoll Server IO #15/ERROR]: io.netty.handler.codec.EncoderException: String too big (was 33591 bytes encoded, max 32767) [01:09:01] [Server thread/INFO]: Goshen lost connection: Disconnected [01:09:01] [Server thread/INFO] [com.nguyenquyhy.spongediscord]: Goshen has disconnected! [01:09:01] [Server thread/INFO]: [-] Goshen