I am trying to setup node-xmpp server, client, bosh and core modules of node and i installed every dependency for node-xmpp test.
When i run "npm test" from node-xmpp project. The Bosh server test got fail during test. Following is npm test log. Please any one help me to resolve my node-xmpp-bosh server issue.
oneadmin@openflow1:~/Desktop/node-xmpp$ npm test
> node-xmpp@1.0.0-alpha2 test /home/one/Desktop/node-xmpp
> grunt test
Running "mochacli:all" (mochacli) task
JID
parsing
✓ should parse a "domain" JID
✓ should parse a "user@domain" JID
✓ should parse a "domain/resource" JID
✓ should parse a "user@domain/resource" JID
✓ should parse an internationalized domain name as unicode
✓ should parse an empty domain JID (#109)
✓ shouldn't get U_STRINGPREP_PROHIBITED_ERROR (#93)
✓ should parse an internationalized domain name as ascii/punycode
✓ should parse a JID with punycode
serialization
✓ should serialize a "domain" JID
✓ should serialize a "user@domain" JID
✓ should serialize a "domain/resource" JID
✓ should serialize a "user@domain/resource" JID
equality
✓ should parsed JIDs should be equal
✓ should parsed JIDs should be not equal
✓ should should ignore case in user
✓ should should ignore case in domain
✓ should should not ignore case in resource
✓ should should ignore international caseness
C2Server
events
✓ should be in the right order for connecting (53ms)
✓ should ping pong stanza
✓ should close the connection
TCP client/server
client
✓ should go online (46ms)
✓ should send a stanza
✓ should receive a stanza
✓ Can send plain text stanza
TLS
Server started
server
✓ should go online (183ms)
✓ should accept plain authentication (164ms)
✓ should not accept plain authentication (125ms)
BOSH connections
1) Can register an account
2) Errors on bad authentication details
3) Can connect to an account with resource
4) Can connect to an account without resource
5) Fails on registering a duplicate account
6) Can send and receive a stanza
7) Can send and receive stanzas
8) Sends error for bad stanza
✓ Errors when server is stopped (44ms)
9) Errors when providing bad BOSH url
- Disconects
Socket connections
✓ Can register an account
✓ Errors on bad authentication details
✓ Can connect to an account with resource
✓ Can connect to an account without resource
✓ Fails on registering a duplicate account
✓ Can send and receive a stanza
✓ Sends error for bad stanza
✓ Can't connect when server is stopped (42ms)
✓ Disconects
Anonymous authentication
Detect SASL mechanisms
✓ Should return true
Digest-md5 authentication
Detect SASL mechanisms
✓ Should return true if 'password' property exists
✓ Should return false if 'password' property doesn't exist
External authentication
Detect SASL mechanisms
✓ Should return true if 'credentials' property exists
✓ Should return false if 'credentials' property doesn't exist
Plain authentication
Detect SASL mechanisms
✓ Should return true if 'password' property exists
✓ Should return false if 'password' property doesn't exist
Facebook authentication
Detect SASL mechanisms
✓ Should return true if options.host = chat.facebook.com
✓ Should return true if options.jid contains 'chat.facebook.com'
✓ Should return false if neither situation is satisfied
XOAuth2 authentication
Detect SASL mechanisms
✓ Should return false if 'oauth2_auth' property doesn't exist
✓ Should return false if 'oauth2_auth' does not have correct value
✓ Should return true if 'oauth2_auth' has correct value
Reconnect
Network problems
✓ should reconnect when server connection is temporary lost (1162ms)
✓ should keep reconnecting (198ms)
SASL
PLAIN
✓ should accept plain authentication (111ms)
✓ should not accept plain authentication (73ms)
XOAUTH-2
✓ should accept google authentication (45ms)
DIGEST MD5
✓ should accept digest md5 authentication (112ms)
✓ should not allow to skip digest md5 challenges (505ms)
CUSTOM
✓ should accept custom authentication (115ms)
✓ should not accept custom authentication (71ms)
Authentication
✓ Sends opening <stream/>
Integration tests
10) "before each" hook
Authentication
✓ Sends opening <stream/>
✓ Sends handshake
✓ Reports 'connected' once connected
✓ Handles failed bad handshake
JID
escaping
✓ escape `space cadet@example.com`
✓ escape `call me "ishmael"@example.com`
✓ escape `at&t guy@example.com`
✓ escape `d'artagnan@example.com`
✓ escape `/.fanboy@example.com`
✓ escape `::foo::@example.com`
✓ escape `<foo>@example.com`
✓ escape `user@host@example.com`
✓ escape `c:\net@example.com`
✓ escape `c:\\net@example.com`
✓ escape `c:\cool stuff@example.com`
✓ escape `c:\5commas@example.com`
detect escaped jids
✓ escape `space\20cadet@example.com`
✓ escape `call me "ishmael"@example.com`
✓ escape `at\26t\20guy@example.com`
✓ escape `d\27artagnan@example.com`
✓ escape `\2f.fanboy@example.com`
✓ escape `\3a\3afoo\3a\3a@example.com`
✓ escape `\3cfoo\3e@example.com`
✓ escape `user\40host@example.com`
✓ escape `c\3a\5cnet@example.com`
✓ escape `c:\\net@example.com`
✓ escape `c\3a\5ccool\20stuff@example.com`
✓ escape `c\3a\5c5commas@example.com`
JID
parsing
✓ should parse a "domain" JID
✓ should parse a "user@domain" JID
✓ should parse a "domain/resource" JID
✓ should parse a "user@domain/resource" JID
✓ should parse an internationalized domain name as unicode
✓ should parse an empty domain JID (#109)
✓ should allow access to jid parts using (old) keys
✓ should allow access to jid parts using (old) keys
✓ shouldn't get U_STRINGPREP_PROHIBITED_ERROR (#93)
✓ should parse an internationalized domain name as ascii/punycode
✓ should parse a JID with punycode
serialization
✓ should serialize a "domain" JID
✓ should serialize a "user@domain" JID
✓ should serialize a "domain/resource" JID
✓ should serialize a "user@domain/resource" JID
equality
✓ should parsed JIDs should be equal
✓ should parsed JIDs should be not equal
✓ should should ignore case in user
✓ should should ignore case in domain
✓ should should not ignore case in resource
✓ should should ignore international caseness
✓ should work with bare JIDs
Stanza
create
iq
✓ should return an iq stanza
✓ should return an iq stanza
message
✓ should return a message stanza
✓ should return an iq stanza
presence
✓ should return a presence stanza
✓ should return a presence stanza
common attributes as properties
from
✓ should set "from" attribute
✓ should get "from" attribute
to
✓ should set "to" attribute
✓ should get "from" attribute
id
✓ should set "id" attribute
✓ should get "id" attribute
type
✓ should set "type" attribute
✓ should get "type" attribute
Issues
✓ Shouldn't crash on invalid JID
11) Shouldn't crash on invalid JID
Stream without proper "to" attribute
SASL
Handle stream with empty "to"
PLAIN
12) "before all" hook
127 passing (43s)
1 pending
12 failing
1) BOSH connections Can register an account:
Uncaught Error: connect ECONNREFUSED
at errnoException (net.js:904:11)
at Object.afterConnect [as oncomplete] (net.js:895:19)
2) BOSH connections Errors on bad authentication details:
Uncaught AssertionError: expected { [Error: connect ECONNREFUSED]
code: 'ECONNREFUSED',
errno: 'ECONNREFUSED',
syscall: 'connect' } to be 'XMPP authentication failure'
at Assertion.prop.(anonymous function) [as exactly] (/home/oneadmin/Desktop/test-projects/webrtc/node-xmpp/node_modules/should/lib/should.js:60:14)
at Client.<anonymous> (/home/oneadmin/Desktop/test-projects/webrtc/node-xmpp/node_modules/node-xmpp-client/test/integration/bosh.js:56:26)
at Client.EventEmitter.emit (events.js:95:17)
at BOSHConnection.EventEmitter.emit (events.js:95:17)
at /home/oneadmin/Desktop/test-projects/webrtc/node-xmpp/node_modules/node-xmpp-client/lib/bosh.js:44:22
at Request._callback (/home/oneadmin/Desktop/test-projects/webrtc/node-xmpp/node_modules/node-xmpp-client/lib/bosh.js:165:28)
at self.callback (/home/oneadmin/Desktop/test-projects/webrtc/node-xmpp/node_modules/node-xmpp-client/node_modules/request/request.js:129:22)
at Request.EventEmitter.emit (events.js:95:17)
at ClientRequest.self.clientErrorHandler (/home/oneadmin/Desktop/test-projects/webrtc/node-xmpp/node_modules/node-xmpp-client/node_modules/request/request.js:239:10)
at ClientRequest.EventEmitter.emit (events.js:95:17)
at Socket.socketErrorListener (http.js:1547:9)
at Socket.EventEmitter.emit (events.js:95:17)
at net.js:440:14
at process._tickCallback (node.js:419:13)
3) BOSH connections Can connect to an account with resource:
Uncaught Error: connect ECONNREFUSED
at errnoException (net.js:904:11)
at Object.afterConnect [as oncomplete] (net.js:895:19)
4) BOSH connections Can connect to an account without resource:
Uncaught Error: connect ECONNREFUSED
at errnoException (net.js:904:11)
at Object.afterConnect [as oncomplete] (net.js:895:19)
5) BOSH connections Fails on registering a duplicate account:
Uncaught AssertionError: expected 'connect ECONNREFUSED' to be 'Registration error'
+ expected - actual
+"Registration error"
-"connect ECONNREFUSED"
at Assertion.prop.(anonymous function) [as exactly] (/home/oneadmin/Desktop/test-projects/webrtc/node-xmpp/node_modules/should/lib/should.js:60:14)
at Client.<anonymous> (/home/oneadmin/Desktop/test-projects/webrtc/node-xmpp/node_modules/node-xmpp-client/test/integration/bosh.js:112:34)
at Client.EventEmitter.emit (events.js:95:17)
at BOSHConnection.EventEmitter.emit (events.js:95:17)
at /home/oneadmin/Desktop/test-projects/webrtc/node-xmpp/node_modules/node-xmpp-client/lib/bosh.js:44:22
at Request._callback (/home/oneadmin/Desktop/test-projects/webrtc/node-xmpp/node_modules/node-xmpp-client/lib/bosh.js:165:28)
at self.callback (/home/oneadmin/Desktop/test-projects/webrtc/node-xmpp/node_modules/node-xmpp-client/node_modules/request/request.js:129:22)
at Request.EventEmitter.emit (events.js:95:17)
at ClientRequest.self.clientErrorHandler (/home/oneadmin/Desktop/test-projects/webrtc/node-xmpp/node_modules/node-xmpp-client/node_modules/request/request.js:239:10)
at ClientRequest.EventEmitter.emit (events.js:95:17)
at Socket.socketErrorListener (http.js:1547:9)
at Socket.EventEmitter.emit (events.js:95:17)
at net.js:440:14
at process._tickCallback (node.js:419:13)
6) BOSH connections Can send and receive a stanza:
Uncaught Error: connect ECONNREFUSED
at errnoException (net.js:904:11)
at Object.afterConnect [as oncomplete] (net.js:895:19)
7) BOSH connections Can send and receive stanzas:
Uncaught Error: connect ECONNREFUSED
at errnoException (net.js:904:11)
at Object.afterConnect [as oncomplete] (net.js:895:19)
8) BOSH connections Sends error for bad stanza:
Uncaught Error: connect ECONNREFUSED
at errnoException (net.js:904:11)
at Object.afterConnect [as oncomplete] (net.js:895:19)
9) BOSH connections Errors when providing bad BOSH url:
Uncaught AssertionError: expected 'connect ECONNREFUSED' to be 'HTTP status 404'
+ expected - actual
+"HTTP status 404"
-"connect ECONNREFUSED"
at Assertion.prop.(anonymous function) [as exactly] (/home/oneadmin/Desktop/test-projects/webrtc/node-xmpp/node_modules/should/lib/should.js:60:14)
at Client.<anonymous> (/home/oneadmin/Desktop/test-projects/webrtc/node-xmpp/node_modules/node-xmpp-client/test/integration/bosh.js:219:34)
at Client.EventEmitter.emit (events.js:95:17)
at BOSHConnection.EventEmitter.emit (events.js:95:17)
at /home/oneadmin/Desktop/test-projects/webrtc/node-xmpp/node_modules/node-xmpp-client/lib/bosh.js:44:22
at Request._callback (/home/oneadmin/Desktop/test-projects/webrtc/node-xmpp/node_modules/node-xmpp-client/lib/bosh.js:165:28)
at self.callback (/home/oneadmin/Desktop/test-projects/webrtc/node-xmpp/node_modules/node-xmpp-client/node_modules/request/request.js:129:22)
at Request.EventEmitter.emit (events.js:95:17)
at ClientRequest.self.clientErrorHandler (/home/oneadmin/Desktop/test-projects/webrtc/node-xmpp/node_modules/node-xmpp-client/node_modules/request/request.js:239:10)
at ClientRequest.EventEmitter.emit (events.js:95:17)
at Socket.socketErrorListener (http.js:1547:9)
at Socket.EventEmitter.emit (events.js:95:17)
at net.js:440:14
at process._tickCallback (node.js:419:13)
10) Integration tests "before each" hook:
Error: timeout of 2000ms exceeded
at null.<anonymous> (/home/oneadmin/Desktop/test-projects/webrtc/node-xmpp/node_modules/mocha/lib/runnable.js:157:19)
at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)
11) Issues Shouldn't crash on invalid JID:
Uncaught Error: listen EADDRINUSE
at errnoException (net.js:904:11)
at Server._listen2 (net.js:1042:14)
at listen (net.js:1064:10)
at net.js:1146:9
at dns.js:72:18
at process._tickCallback (node.js:419:13)
12) Stream without proper "to" attribute Handle stream with empty "to" "before all" hook:
Uncaught Error: listen EADDRINUSE
at errnoException (net.js:904:11)
at Server._listen2 (net.js:1042:14)
at listen (net.js:1064:10)
at net.js:1146:9
at dns.js:72:18
at process._tickCallback (node.js:419:13)
Warning: Use --force to continue.
Aborted due to warnings.
npm ERR! Test failed. See above for more details.
npm ERR! not ok code 0