Skip to content
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

NumberFormatException on joining a channel with subscription #42

Closed
ProjectBots opened this issue Oct 10, 2021 · 6 comments
Closed

NumberFormatException on joining a channel with subscription #42

ProjectBots opened this issue Oct 10, 2021 · 6 comments
Labels

Comments

@ProjectBots
Copy link

Error in handling the incoming Irc Message
For input string: "568bb8c9-cb3a-4a15-97eb-79288caa66c1"
java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
java.base/java.lang.Integer.parseInt(Integer.java:660)
java.base/java.lang.Integer.parseInt(Integer.java:778)
com.gikk.twirk.types.AbstractTwitchUserFields.parseEmoteSets(AbstractTwitchUserFields.java:77)
com.gikk.twirk.types.AbstractTwitchUserFields.parseUserProperties(AbstractTwitchUserFields.java:61)
com.gikk.twirk.types.users.DefaultUserstateBuilder.build(DefaultUserstateBuilder.java:10)
com.gikk.twirk.Twirk.incommingMessage(Twirk.java:528)
com.gikk.twirk.InputThread.run(InputThread.java:43)

@Gikkman
Copy link
Owner

Gikkman commented Oct 10, 2021

Thank you for the report. Do you happen to have a copy of the entire message that caused this exception? It's very hard to figure out what's going on without it.

@ProjectBots
Copy link
Author

it appears that it weren't the emotes. After testing it more:
I think it is caused by joining a channel that I have subscribed to and not because of an message
sorry for the late answer

@ProjectBots ProjectBots changed the title NumberFormatException on messages with emotes NumberFormatException on joining a channel with subscription Oct 12, 2021
@RebelliousUno
Copy link

IN  @badge-info=subscriber/55;badges=broadcaster/1,subscriber/3012,premium/1;color=#8F910D;display-name=RebelliousUno;emotes=;first-msg=0;flags=;id=5e11c647-44c9-41b0-bcba-6d0be7ea5507;mod=0;room-id=29049363;subscriber=1;tmi-sent-ts=1642005192330;turbo=0;user-id=29049363;user-type= :rebelliousuno!rebelliousuno@rebelliousuno.tmi.twitch.tv PRIVMSG #rebelliousuno :?help
OUT PRIVMSG #rebelliousuno :Usage: ?help cmd - to get help for a particular command
IN  @badge-info=;badges=moderator/1;color=;display-name=GlazedHamBot;emote-sets=0,300374282,472873131,537206155,564265402,f302a315-4fac-4e36-a9f3-3c7915933eb1;mod=1;subscriber=0;user-type=mod :tmi.twitch.tv USERSTATE #rebelliousuno
Error in handling the incoming Irc Message
For input string: "f302a315-4fac-4e36-a9f3-3c7915933eb1"
java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	java.lang.Integer.parseInt(Integer.java:580)
	java.lang.Integer.parseInt(Integer.java:615)
	com.gikk.twirk.types.AbstractTwitchUserFields.parseEmoteSets(AbstractTwitchUserFields.java:77)
	com.gikk.twirk.types.AbstractTwitchUserFields.parseUserProperties(AbstractTwitchUserFields.java:61)
	com.gikk.twirk.types.users.DefaultUserstateBuilder.build(DefaultUserstateBuilder.java:10)
	com.gikk.twirk.Twirk.incommingMessage(Twirk.java:528)
	com.gikk.twirk.InputThread.run(InputThread.java:43)

I get this as well if this still helps with this

@Gikkman
Copy link
Owner

Gikkman commented Jan 13, 2022

Hm, so it is not just on channel joins. Alright, I gotta take care of this one pretty soon it seems like. Thanks for the reports.

@Gikkman Gikkman added the bug label Jan 13, 2022
@RebelliousUno
Copy link

Fwiw that particular account that my bot is running under shouldn't be subscribed to any channel (as far as I'm aware) so not sure why there's a guid based emote set? Unless it's something to do with follower emotes?

@RebelliousUno
Copy link

{
    "data": [
        {
            "id": "emotesv2_21391cdc9d4c461b84e93d6569f327af",
            "name": "rebell1Heart",
            "images": {
                "url_1x": "https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_21391cdc9d4c461b84e93d6569f327af/static/light/1.0",
                "url_2x": "https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_21391cdc9d4c461b84e93d6569f327af/static/light/2.0",
                "url_4x": "https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_21391cdc9d4c461b84e93d6569f327af/static/light/3.0"
            },
            "emote_type": "follower",
            "emote_set_id": "f302a315-4fac-4e36-a9f3-3c7915933eb1",
            "owner_id": "29049363",
            "format": [
                "static"
            ],
            "scale": [
                "1.0",
                "2.0",
                "3.0"
            ],
            "theme_mode": [
                "light",
                "dark"
            ]
        },
        {
            "id": "emotesv2_e8f309989b3f4a90b57dfc93561e1568",
            "name": "rebell1HeartNight",
            "images": {
                "url_1x": "https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_e8f309989b3f4a90b57dfc93561e1568/static/light/1.0",
                "url_2x": "https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_e8f309989b3f4a90b57dfc93561e1568/static/light/2.0",
                "url_4x": "https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_e8f309989b3f4a90b57dfc93561e1568/static/light/3.0"
            },
            "emote_type": "follower",
            "emote_set_id": "f302a315-4fac-4e36-a9f3-3c7915933eb1",
            "owner_id": "29049363",
            "format": [
                "static"
            ],
            "scale": [
                "1.0",
                "2.0",
                "3.0"
            ],
            "theme_mode": [
                "light",
                "dark"
            ]
        },
        {
            "id": "emotesv2_5fc622b60ef54561b3f6f76202d142fa",
            "name": "rebell1Lurk",
            "images": {
                "url_1x": "https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_5fc622b60ef54561b3f6f76202d142fa/static/light/1.0",
                "url_2x": "https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_5fc622b60ef54561b3f6f76202d142fa/static/light/2.0",
                "url_4x": "https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_5fc622b60ef54561b3f6f76202d142fa/static/light/3.0"
            },
            "emote_type": "follower",
            "emote_set_id": "f302a315-4fac-4e36-a9f3-3c7915933eb1",
            "owner_id": "29049363",
            "format": [
                "static"
            ],
            "scale": [
                "1.0",
                "2.0",
                "3.0"
            ],
            "theme_mode": [
                "light",
                "dark"
            ]
        }
    ],
    "template": "https://static-cdn.jtvnw.net/emoticons/v2/{{id}}/{{format}}/{{theme_mode}}/{{scale}}"
}

Yep, these are the follower emote set
And in the new API I guess the id isn't a number anymore (https://dev.twitch.tv/docs/api/reference#get-emote-sets)

@Gikkman Gikkman closed this as completed in 1035b7a Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants