KittehOrg / KittehIRCClientLib

An IRC client library in Java
https://kitteh.dev/kicl/
MIT License
146 stars 34 forks source link

Emotes tag parsed as number but contains UUID #304

Closed Rakambda closed 11 months ago

Rakambda commented 3 years ago

Expected behavior No exception thrown from library.

Actual behavior Library breaks at parsing a message tag as it expects a number but a UUID is also present.

Stacktrace

org.kitteh.irc.client.library.exception.KittehServerMessageTagException: Trouble processing message tag: Tag creator failed. Tag: emote-sets=0,524,19194,801690,1511308,300206297,300374282,300548763,302696035,302696036,302696037,302696038,302696039,302696040,303136585,304611424,322064701,477339272,537206155,564265402,592920959,610186276,1707004858,fb70df85-0e31-41ea-a13f-c3201bac7013
    at org.kitteh.irc.client.library.defaults.feature.DefaultMessageTagManager.getCapabilityTags(DefaultMessageTagManager.java:136) ~[client-lib-8.0.0.jar:?]
    at org.kitteh.irc.client.library.defaults.DefaultClient.handleLine(DefaultClient.java:893) ~[client-lib-8.0.0.jar:?]
    at org.kitteh.irc.client.library.defaults.DefaultClient.access$000(DefaultClient.java:110) ~[client-lib-8.0.0.jar:?]
    at org.kitteh.irc.client.library.defaults.DefaultClient$InputProcessor.processElement(DefaultClient.java:172) ~[client-lib-8.0.0.jar:?]
    at org.kitteh.irc.client.library.defaults.DefaultClient$InputProcessor.processElement(DefaultClient.java:164) ~[client-lib-8.0.0.jar:?]
    at org.kitteh.irc.client.library.util.QueueProcessingThread.run(QueueProcessingThread.java:63) [client-lib-8.0.0.jar:?]
Caused by: java.lang.NumberFormatException: For input string: "fb70df85-0e31-41ea-a13f-c3201bac7013"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:67) ~[?:?]
    at java.lang.Integer.parseInt(Integer.java:668) ~[?:?]
    at java.lang.Integer.valueOf(Integer.java:999) ~[?:?]
    at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
    at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:992) ~[?:?]
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) ~[?:?]
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
Caused by: java.lang.NumberFormatException: For input string: "fb70df85-0e31-41ea-a13f-c3201bac7013"

    at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) ~[?:?]
    at org.kitteh.irc.client.library.feature.twitch.messagetag.EmoteSets.<init>(EmoteSets.java:57) ~[client-lib-8.0.0.jar:?]
    at org.kitteh.irc.client.library.feature.twitch.messagetag.EmoteSets.lambda$static$0(EmoteSets.java:51) ~[client-lib-8.0.0.jar:?]
    at org.kitteh.irc.client.library.defaults.feature.DefaultMessageTagManager.getCapabilityTags(DefaultMessageTagManager.java:134) ~[client-lib-8.0.0.jar:?]
    ... 5 more

To Reproduce Steps to reproduce the behavior, or example code here!

  1. Create a client with TwitchSupport added
  2. Join a user channel (#trucker_dylan has the issue in my case)

I'm not sure what it is linked to, but going to the channel I can see this in the emotes section. This seems new and could correspond the the new format being UUIDs. image

Version information

Additional context N/A

mbax commented 11 months ago

Merged. Gosh what a long wait! :(