简体   繁体   English

converse.js连接挂起

[英]converse.js connect is hanging

I have used converse.js for creating a chatbox in my website. 我已经使用converse.js在我的网站中创建了一个聊天框。 ( https://conversejs.org/ ) https://conversejs.org/

The second thing I have added is a openfire ( http://www.igniterealtime.org/projects/openfire/ ) xmpp server. 我添加的第二件事是openfire( http://www.igniterealtime.org/projects/openfire/ )xmpp服务器。

Converse.js however keeps hanging during 'signing' and in the logs of openfire I keep getting unknown_certificate messages. 但是,Converse.js在“签名”期间一直处于挂起状态,在openfire的日志中,我一直在获取unknown_certificate消息。

converse.initialize({
            allow_otr: true,
            auto_list_rooms: false,
            auto_subscribe: false,
            bosh_service_url: 'http://localhost:8080/xmpp-bosh', // Please use this connection manager only for testing purposes

            debug: true ,
            hide_muc_server: false,
            i18n: locales['en'], // Refer to ./locale/locales.js to see which locales are supported
            prebind: false,
            show_controlbox_by_default: true,
            xhr_user_search: false,
        }

The html containing this code is also on the same host+port so i do not have crossdomain issues. 包含此代码的html也位于同一主机+端口上,因此我没有跨域问题。 When testing with firebug and chrom-debugger I cannot find any javascript errors either. 使用firebug和chrom-debugger测试时,我也找不到任何JavaScript错误。

Connecting with Pidgin IM messenger works like a charm. 与Pidgin IM Messenger进行连接就像是一种魅力。 Anyone else encountered this issue when self installing an xmpp service ? 自行安装xmpp服务时,还有其他人遇到此问题吗?

For future googlers. 对于未来的谷歌人。

The problem I was actually having was the midding trailing slash '/' after the bosh_service_url. 我实际上遇到的问题是bosh_service_url之后的中间斜杠“ /”。 It seems to be a small thing but with great consequences. 这似乎是一件小事,但后果却是巨大的。

bosh_service_url: 'http://localhost:8080/xmpp-bosh/',

That seemed to fix the issue for me. 这似乎为我解决了这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM