Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong user/password when use node-red-node-xmpp #130

Open
wirelesssolution opened this issue Sep 7, 2015 · 1 comment
Open

Wrong user/password when use node-red-node-xmpp #130

wirelesssolution opened this issue Sep 7, 2015 · 1 comment

Comments

@wirelesssolution
Copy link

Dear all,
I have problem when using node-red-node-xmpp on my node-red
it error authentication fail.
after I debug message, I got this error

{ state: 0,
domain: null,
_events: { end: [Function], close: [Function] },
_maxListeners: 10,
jid:
{ local: null,
domain: ‘demo’,
resource: null
},
password: ‘demo’,
preferredSaslMechanism: 'DIGEST-MD5',
availableSaslMechanisms:

[ { [Function: DigestMD5] super_: [Object] },
{ [Function: Plain] super_: [Object] },
{ [Function: Anonymous] super_: [Object] } ],
api_key: undefined,
access_token: undefined,
oauth2_token: undefined,
oauth2_auth: undefined,
register: undefined,
actAs: undefined,
connection:
{ domain: null,
_events:
{ connect: [Function],
stanza: [Function],
drain: [Function],
end: [Function],
close: [Function],
error: [Function] },
_maxListeners: 10,
streamAttrs: { version: '1.0', to: ‘demo’ },
xmlns:
{ '': 'jabber:client',
stream: 'http://etherx.jabber.org/streams' },
socket:
{ _connecting: true,
_handle: [Object],
_readableState: [Object],
readable: true,
domain: null,
_events: [Object],
_maxListeners: 10,
_writableState: [Object],
writable: true,
allowHalfOpen: false,
onend: null,
destroyed: false,
bytesRead: 0,
_bytesDispatched: 0,
_pendingData: null,
_pendingEncoding: '',
pipe: [Function],
addListener: [Function: addListener],
on: [Function: addListener],
pause: [Function],
resume: [Function],
read: [Function],
_consuming: true,
serializeStanza: [Function] },
rejectUnauthorized: false,
requestCert: false,
servername: undefined,
reconnectDelay: 0,
mixins: [] } }

but after I try to use simple-xmpp module
it work

{ state: 0,
domain: null,
events: { end: [Function], close: [Function] },
maxListeners: 10,
jid:
{ local: 'demo',
domain: 'xmpp.wirelesssolution.asia',
resource: null,
user: 'demo' },
password: 'demo',
preferredSaslMechanism: 'DIGEST-MD5',
availableSaslMechanisms:
[ { [Function] super
: [Object] },
{ [Function: DigestMD5] super
: [Object] },
{ [Function: Plain] super_: [Object] },
{ [Function: Anonymous] super_: [Object] } ],
api_key: undefined,
access_token: undefined,
oauth2_token: undefined,
oauth2_auth: undefined,
register: undefined,
actAs: undefined,
connection:
{ domain: null,
_events:
{ stanza: [Function],
drain: [Function],
end: [Function],
close: [Function],
error: [Function] },
_maxListeners: 10,
streamAttrs: { version: '1.0', to: 'xmpp.wirelesssolution.asia' },
xmlns:
{ '': 'jabber:client',
stream: 'http://etherx.jabber.org/streams' },
socket:
{ _connecting: false,
_handle: null,
_readableState: [Object],
readable: true,
domain: null,
_events: [Object],
_maxListeners: 10,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
onend: null,
destroyed: false,
bytesRead: 0,
_bytesDispatched: 0,
_pendingData: null,
_pendingEncoding: '',
pipe: [Function],
addListener: [Function: addListener],
on: [Function: addListener],
pause: [Function],
resume: [Function],
read: [Function],
_consuming: true,
serializeStanza: [Function] },
rejectUnauthorized: false,
requestCert: false,
servername: undefined,
reconnectDelay: 0,
mixins: [] } }
Yes, I'm connected!

Do you have any idea ? what I want to do.
Regards,
TIN

@dceejay
Copy link
Member

dceejay commented Sep 15, 2015

Hi,

that is odd - inside the node we do
xmpp.connect({
jid : node.userid,
password : node.password,
host : node.host,
port : node.port,
skipPresence : true,
reconnect : false
});
which is mostly the same as the example
xmpp.connect({
jid : username@gmail.com,
password : password,
host : 'talk.google.com',
port : 5222
});
but your error seems to say
jid:
{ local: null,
domain: ‘demo’,
resource: null
},
vs the one that works
jid:
{ local: 'demo',
domain: 'xmpp.wirelesssolution.asia',
resource: null,
user: 'demo' },
so I'm not sure yet how the get mis-aligned

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

No branches or pull requests

2 participants