Note that there are some explanatory texts on larger screens.

plurals
  1. POStrophe.js giving AUTHFAIL status always
    primarykey
    data
    text
    <p>Im developing a chat application with openfire as xmpp server and strophe.js as client library and using ruby on rails on ubuntu.</p> <p>Problem is that strophe.js connects to the openfire but gives AUTHFAIL status and donot create any users.It always return status 4 (AUTHFAIL).</p> <p>openfire is running on >> localhost:9090<br> rails application running on >> localhost:3000<br> BOSH service running on >> localhost:7070/http-bind/</p> <p>Code:-</p> <pre><code> &lt;script&gt; var BOSH_SERVICE = 'http://localhost:7070/http-bind/'; var connection = null; jQuery('#connect').click(function(){ connection = new Strophe.Connection(BOSH_SERVICE); connection.connect($('#enter_id').get(0).value + "@localhost", null, onConnect); }); function onConnect(status) { console.log("status is &gt;&gt; " + status); if(status == 5){ console.log("inside if status is &gt;&gt; " + Strophe.Status.CONNECTED); console.log("onConnect &gt;&gt; " + status); connection.send($pres().tree()); connection.addHandler(notifyUser, null, 'message', "chat"); console.log("onConnect &gt;&gt; handler added"); } } function notifyUser(msg) { console.log("notifyUser &gt;&gt; " + msg); // if (msg.getAttribute('from') == "testuser@127.0.0.1/pingstream") { var elems = msg.getElementsByTagName('body'); var body = elems[0]; jQuery('#chat_msg').append(Strophe.getText(body)); // } return true; } jQuery('#send_msg').click(function(){ var msg_to_send = $msg({ to: jQuery('#send_to').val() + "@localhost", from: connection.jid, type: "chat" }).c("body").t("hi!"); connection.send(msg_to_send.tree()); }); &lt;/script&gt; </code></pre> <p>Plz help.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload