Hi Jack, thanks for writing this great book. I am quite excited about working my way through it, but I need a little help to get really started. After trying to figure out for the past 8 hours what I'm doing wrong, I figured I'd post a message here.
I cannot get the Hello World example running. Firebug reports the following error:
15, securityError, A security sandbox error occured with the flXHR request.
AM()checkplayer.
js (line 12)
AO()checkplayer.
js (line 12)
checkplayer()checkplayer.
js (line 12)
checkplayer()checkplayer.
js (line 12)
aS()flXHR.
js (line 2)
[Break on this error] (function(R){var E=R,V=R.document,N="u...I.module_ready=function(){ }})(window);
So my problem seems to be related to the crossdomains policy from flXHR.
My setup is the following: from my Windows XP desktop, I try to connect (using Firefox and the code from Chapter 3) to a Ubuntu 9.10 server, which is running the ejabberd server. I tried to follow the instructions of both Chapter 3 and Appendix B as much as possible. Both computers are on my local network. The server has the following settings in the ejabberd.cfg file:
%% Admin user
{acl, admin, {user, "gkamp", "ubuntuserver"}}.
%% Hostname
{hosts, ["ubuntuserver"]}.
and then further down the line, the html listening port:
{5280, ejabberd_http, [
web_admin,
{request_handlers, [
{["xmpp-httpbind"], mod_http_bind},
{[], mod_http_fileserver}
]}
]}
and finally the modules section:
{mod_http_bind, []},
{mod_http_fileserver, [{docroot, "/var/www"},
{content_types, [{".xml", "text/xml"}]}]}
I have the following crossdomains.xml file:
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policySYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<site-control permitted-cross-domain-policies="all" />
<allow-access-from domain="*" />
<allow-http-request-headers-from domain="*" headers="*" />
</cross-domain-policy>
The hello.
js file has the following connection details:
var conn = new Strophe.Connection(
"http://10.0.1.9:5280/xmpp-httpbind");
When I enter "http://10.0.1.9:5280/xmpp-httpbind" in my browser, I get the expected "Ejabberd mod_http_bind v1.2. An implementation of XMPP over BOSH (XEP-0206)" message.
I don't know if its related but before I activated the mod_http_fileserver in the request_handler section, I could use the webadmin interface, but after adding the mod_http_fileserver, the webadmin interface stopped working.
Also, I think I found a few small errors in the Appendix B:
- page 433: a square closing bracket is missing between the two curly closing brackets, after mod_http_bind (almost at the bottom of the page)
- page 434: same thing (almost at the top of the page)
- page 435: Icon says crossdomain.xml is available for download but its not included in the download package
- page 436: comma is missing after "/path/to/html"} (middle of the page)
Thanks!