superfeedr / superfeedr-node

A library to interract with Superfeedr's XMPP API in any node application
http://superfeedr.com/documentation#xmpp_pubsub
31 stars 17 forks source link

Can't build on node 0.12 #22

Open chrisyip opened 9 years ago

chrisyip commented 9 years ago

node-xmpp <=0.15 doesn't support node 0.12, node-gyp will throw errors.

So I tried to upgrade node-xmpp to 1.0.0-alpha2. Build succeeded, but I could not pass the tests:

> superfeedr@0.2.0 test /Users/Chris/Workspace/node/superfeedr-node
> export NODE_ENV=test; mocha

Cannot load StringPrep-0.7.0 bindings (using fallback). You may need to `npm install node-stringprep`
Cannot load StringPrep-0.7.0 bindings (using fallback). You may need to `npm install node-stringprep`

  createCredentials() is deprecated, use tls.createSecureContext instead
/Users/Chris/Workspace/node/superfeedr-node/node_modules/mocha/lib/runner.js:93
  test.failed = true;
              ^
TypeError: Cannot set property 'failed' of undefined
    at Runner.fail (/Users/Chris/Workspace/node/superfeedr-node/node_modules/mocha/lib/runner.js:93:15)
    at process.<anonymous> (/Users/Chris/Workspace/node/superfeedr-node/node_modules/mocha/lib/runner.js:354:10)
    at emitOne (events.js:77:13)
    at process.emit (events.js:169:7)
    at process._fatalException (node.js:211:26)
    at emitOne (events.js:77:13)
    at Connection.emit (events.js:169:7)
    at Connection.onStanza (/Users/Chris/Workspace/node/superfeedr-node/node_modules/node-xmpp/node_modules/node-xmpp-core/lib/connection.js:352:14)
    at StreamParser.<anonymous> (/Users/Chris/Workspace/node/superfeedr-node/node_modules/node-xmpp/node_modules/node-xmpp-core/lib/connection.js:221:14)
    at emitOne (events.js:77:13)
    at StreamParser.emit (events.js:169:7)
    at SaxExpat.<anonymous> (/Users/Chris/Workspace/node/superfeedr-node/node_modules/node-xmpp/node_modules/node-xmpp-core/lib/stream_parser.js:56:22)
    at emitOne (events.js:77:13)
    at SaxExpat.emit (events.js:169:7)
    at null.<anonymous> (/Users/Chris/Workspace/node/superfeedr-node/node_modules/node-xmpp/node_modules/ltx/lib/sax/sax_expat.js:16:14)
    at emitOne (events.js:77:13)
    at emit (events.js:169:7)
    at Parser.parse (/Users/Chris/Workspace/node/superfeedr-node/node_modules/node-xmpp/node_modules/node-expat/lib/node-expat.js:23:22)
    at SaxExpat.write (/Users/Chris/Workspace/node/superfeedr-node/node_modules/node-xmpp/node_modules/ltx/lib/sax/sax_expat.js:27:22)
    at StreamParser.write (/Users/Chris/Workspace/node/superfeedr-node/node_modules/node-xmpp/node_modules/node-xmpp-core/lib/stream_parser.js:125:21)
    at Connection.onData (/Users/Chris/Workspace/node/superfeedr-node/node_modules/node-xmpp/node_modules/node-xmpp-core/lib/connection.js:288:21)
    at emitOne (events.js:82:20)
    at TLSSocket.emit (events.js:169:7)
    at readableAddChunk (_stream_readable.js:145:16)
    at TLSSocket.Readable.push (_stream_readable.js:109:10)
    at TLSWrap.onread (net.js:509:20)
julien51 commented 9 years ago

I think we'll need to make sure @node-xmpp works with Node 0.12.0. Any idea @lloydwatkin ?

lloydwatkin commented 9 years ago

@chrisyip you'll need to upgrade to a more recent alpha than alpha2. Also @julien51 rather than use node-xmpp you should now be using one of the sub-components (as appropriate) node-xmpp-client/component/server.

I think we need to do some upgrades for the latest versions of 0.12 (due to v8 changes) but I've been really busy. @sonnyp or @chrisrock may be able to get these out quicker than me.

julien51 commented 9 years ago

Awesome! Thansk @lloydwatkin for the quick update. I'll do the dependency change as soon as I find a minute. Feel free to submit a PR @chrisyip :)

chrisyip commented 9 years ago

@lloydwatkin you mean we should wait for node-xmpp aplha3 or higher?

davepenfold commented 9 years ago

Any ideas why I get a "XMPP authentication failure" for the nodesample account which is being used in the tests?

Here's what I have so far: https://github.com/davepenfold/superfeedr-node

julien51 commented 9 years ago

Dave, This happens when you use credentials which are not right, like a bad password or a token which does not allow for XMPP. Thanks

On Mon, Jun 22, 2015 at 1:42 AM, Dave Penfold notifications@github.com wrote:

Any ideas why I get a "XMPP authentication failure" for the nodesample account which is being used in the tests?

Here's what I have so far: https://github.com/davepenfold/superfeedr-node

— Reply to this email directly or view it on GitHub https://github.com/superfeedr/superfeedr-node/issues/22#issuecomment-113969124 .

Julien Genestoux Superfeedr https://superfeedr.com/ julien@superfeedr.com 4158306574