axieum / chatter

:speech_balloon: Take control of your Minecraft server's chat
https://www.curseforge.com/minecraft/mc-mods/chatter
MIT License
8 stars 1 forks source link

Logging in to the server sometimes crash the game #41

Open Kenny-Hui opened 3 years ago

Kenny-Hui commented 3 years ago

Describe the bug When an unseen player is attempting to join the game, it will sometimes crash the server.

To Reproduce Steps to reproduce the behaviour:

It's very random, and I am unable to consistently reproduce the issue.

Expected behaviour No crashes

Logs & Screenshots `---- Minecraft Crash Report ----

// Would you like a cupcake?

Time: 8/3/21, 2:07 PM

Description: Exception in server tick loop

java.lang.IllegalArgumentException: URL must be a valid http(s) or attachment url.

at me.axieum.mcmod.chatter.shadow.discord.net.dv8tion.jda.internal.utils.Checks.check(Checks.java:43)

at me.axieum.mcmod.chatter.shadow.discord.net.dv8tion.jda.api.EmbedBuilder.urlCheck(EmbedBuilder.java:838)

at me.axieum.mcmod.chatter.shadow.discord.net.dv8tion.jda.api.EmbedBuilder.setThumbnail(EmbedBuilder.java:506)

at me.axieum.mcmod.chatter.impl.discord.callback.minecraft.PlayerConnectionCallback.lambda$null$3(PlayerConnectionCallback.java:67)

at java.base/java.util.function.BiConsumer.lambda$andThen$0(BiConsumer.java:71)

at me.axieum.mcmod.chatter.impl.discord.util.DiscordDispatcher.lambda$embed$2(DiscordDispatcher.java:51)

at java.base/java.util.function.BiConsumer.lambda$andThen$0(BiConsumer.java:71)

at me.axieum.mcmod.chatter.impl.discord.util.DiscordDispatcher.lambda$null$5(DiscordDispatcher.java:103)

at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)

at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)

at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)

at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)

at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)

at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:290)

at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)

at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)

at java.base/java.util.concurrent.ForkJoinTask.doInvoke(ForkJoinTask.java:408)

at java.base/java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:736)

at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:159)

at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:173)

at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)

at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)

at me.axieum.mcmod.chatter.impl.discord.util.DiscordDispatcher.lambda$dispatch$6(DiscordDispatcher.java:92)

at java.base/java.util.Optional.ifPresent(Optional.java:183)

at me.axieum.mcmod.chatter.impl.discord.util.DiscordDispatcher.dispatch(DiscordDispatcher.java:84)

at me.axieum.mcmod.chatter.impl.discord.util.DiscordDispatcher.embed(DiscordDispatcher.java:50)

at me.axieum.mcmod.chatter.impl.discord.util.DiscordDispatcher.embed(DiscordDispatcher.java:32)

at me.axieum.mcmod.chatter.impl.discord.callback.minecraft.PlayerConnectionCallback.lambda$onPlayDisconnect$5(PlayerConnectionCallback.java:66)

at java.base/java.util.Optional.ifPresent(Optional.java:183)

at me.axieum.mcmod.chatter.impl.discord.callback.minecraft.PlayerConnectionCallback.onPlayDisconnect(PlayerConnectionCallback.java:55)

at net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents.lambda$static$4(ServerPlayConnectionEvents.java:59)

at net.fabricmc.fabric.impl.networking.server.ServerPlayNetworkAddon.invokeDisconnectEvent(ServerPlayNetworkAddon.java:140)

at net.minecraft.class_3244.handler$zic001$handleDisconnection(class_3244.java:1673)

at net.minecraft.class_3244.method_10839(class_3244.java)

at net.minecraft.class_2535.method_10768(class_2535.java:394)

at net.minecraft.class_3242.method_14357(class_3242.java:186)

at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:882)

at net.minecraft.class_3176.method_3813(class_3176.java:312)

at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:811)

at net.minecraft.server.MinecraftServer.handler$zke000$modifiedRunLoop(MinecraftServer.java:4810)

at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:651)

at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:257)

at java.base/java.lang.Thread.run(Thread.java:834)

A detailed walkthrough of the error, its code path and all known details is as follows:


-- System Details --

Details:

Minecraft Version: 1.16.5

Minecraft Version ID: 1.16.5

Operating System: Linux (amd64) version 5.4.0-29-generic

Java Version: 11.0.10, Oracle Corporation

Java VM Version: OpenJDK 64-Bit Server VM (mixed mode, sharing), Oracle Corporation

Memory: 1045990400 bytes (997 MB) / 1864368128 bytes (1778 MB) up to 8589934592 bytes (8192 MB)

CPUs: 3

JVM Flags: 2 total; -Xms128M -Xmx8192M

Fabric Mods: 

    autoconfig1u: Auto Config v1 Updated 3.3.1

    carpet: Carpet Mod 1.4.42

    chatter: Chatter 1.1.1-beta

    chatter-api: Chatter API 1.1.0

    chatter-discord: Chatter Discord 1.1.1-beta

    chatter-styling: Chatter Styling 1.1.0-beta

    chatter-world: Chatter World 1.0.0

    cloth-basic-math: Cloth Basic Math 0.5.1

    cloth-config2: Cloth Config v4 4.11.15

    crowdin-translate: CrowdinTranslate 1.3+1.16

    editsign: Edit Sign 2.2.0

    fabric: Fabric API 0.32.0+1.16

    fabric-api-base: Fabric API Base 0.2.1+9354966b7d

    fabric-api-lookup-api-v1: Fabric API Lookup API (v1) 1.0.0+dc716ea17d

    fabric-biome-api-v1: Fabric Biome API (v1) 3.1.1+ca58154a7d

    fabric-command-api-v1: Fabric Command API (v1) 1.1.0+f9b3753b7d

    fabric-commands-v0: Fabric Commands (v0) 0.2.2+ca58154a7d

    fabric-containers-v0: Fabric Containers (v0) 0.1.11+9354966b7d

    fabric-content-registries-v0: Fabric Content Registries (v0) 0.2.1+ca58154a7d

    fabric-crash-report-info-v1: Fabric Crash Report Info (v1) 0.1.3+ca58154a7d

    fabric-dimensions-v1: fabric-dimensions-v1 2.0.6+9354966b7d

    fabric-entity-events-v1: Fabric Entity Events (v1) 1.0.3+ca58154a7d

    fabric-events-interaction-v0: Fabric Events Interaction (v0) 0.4.2+ca58154a7d

    fabric-events-lifecycle-v0: Fabric Events Lifecycle (v0) 0.2.1+ca58154a7d

    fabric-game-rule-api-v1: Fabric Game Rule API (v1) 1.0.6+ca58154a7d

    fabric-item-api-v1: Fabric Item API (v1) 1.2.1+ca58154a7d

    fabric-item-groups-v0: Fabric Item Groups (v0) 0.2.3+ca58154a7d

    fabric-lifecycle-events-v1: Fabric Lifecycle Events (v1) 1.2.1+ca58154a7d

    fabric-loot-tables-v1: Fabric Loot Tables (v1) 1.0.2+ca58154a7d

    fabric-mining-levels-v0: Fabric Mining Levels (v0) 0.1.3+ca58154a7d

    fabric-networking-api-v1: Fabric Networking API (v1) 1.0.1+ca58154a7d

    fabric-networking-blockentity-v0: Fabric Networking Block Entity (v0) 0.2.8+ca58154a7d

    fabric-networking-v0: Fabric Networking (v0) 0.3.2+ca58154a7d

    fabric-object-builder-api-v1: Fabric Object Builder API (v1) 1.9.4+9354966b7d

    fabric-object-builders-v0: Fabric Object Builders (v0) 0.7.2+ca58154a7d

    fabric-particles-v1: Fabric Particles (v1) 0.2.4+ca58154a7d

    fabric-permissions-api-v0: fabric-permissions-api 0.1-SNAPSHOT

    fabric-registry-sync-v0: Fabric Registry Sync (v0) 0.7.4+ca58154a7d

    fabric-rendering-data-attachment-v1: Fabric Rendering Data Attachment (v1) 0.1.5+ca58154a7d

    fabric-resource-loader-v0: Fabric Resource Loader (v0) 0.4.2+ca58154a7d

    fabric-screen-handler-api-v1: Fabric Screen Handler API (v1) 1.1.5+9354966b7d

    fabric-structure-api-v1: Fabric Structure API (v1) 1.1.4+ca58154a7d

    fabric-tag-extensions-v0: Fabric Tag Extensions (v0) 1.1.1+ca58154a7d

    fabric-tool-attribute-api-v1: Fabric Tool Attribute API (v1) 1.2.6+ca58154a7d

    fabricloader: Fabric Loader 0.11.3

    ferritecore: FerriteCore 2.0.5

    image2map: Image2Map 0.2.0

    java: OpenJDK 64-Bit Server VM 11

    joestu: Joestu Server Mod 1.3.5

    krypton: Krypton 0.1.2

    lazydfu: LazyDFU 0.1.2

    lithium: Lithium 0.6.6

    minecraft: Minecraft 1.16.5

    mtr: Minecraft Transit Railway 1.16-3.0.0-beta-8-unofficial-2

    spark: spark 1.6.0

    starlight: Starlight fabric-1.0.0-RC2-82ae5ca

    worldedit: WorldEdit 7.2.4+5723-e3bfc64

Player Count: 1 / 40; [class_3222['LX86'/125, l='ServerLevel[world]', x=2587.28, y=103.13, z=-534.89]]

Data Packs: vanilla (incompatible), Fabric Mods, file/afk display v1.1.0.zip, file/armored elytra v1.0.3.zip, file/back v1.2.0.zip, file/coordinates hud v1.2.0.zip, file/custom villager shops v1.2.0.zip, file/elevators v1.0.1.zip, file/homes v1.4.1.zip, file/real time clock v1.1.0.zip, file/silence mobs v1.1.0.zip, file/spawn v2.3.0.zip, file/spectator night vision v1.1.0.zip, file/tpa v2.3.0.zip, file/unlock all recipes v2.0.1.zip, file/armedarmorstands-v1-1.zip (incompatible), file/PA Scoreboard.zip (incompatible)

Is Modded: Definitely; Server brand changed to 'fabric'

Type: Dedicated Server (map_server.txt)`

Additional context My best guess is it crashed while displaying the user's head avatar into the embed thumbnail, however you can't turn off the thumbnail separately.

Also, this is a rather old crash report, while the server crashed just today, I am unable to access the crash log due to the design of the web panel.

I will try to elaborate more informations when I got back home

axieum commented 3 years ago

Hi,

Thanks for bringing this to my attention. It looks like it's trying to set the player join/leave avatar in the embed when it gets sent to Discord.

For now, can you please edit your themes setting and set the avatar URL to null (without quotes) to disable this feature.

Thanks, Ax.