Trouble with keepalive, websockets and prebind
See original GitHub issueHi everyone,
Here are the software I am using conversejs 6.0.1 ejabberd 20.04 ubuntu 18.04
I load the js script this way. <script src="https://cdn.conversejs.org/6.0.1/dist/converse.min.js"></script>
- Websockets issue
authentication: 'login',
credentials_url: credentials_url,
websocket_url: websocket_url_secure,
jid: user_jid,
password: user_jid_pass,
enable_smacks: true,
auto_login: true,
keepalive: true,
auto_reconnect: true,
When I activate the websocket, everything works as expected. But I have some problems with keepalive. For each request on my website (when a new page loads), a new authentication request is sent to the ejabberd server. So for every request there is a reconnection between converse.js and ejabberd. The session is therefore not kept alive when pages are loaded. How can I overcome this problem. With such behavior my app is not usable.
Here is the error I got in my javascript console.
ERROR: Websocket closed unexpectedly log.js:64:19
log log.js:64
error log.js:81
error converse-core.js:822
_onClose websocket.js:352
- prebind
I have tried to overcome above issue by using prebind authentication.
authentication: 'prebind',
prebind_url: prebind_url,
bosh_service_url: bosh_service_url,
enable_smacks: true,
auto_login: true,
keepalive: true,
auto_reconnect: true,
But after enabling prebind authentication, I have the following error in my javascript console. (debug mode enable)
Uncaught (in promise) TypeError: this.model.vcard is undefined
toHTML converse-profile.js:241
render Backbone
initialize converse-profile.js:313
ERROR: null 4 log.js:64:19
log log.js:64
error log.js:81
queryInfo converse-disco.js:151
Uncaught (in promise) Error: A "url" property or function must be specified
Backbone 2
result Lodash
Backbone 4
update converse-vcard.js:352
ERROR: fetchFromServer@https://cdn.conversejs.org/6.0.1/dist/converse.min.js:158:66027
log.js:64:19
log log.js:64
error log.js:81
populateRoster converse-roster.js:115
Regards
<bountysource-plugin>Want to back this issue? Post a bounty on it! We accept bounties via Bountysource. </bountysource-plugin>
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (5 by maintainers)
Top GitHub Comments
Can you retry with HEAD?
Ok, sorry, I misunderstood.