Closed bobwolff68 closed 12 years ago
Found the answer to this issue myself. I had an asynchronous event which when it triggered, would cause me to send my presence information "if (this.connection)". The problem...the connection existed and was even connected, but it was not authenticated and so presence information was being injected into the stream during the SASL negotiation. The proper answer was to say "if (this.connection && this.connection.connected && this.connection.authenticated) ..."
Hi, I am stuck with same after installing node vesion 4.2.3. Before that on node version 0.10.13 this was working fine. I am using dependency module version "jsdom": "5.6.1", "xmlhttprequest": "1.8.0". I have installed openfire version Openfire 3.10.3 on my localhost.
Following is my error log
show status: 1 Connecting SENT:
Also when I use javascript strophe.js library and run through browser this work fine so may be the problem with node-strophe or it's dependency module jsdom, xmlhttprequest. Please suggest.
The symptom: Strophe connection emits a 'connecting' and an 'authenticating' but never makes it to 'connected'. (Sometimes - of course)
The system setup -- server is OpenFire 3.7.1. BOSH is done via bosh-server (node.js) by Dhruv Matani. Both running on an Amazon ec2 server.
Connection of clients is ANONYMOUS -- 'id' is 'servername' and password is "".
Clients we're using to develop on are Macs primarily. I've replicated this problem on Firefox and Chrome but use Chrome almost exclusively in test-dev. Chrome is Version 19.0.1084.56.
Strophe being used says "1.0.2" in Strophe.VERSION
Here's a snippet of console messages showing what happens in terms of the status callback and the associated callback function itself. Lines in bold are the status callback messages (I've done the bold in this message for clarity)
11:35:56 INFO fb load facebook-jssdk index.js:35 XMPP/Strophe Connecting... callcast.js:1344 11:35:56 INFO Page loaded. index.js:35 11:35:56 INFO fbAsyncInit callback index.js:35 XMPP/Strophe Authenticating... callcast.js:1342 11:35:56 INFO authResponseChange callback index.js:35 FB logged IN or got a new token. fb.js:53 11:35:56 INFO fbLoginStatus callback response.authResponse[object Object] index.js:35 11:35:56 INFO checkCredentials index.js:35 one-login-complete: Msg: checkCredentials - FB Login
And here's the function which setups up the connection. I can do this with or without the .reset() and it'll fail with the same general frequency. NOTE: This is an anonymous authentication: id='servername' and pw="" while url is null
Now -- to make it work reliably....put in a timer for the .connect()