xmppjs / xmpp.js

XMPP for JavaScript
ISC License
2.19k stars 372 forks source link

cannot connecting to Openfire server frome Node.js #834

Closed michelepapale1996 closed 4 years ago

michelepapale1996 commented 4 years ago

Hi, I'm not unable to connecting to openfire server using this lib. I use the following code:

const { client, xml } = require("@xmpp/client");
const debug = require("@xmpp/debug");
let xmpp = client({
    service: "ws://192.168.0.16:5222/xmpp-websocket",
    domain: "192.168.0.16",
    username: "****",
    password: "****",
});

debug(xmpp, true);

In console:

Schermata 2020-05-02 alle 12 38 31

What is the problem?

NB: I can correctly connect using Spark to the Openfire server.

sonnyp commented 4 years ago

https://stackoverflow.com/questions/34769824/what-does-this-error-mean-hpe-invalid-constant ?

sonnyp commented 4 years ago

Seems unrelated to xmpp.js, search the Web for HPE_INVALID_CONSTANT

michelepapale1996 commented 4 years ago

Yes, you were right, it is not related to xmpp.js. My problems were: