Closed Sharaal closed 7 years ago
Add "debug: true, showErrors: true", it will show more info about the problem.
Thx, that output looks a bit better to find a solution:
2016-10-04T13:55:21.643299+00:00 app[bot.1]: 4 Oct 13:55:21 - Sending irc NICK/USER
2016-10-04T13:55:21.643454+00:00 app[bot.1]: 4 Oct 13:55:21 - SEND: NICK maxdome
2016-10-04T13:55:21.643716+00:00 app[bot.1]: 4 Oct 13:55:21 - SEND: USER nodebot 8 * :nodeJS IRC client
2016-10-04T13:55:30.451033+00:00 app[bot.1]: 4 Oct 13:55:30 - GOT NOTICE from the server: "*** Notice -- You need to identify via SASL to use this server"
2016-10-04T13:55:30.451537+00:00 app[bot.1]: 4 Oct 13:55:30 - [01;31mUnhandled message: { command: 'ERROR',
2016-10-04T13:55:30.451539+00:00 app[bot.1]: rawCommand: 'ERROR',
2016-10-04T13:55:30.451540+00:00 app[bot.1]: commandType: 'normal',
2016-10-04T13:55:30.451541+00:00 app[bot.1]: args: [ 'Closing Link: ec2-54-216-9-66.eu-west-1.compute.amazonaws.com (SASL access only)' ] }[0m
2016-10-04T13:55:30.452175+00:00 app[bot.1]: 4 Oct 13:55:30 - Connection got "end" event
2016-10-04T13:55:30.452254+00:00 app[bot.1]: 4 Oct 13:55:30 - Connection got "close" event
2016-10-04T13:55:30.452330+00:00 app[bot.1]: 4 Oct 13:55:30 - Disconnected: reconnecting
2016-10-04T13:55:30.452369+00:00 app[bot.1]: 4 Oct 13:55:30 - Waiting 2000ms before retrying
I will try it with an own account for the bot and the sasl true option like descriped here: http://stackoverflow.com/questions/18687947/how-to-join-password-protected-irc-server-using-nodejs-irc-module
But it seems I miss something, set SASL to true and set username/password to an existing freenode account:
2016-10-04T14:17:28.222465+00:00 app[bot.1]: 4 Oct 14:17:28 - SEND: CAP REQ sasl
...
2016-10-04T14:17:36.419150+00:00 app[bot.1]: 4 Oct 14:17:36 - [01;31mUnhandled message: { prefix: 'card.freenode.net',
2016-10-04T14:17:36.419161+00:00 app[bot.1]: server: 'card.freenode.net',
2016-10-04T14:17:36.419162+00:00 app[bot.1]: command: '904',
2016-10-04T14:17:36.419163+00:00 app[bot.1]: rawCommand: '904',
2016-10-04T14:17:36.419163+00:00 app[bot.1]: commandType: 'normal',
2016-10-04T14:17:36.419164+00:00 app[bot.1]: args: [ 'maxdome', 'SASL authentication failed' ] }[0m
I found the issue.
In the stackoverflow answer is said the options are:
options: {sasl:true, username: "myBotName", password: "myBotPasswordHere"}
But the attribute "username" must be written as "userName". So this options are needed:
options: {sasl:true, userName: "myBotName", password: "myBotPasswordHere"}
Now my bot connects to freenode. Thx for the hint how to debug. :)
Hey,
I have a small chatbot using the "irc" package. I just initialize the irc client and add an error handler to it. The project also have a "Procfile" for Heroku with "bot: npm start". Locally all works, but after deploy on Heroku the app is running, but the IRC connection seems not to work. There is no chatbot coming online and also no errors are emitted.
Someone already have experience with that and maybe I miss something?
Some ressources: