Skip to content

Mysterious Authentication Failure #11

Description

@dorklord23

Hi :)

I stumbled upon this problem when began using Junction :

events.js:168
      throw err;
      ^

Error: Uncaught, unspecified "error" event. (XMPP authentication failure)
    at Client.emit (events.js:166:17)
    at Client.onRawStanza (/home/aria/Projects/simpeg-extended/server/node_modules/node-xmpp/lib/xmpp/client.js:124:18)
    at emitOne (events.js:96:13)
    at Client.emit (events.js:191:7)
    at Client.Connection.onStanza (/home/aria/Projects/simpeg-extended/server/node_modules/node-xmpp/lib/xmpp/connection.js:237:14)
    at StreamParser.<anonymous> (/home/aria/Projects/simpeg-extended/server/node_modules/node-xmpp/lib/xmpp/connection.js:136:14)
    at emitOne (events.js:96:13)
    at StreamParser.emit (events.js:191:7)
    at Parser.<anonymous> (/home/aria/Projects/simpeg-extended/server/node_modules/node-xmpp/lib/xmpp/stream_parser.js:42:22)
    at emitOne (events.js:96:13)

I used code from the examples like this :

let junction = require('junction')
let Message = junction.elements.Message
let Presence = junction.elements.Presence

var xmpp = junction.create()
    .use(junction.messageParser())
    .use(junction.presenceParser());

xmpp.use(junction.message(function(handler) {
    handler.on('chat', function(stanza) {
        var msg = new Message(stanza.from);
        msg.c('body', {}).t('Hello ' + stanza.from + '!\n\n' + 'You said: ' + stanza.body);
        stanza.connection.send(msg);
    });
}));

xmpp.use(junction.serviceUnavailable())
    .use(junction.errorHandler());

xmpp.connect({ jid: 'jin_simpeg@localhost', password: 'simpeg123456' }).on('online', function() {
    console.log('connected as: ' + this.jid);
    this.send(new Presence());
});

I use Node.js 7.10. I hope Junction is still compatible with that version.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions