jaredhanson / jaredhanson/junction
Deprecation warning for TLS resulting a failed connection.
- Dominant language
- JavaScript
- Stars
- 106
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
I have the following working sample:
```
const junction=require('junction');
var app = junction()
.use(junction.messageParser())
.use(junction.presenceParser());
app.connect({ jid: 'admin@example.com', password: 'admin' }).on('online', function() {
console.log('connected as: ' + this.jid);
this.send(new Presence());
});
```
But when i try to run it like:
```
NODE_ENV=dev DEBUG="xmpp:*,junction" node ./src/index.js
```
I get the following errors:
```
Cannot load StringPrep-0.1.0 bindings. You may need to `npm install node-stringprep'
junction use * messageParser +0ms
junction use * presenceParser +0ms
(node:7800) [DEP0064] DeprecationWarning: tls.createSecurePair() is deprecated. Please use tls.Socket instead.
events.js:188
throw err;
^
Error: Unhandled "error" event. (XMPP authentication failure)
at Client.emit (events.js:186:19)
at Client.onRawStanza (/home/pcmagas/Kwdikas/master_thesis/junction/node_modules/node-xmpp/lib/xmpp/client.js:124:18)
at emitOne (events.js:116:13)
at Client.emit (events.js:211:7)
at Client.Connection.onStanza (/home/pcmagas/Kwdikas/master_thesis/junction/node_modules/node-xmpp/lib/xmpp/connection.js:237:14)
at StreamParser. (/home/pcmagas/Kwdikas/master_thesis/junction/node_modules/node-xmpp/lib/xmpp/connection.js:136:14)
at emitOne (events.js:116:13)
at StreamParser.emit (events.js:211:7)
at Parser. (/home/pcmagas/Kwdikas/master_thesis/junction/node_modules/node-xmpp/lib/xmpp/stream_parser.js:42:22)
at emitOne (events.js:116:13)
```
On nodejs version `8.11.1` results ending the programm whilst on nodejs `10.13.0` just throws this warning and continues without the `online` event happens.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running the supplied junction sample with the shown DEBUG command under Node.js 8.11.1 and 10.13.0. Read the stack traces in node_modules/node-xmpp/lib/xmpp/client.js and connection.js, and check the StringPrep binding warning. Done means the reported TLS warning or connection failure is addressed and the sample reaches the online event.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100