bitwalker / exirc

IRC client adapter for Elixir projects
http://bitwalker.github.io/exirc/
MIT License
154 stars 37 forks source link

no function clause matching in ExIrc.Channels.user_join/3 (slack irc bridge) #56

Closed knewter closed 5 years ago

knewter commented 8 years ago

I got this error in my logs just now. Haven't dug in yet but wanted to go ahead and capture it for future perusal. This comes from my tool that watches slack channels via the IRC bridge. Maybe they're doing something inappropriate, or maybe there's a bug that affects normal / proper IRC servers. I hope to dig in later.

16:41:31.660 [error] GenServer #PID<0.173.0> terminating
** (FunctionClauseError) no function clause matching in ExIrc.Channels.user_join/3
    (exirc) lib/exirc/channels.ex:99: ExIrc.Channels.user_join({46, {"#core", %ExIrc.Channels.Channel{modes: [], name: "#core", topic: "Discuss Elm core libraries", type: :public, users: ["adulteratedjedi", "ajhyndman", "aschlapsi", "asyncsrc", "athanclark", "av", "b", "b3-17", "bdelm", "benbrandt", "bipvanwinkle", "bruceape", "bryanbierce", "burak", "capicue", "carleryd", "cburrows", "ccapndave", "chazza", "choucri", "christianc", "cliff", "cobalamin", "connorj", "cschneid", "davearonson", "davydog187", "debois", "dremora", "dsirola", "duggiefresh", "dusky", "dzok", "ernestojc", "esdott", "etaque", "franco", "fredcy", "funkybunky", "furd", "gjaldon", "greg.ziegan", "groob", ...]}, {"#animations", %ExIrc.Channels.Channel{modes: [], name: "#animations", topic: ":clapper:", type: :public, users: ["23ua", "abrykajlo", "adambubenicek", "adamdicarlo", "akbiggs", "alexlew", "andreasgrimm", "aostiles", "aotarola", "arnau", "benbrandt", "bigardone", "burak", "cabbiepete", "camilleriluke", "canavar", "chae", "chhetrisushil", "choucri", "christianc", "chuckrector", "codeithuman", "cortlandd", "cortrah", "davidxmoody", "deepak", "devilcoders", "doomz", "dremora", "dsirola", "elephant", "epequeno", "ernestojc", "esmevane", "fendor", "flash4syth", "francescortiz", "fredcy", "gerred", "gilesgoatboy", ...]}, nil, {"#boulder", %ExIrc.Channels.Channel{modes: [], name: "#boulder", topic: "http://www.meetup.com/Elm-user-group-Boulder/", type: :public, users: ["adamdill", "alan", "antsankov", "avarnell", "bijanbwb", "bkonkle", "bkuhlmann", "crisonyx", "cryptoquick", "ernestojc", "heath", "jadams", "james", "jdumonde", "jeffcole", "lyonsb", "mattaym", "modulusmathews", "myklam", "ngmiller", "rtfeldman", "seanhelvey", "shepbook", "skywinston", "timb", "toastal"]}, {"#audio-music-synth", %ExIrc.Channels.Channel{modes: [], name: "#audio-music-synth", topic: [], type: :public, users: ["517", "a-l-f", "amaginomad", "av", "b", "basti1302", "benbrandt", "bgmarx", "blund", "bruceape", "brunoalcides", "choucri", "cliff", "cobalamin", "corey_speisman", "derkyjadex", "englishm", "ernestojc", "flash4syth", "freska", "greyhwndz", "grommett", "iancanderson", "ijcd", "irh", "jackschaedler", "jadams", "jamert", "james", "jamesbvaughan", "jondashkyle", "jteneycke", "kaaloo", "kotoshenya", ...]}, nil, {"#better-elm-lang-org", %ExIrc.Channels.Channel{modes: [], name: "#better-elm-lang-org", topic: [], type: :public, users: ["3dgrabber", "517", "abarylko", "adambubenicek", "adulteratedjedi", "ajhager", "akhil", "alfialfi", "andrew", "andrew.pierce", "andyhoang", "anler", "arnau", "asyncsrc", "av", "b", "ben_g", "benbrandt", "benjamingb", "bigjonroberts", "blake", "brian.capozzi", "bruceape", "brunoalcides", "bryanbierce", "burak", "butters", "canavar", "capicue", "cgoboncan", "chae", ...]}, {"#beginners", %ExIrc.Channels.Channel{modes: [], name: "#beginners", topic: "FAQs at http://faq.elm-community.org/", type: :public, users: ["0padougie", "13tales", "1602", "1use", "23ua", "29decibel", "2t", "37signs", "3noch", "44px", "4eek", "50kudos", "517", "5c077m", "5outh", "a-l-f", "a.c.", "a.carpe", "a5308y", "a7p", "a_kovalevych", "aadimator", "aadu", "aaparmeggiani", "aardito", "aaron", "abaez", "abarylko", ...]}, nil, nil}, nil}}, {"#cool-papers", %ExIrc.Channels.Channel{modes: [], name: "#cool-papers", topic: ":nerd_face:", type: :public, users: ["alogbot", "archivebot", "benbrandt", "blimpse", "cdouglass", "codekult", "dajjedzenie", "deepak", "elliotdavies", "enilsen16", "ernestojc", "franzejr", "fredcy", "gnandretta", "heath", "jadams", "joehealy", "jonschoning", "jwood", "krisajenkins", "logbot", "lorien", "luke", "mbaumann", "mrjmad", "myklam", "noelwk", "rohan", "seanohue", "shepbook", "szabba", "thomasweiser", "toastal"]}, nil, nil}}}, {"#gamedev", %ExIrc.Channels.Channel{modes: [], name: "#gamedev", topic: [], type: :public, users: ["7sharp9", "adamdicarlo", "addnab", "adjective", "adulteratedjedi", "aimarz", "ajhager", "akbiggs", "alexlew", "anreinha", "archivebot", "aristides", "arjun", "arnauld", "astynax", "av", "b", "b0urb4k1", "benbrandt", "bennyhallett", "bijanbwb", "binarymuse", "bjorse", "blake", "brennan", "brunocad", "bryanbierce", "burak", "butters", "casperlotter", "cf", "chad_fennell", "chadtech", "chrisbolin", "cliff", "cobalamin", "colinwahl", "cortlandd", "cryptoquick", "danneu", ...]}, {"#elm-style", %ExIrc.Channels.Channel{modes: [], name: "#elm-style", topic: [], type: :public, users: ["adam_albrecht", "adulteratedjedi", "aimarz", "akhil", "alexlew", "arecvlohe", "av", "benbrandt", "bf4", "bigredhdl", "bobbolocks", "bruceape", "brunoalcides", "cdcarter", "chae", "cheerschopper", "chriswk", "d3ddd", "da", "danny", "davearonson", "dfreeman", "dondondon", "ernestojc", "gabrielelana", "greyhwndz", "gryffindorstudent", "heartmo", "homburg", "isaac", "jadams", "jcaudle", "jm", "josh127", "jteneycke", "justin", "maksar", ...]}, {"#elm-playground-news", %ExIrc.Channels.Channel{modes: [], name: "#elm-playground-news", topic: [], type: :public, users: ["cobalamin", "ernestojc", "jadams", "mukeshsoni", "pdamoc", "thomasweiser"]}, {"#design-patterns", %ExIrc.Channels.Channel{modes: [], name: "#design-patterns", topic: [], type: :public, users: ["a-l-f", "adambubenicek", "adamdicarlo", "alexgig", "alexlew", "allansson", "andre", "andreasgrimm", "anthony.deschamps", "asyncsrc", "b3-17", "bas", "benbrandt", "bennyhallett", "bjorse", "brianhicks", "cdouglass", "chae", "charliek", "choucri", "ciaranphillips", "codeithuman", "codekult", "coreyhaines", "dabeshouse", "daniphilia", "dannyob", "davearonson", "davegomez", "david_hernandez", "davydog187", ...]}, {"#denver", %ExIrc.Channels.Channel{modes: [], name: "#denver", topic: [], type: :public, users: ["adamdill", "alan", "aristides", "bkonkle", "cryptoquick", "cschneid", "dfalling", "dwilson", "ernestojc", "fresheyeball", "halcyonprod", "heath", "jadams", "james", "jdumonde", "jelmscript", "joshmili", "kofi", "lyonsb", "makyo", "modulusmathews", "myklam", "plaxdan", "pythe", "rtfeldman", "seanhelvey", "shepbook", "spartans63", ...]}, nil, nil}, {"#elm-dev", %ExIrc.Channels.Channel{modes: [], name: "#elm-dev", topic: [], type: :public, users: ["3dgrabber", "7sharp9", "a-l-f", "a.carpe", "aarvay", "abadi199", "adamdicarlo", "adulteratedjedi", "aef", "ajhyndman", "alexeygolev", "alexlew", "alf", "aljon.aniban", "allema_s", "alphalambda", "andersoncliffb", "andybalaam", "andyeskridge", "anronin", "antonis", "apanatshka", "archivebot", "ariaminaei", "artem_mt", "asampal", "aschlapsi", "ashnur", ...]}, {"#electron", %ExIrc.Channels.Channel{modes: [], name: "#electron", topic: [], type: :public, users: ["7sharp9", "adam_albrecht", "adulteratedjedi", "ajhager", "alexk", "andreasgrimm", "anreinha", "arnau", "aschlapsi", "ashishnegi", "augustin82", "av", "benbrandt", "bf4", "binarymuse", "bogdan", "bryanbierce", "burak", "butters", "bvenkatr", "casperlotter", "chadtech", "chae", "charliek", "choucri", ...]}, {"#eeue56-experiments", %ExIrc.Channels.Channel{modes: [], name: "#eeue56-experiments", topic: [], type: :public, users: ["abadi199", "annavlz", "anronin", "archivebot", "arnau", "athanclark", "av", "b", "bjorse", "creamycode", "deepak", "devnacho", "doppioslash", "e.fu", "eeue56", "enilsen16", "ernestojc", "etaque", "fabio", "francisdb", "fredcy", "groob", ...]}, {"#editors-and-ides", %ExIrc.Channels.Channel{modes: [], name: "#editors-and-ides", topic: [], type: :public, users: ["13tales", "23ua", "7sharp9", "a-l-f", "abadi199", "abarylko", "adam_albrecht", "adirsh", "adulteratedjedi", "ajhager", "ajhyndman", "andreasgrimm", "andyhoang", "antoine", "antonis", "apanatshka", "apotropaix", "archivebot", "aschlapsi", ...]}, nil, nil}, nil}, {"#elm-css", %ExIrc.Channels.Channel{modes: [], name: "#elm-css", topic: "https://github.com/rtfeldman/elm-css", type: :public, users: ["7sharp9", "a.carpe", "abadi199", "abarylko", "adai", "adam_albrecht", "adrian_roe", "adulteratedjedi", "ajhager", "alf", "andershansson", "ander (truncated)
bitwalker commented 8 years ago

This would happen if nick is a list when passed to user_join. I added a test for a valid JOIN event, and nick always come through as a binary. However if the server sent JOIN <channel> (which is a client command, not a server command), then nick would be an empty list. Attempts at producing invalid messages like : JOIN <channel> fail in the parser, so I doubt it's that. It looks to me like this is a problem with the Slack -> IRC bridge, but if you can figure out what message triggered this, we can try and determine if it's a problem with the parser.

shymega commented 7 years ago

@knewter Hi. Has this been resolved ref: Slack? Wondering if they've fixed it yet. :smile:

tchoutri commented 5 years ago

I'm closing this issue since the slack IRC gateway closed last year