Skip to content
This repository has been archived by the owner on Nov 19, 2021. It is now read-only.

Trace: crypto.createCredentials is deprecated. Use tls.createSecureContext instead. #66

Open
zacharyabresch opened this issue Dec 2, 2015 · 1 comment

Comments

@zacharyabresch
Copy link

I was trying to setup a connection to my company's XMPP server and received this error message. From what I can tell, I've set things up properly so I'm not sure how to resolve this error.

System Details

  • Node Version: v4.1.2
  • OS: OSX El Capitan (v10.11.1)

Code Example

I had to hide the actual credentials and server since this is a private server.

// Generated by CoffeeScript 1.10.0
(function() {
  var xmpp;

  xmpp = require('simple-xmpp');

  xmpp.on('online', function(data) {
    console.log("Connected with JID: " + data.jid.user);
    return console.log("Yes, I'm connected!");
  });

  xmpp.on('error', function(err) {
    return console.error(err);
  });

  xmpp.connect({
    jid: "[My JID]",
    password: '[My Password]',
    host: '[My Host]',
    port: 5222
  });

}).call(this);

I ran this file with node --trace-deprecation lib/app/javascript/xmppClient.js and got the following output:

Trace: crypto.createCredentials is deprecated. Use tls.createSecureContext instead.
    at Object.exports._printDeprecationMessage (internal/util.js:27:13)
    at Object.deprecated [as createCredentials] (internal/util.js:51:22)
    at connect (/Users/zabresch/Documents/8x8/electron/sso/node_modules/tls-connect/starttls.js:231:50)
    at Connection.setSecure (/Users/zabresch/Documents/8x8/electron/sso/node_modules/node-xmpp-core/lib/Connection.js:321:21)
    at Connection.onStanza (/Users/zabresch/Documents/8x8/electron/sso/node_modules/node-xmpp-core/lib/Connection.js:368:14)
    at StreamParser.<anonymous> (/Users/zabresch/Documents/8x8/electron/sso/node_modules/node-xmpp-core/lib/Connection.js:226:14)
    at emitOne (events.js:77:13)
    at StreamParser.emit (events.js:169:7)
    at SaxLtx.<anonymous> (/Users/zabresch/Documents/8x8/electron/sso/node_modules/node-xmpp-core/lib/StreamParser.js:59:22)
    at emitOne (events.js:77:13)
XMPP authentication failure

Has anyone else had this issue? Does anyone have any suggestions on how to resolve it? From the looks of it, the error might be from node-xmpp-core but I saw no issues posted on that repository. Any help would be greatly appreciated! Thanks!

@zacharyabresch
Copy link
Author

Found an issue on node-xmpp-core but no responses have been made.

Also, I'm thinking that it's my XMPP authentication that's actually failing since this is just a warning. Working on it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant