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

Server connection crashed #367

Open
abruzzihraig opened this issue Oct 17, 2014 · 4 comments
Open

Server connection crashed #367

abruzzihraig opened this issue Oct 17, 2014 · 4 comments
Labels

Comments

@abruzzihraig
Copy link

Hi, guys

I met a issue when i try to connect with subway.
In my server, i deployed two service ‘subway' and 'ircdjs'.
After i inputed my server ip to subway website, click the button 'connect', The server output some error logs below:

7 Oct 00:33:13 - SEND: NICK oo
17 Oct 00:33:13 - SEND: USER subway 8 * :nodeJS IRC client
17 Oct 00:33:13 - NICK: null changes nick to oo
{ prefix: '[email protected]',
  nick: 'null',
  user: 'null',
  host: '107.170.233.130',
  command: 'NICK',
  rawCommand: 'NICK',
  commandType: 'normal',
  args: [ 'oo' ],
  client_server: '107.170.233.130' }

/home/abruzzi/public/subway/node_modules/irc/lib/irc.js:664
                    throw err;
                          ^
TypeError: Cannot call method 'get' of undefined
    at util.handle_irc (/home/abruzzi/public/subway/src/js/handle_irc.js:150:18)
    at Client.<anonymous> (/home/abruzzi/public/subway/lib/connection.js:68:7)
    at Client.emit (events.js:117:20)
    at /home/abruzzi/public/subway/node_modules/irc/lib/irc.js:661:22
    at Array.forEach (native)
    at Socket.<anonymous> (/home/abruzzi/public/subway/node_modules/irc/lib/irc.js:655:15)
    at Socket.emit (events.js:95:17)
    at Socket.<anonymous> (_stream_readable.js:764:14)
    at Socket.emit (events.js:92:17)
    at emitReadable_ (_stream_readable.js:426:10)

I found the code in src/js/handle_irc.js:

var conn = irc.get("connections");
// Alias the long namespace
var server = conn.get(message.client_server);

and outputed this two variables 'conn' and 'server' with console.log, i got the results below:

// console.log(conn);
{ length: 0, models: [], _byId: {} }
// console.log(server);
undefined

Is there something wrong in my config?

Thx.

@mgj
Copy link

mgj commented Dec 3, 2014

Im also receiving this error, frequently, with a default setup

@thedjpetersen
Copy link
Owner

no your config is correct this looks like it is definitely a bug

@thedjpetersen
Copy link
Owner

@abruzzihraig I am having quite a bit of trouble reproducing usually this is related to earlier activity could you paste a longer log of the irc activity before this broke?

@crivetimihai
Copy link

I have encountered the same issue connecting to a private IRC daemon.

Actual result:

  • Subway crashes with /opt/dockerapp/node_modules/irc/lib/irc.js:682 TypeError: Cannot call method 'set' of undefined

How to reproduce:

  1. Install a IRC daemon - such as: carver/ngircd
  2. Install subway
  3. Log into subway
  4. Connect to the private IRC server (just provide the IP, nick and port)

Logs

server.js

Done, without errors.
17 Jul 21:59:42 - SEND: NICK test
17 Jul 21:59:42 - SEND: USER subway 8 * :nodeJS IRC client
{ prefix: 'irc.example.net',
  server: 'irc.example.net',
  command: 'rpl_welcome',
  rawCommand: '001',
  commandType: 'reply',
  args:
   [ 'test',
     'Welcome to the Internet Relay Network [email protected]' ],
  client_server: '192.168.0.5' }

/opt/dockerapp/node_modules/irc/lib/irc.js:682
                    throw err;
                          ^
TypeError: Cannot call method 'set' of undefined
    at util.handle_irc (/opt/dockerapp/src/js/handle_irc.js:167:14)
    at Client.<anonymous> (/opt/dockerapp/lib/connection.js:81:7)
    at Client.emit (events.js:117:20)
    at /opt/dockerapp/node_modules/irc/lib/irc.js:679:22
    at Array.forEach (native)
    at Socket.<anonymous> (/opt/dockerapp/node_modules/irc/lib/irc.js:673:15)
    at Socket.emit (events.js:95:17)
    at Socket.<anonymous> (_stream_readable.js:748:14)
    at Socket.emit (events.js:92:17)
    at emitReadable_ (_stream_readable.js:410:10)

Assumptions

Thanks!

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

4 participants