jaredhanson / jaredhanson/junction
Mysterious Authentication Failure
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 106
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the authentication failure with the shown junction.create() setup and the xmpp.connect() credentials, then inspect Junction's connection and error-handling entry points. Compare the result with the Node.js 7.10 compatibility question; done means identifying the cause and documenting or correcting the authentication failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- backend, networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100