strophe not getting past the connecting status in firefox

936 views
Skip to first unread message

ceallach

unread,
Nov 23, 2010, 11:45:12 AM11/23/10
to Strophe
I'm building an application using ASP.NET, Strophe and jQuery and I'm
kinda stuck with the following problem: Strophe is not getting past
the connecting status inside Firefox 3.6.12.

I only have this problem in Firefox. I've tested it in I.E.8 and Opera
10.63

I overloaded the rawInput and rawOutput methods and the only message I
keep getting is the following output raw message:
....................................................................................................................................................................
<body rid='1098541066' xmlns='http://jabber.org/protocol/httpbind'
to='localxmpp' xml:lang='en' wait='60' hold='1'
content='text/xml; charset=utf-8' ver='1.6' xmpp:version='1.0'
xmlns:xmpp='urn:xmpp:xbosh'/>
````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````

The following code is a snippet of what I'm using, but it shows the
connecting parts
....................................................................................................................................................................
var Server = {
...
BOSH_URL : 'http://localhost/http-bind',
...
Server.Connection = new Strophe.Connection(Server.BOSH_URL);
Server.Connection.rawInput = function (data) { alert(data); };
Server.Connection.rawOutput = function(data) { alert(data); };

Server.Connection.connect(Server.GetJID(username), password, function
(status, errorCondition)
{
// from Professional XMPP Programming with JavaScript and
jQuery
if (status === Strophe.Status.CONNECTED)
$(document).trigger('connected');

// from Professional XMPP Programming with JavaScript and
jQuery
else if (status === Strophe.Status.DISCONNECTED)
$(document).trigger('disconnected');

else if (status === Strophe.Status.CONNECTING)
alert('connecting...');

else if (status === Strophe.Status.CONNFAIL)
alert('connection failed');

else if (status === Strophe.Status.AUTHENTICATING)
alert('authenticating...');

else if (status === Strophe.Status.AUTHFAIL)
alert('authentication failed...');

else if (status === Strophe.Status.DISCONNECTING)
$(document).trigger('disconnecting...');

else if (status === Strophe.Status.ATTACHED)
$(document).trigger('ATTACHED...');

else if (status === Strophe.Status.ERROR)
alert('error occured');
});
}
````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````

I'm also assuming that I keep getting the following error in firebug
because it's not connecting:
................................................................................
flXHR::abort(): Failed, The abort() call failed to complete.

````````````````````````````````````````````````````````````````````````````````

From what I can gather it's not even attempting to connect to the
server, because I can't see the "POST http-bind" URL inside Firebug-
net window. Which is strange.

thank you

Jack Moffitt

unread,
Nov 23, 2010, 12:25:24 PM11/23/10
to str...@googlegroups.com
>   ................................................................................
>   flXHR::abort(): Failed, The abort() call failed to complete.
>

This is almost always a Flash security policy violation error. What is
the URL of this app in your browser? Flash files that are served over
http can do cross domain requests. Flash files served via file://
cannot talk to http resources.

What connection manager or XMPP server are you using?

jack.

e k

unread,
Nov 23, 2010, 12:45:02 PM11/23/10
to str...@googlegroups.com

The URL of my app is as follow: http://localhost/Source/default.aspx. Ive been running the app from the server and not as a  file :-S

Im using openfire as my server.

On Nov 23, 2010 6:25 PM, "Jack Moffitt" <ja...@metajack.im> wrote:

Jack Moffitt

unread,
Nov 23, 2010, 1:08:32 PM11/23/10
to str...@googlegroups.com
> Im using openfire as my server.

Openfire uses /http-bind/ not /http-bind. The trailing slash is important.

Does that help?

jack.

e k

unread,
Nov 24, 2010, 2:59:18 AM11/24/10
to str...@googlegroups.com
Just tried it out, still no change.


jack.

--
You received this message because you are subscribed to the Google Groups "Strophe" group.
To post to this group, send email to str...@googlegroups.com.
To unsubscribe from this group, send email to strophe+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/strophe?hl=en.


Vito Tafuni

unread,
Nov 24, 2010, 5:50:09 AM11/24/10
to str...@googlegroups.com
Is there a crossdomain.xml file on the BOSH server??


--
-----------
Tafuni Vito
vi...@vitotafuni.com
---------------------------------------------
"Verba volant, scripta manent... data corrupted"


2010/11/24 e k <cealla...@gmail.com>

ceallach k.

unread,
Nov 24, 2010, 6:34:37 AM11/24/10
to str...@googlegroups.com
No, I can't seem to find one on the openfire server nor the asp localhost. I've now tried adding them to the project file, the folder where the strophe.js file is located and in the bin folder of openfire installtion path. None seem to work.

I've tried running the examples that come with strophe and those do seem to work. I don't understand it, since it worked on an empty asp.net website, but as I integrated it into the product it's supposed to be working in, it stopped working. I haven't changed anything to make it stop working.

Ingo Bultschnieder

unread,
Nov 24, 2010, 5:06:27 AM11/24/10
to Strophe
We encountered a similar problem because we made the following
mistake: instead of putting the code into htdocs of our apache we
opened the file directly as file:// from localhost. So the file was on
the same harddrive of the same server, but not in the apache dir. So
firefox says "sorry, cross domains". Is that possible?
http://localhost/Source/default.aspx looks correct though ...
I suppose the js-files are in the same dir or some subdir as your
webpage?

On 24 Nov., 08:59, e k <ceallach.c...@gmail.com> wrote:
> Just tried it out, still no change.
>
>
>
>
>
>
>
> On Tue, Nov 23, 2010 at 7:08 PM, Jack Moffitt <j...@metajack.im> wrote:
> > > Im using openfire as my server.
>
> > Openfire uses /http-bind/ not /http-bind. The trailing slash is important.
>
> > Does that help?
>
> > jack.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Strophe" group.> To post to this group, send email tost...@googlegroups.com.
> > To unsubscribe from this group, send email to>strophe+u...@googlegroups.com<strophe%2Bunsu...@googlegroups.com>
> > .

ceallach k.

unread,
Nov 24, 2010, 10:03:16 AM11/24/10
to str...@googlegroups.com
@Ingo.

That is not possible because I'm not opening them from a file. The page is being run from the Visual Studio server that comes with it. All files that are needed are in the same project folder inside VS. Unless I have a misunderstanding of how VS runs it's server.

To post to this group, send email to str...@googlegroups.com.
To unsubscribe from this group, send email to strophe+u...@googlegroups.com.

Vito Tafuni

unread,
Nov 24, 2010, 10:03:59 AM11/24/10
to str...@googlegroups.com
1. no no no... don't put files everywhere...
as you can see for jack's bosh server the file has to be served at the root
http://bosh.metajack.im:5280/crossdomain.xml
2. are you sure the bosh server is not giving you a 404??
because i see that your web server is localhost:80 and your bosh-server is localhost:80
bosh http://localhost/http-bind
web http://localhost/Source/default.aspx

a friend of mine says "have you rfm?"
;-p

-Vito-







--
-----------
Tafuni Vito
vi...@vitotafuni.com
---------------------------------------------
"Verba volant, scripta manent... data corrupted"


2010/11/24 ceallach k. <cealla...@gmail.com>

ceallach

unread,
Nov 24, 2010, 10:46:49 AM11/24/10
to Strophe

> 1. no no no... don't put files everywhere...
> as you can see for jack's bosh server the file has to be served at the roothttp://bosh.metajack.im:5280/crossdomain.xml

Yes, I have put the crossdomain.xml in the root of my apache server
htdocs. Still not working :-(
Just tested in I.E. and Opera again, and its still working in both.

> 2. are you sure the bosh server is not giving you a 404??
> because i see that your web server is localhost:80 and your bosh-server is
> localhost:80
> boshhttp://localhost/http-bind
> webhttp://localhost/Source/default.aspx

My bosh server is actually at localhost:7070/http-bind/ . I'm using
the apache proxy modules as seen on this website http://www.malcollier.com/?p=14

> a friend of mine says "have you rfm?"
> ;-p

Hahah, everything worked perfectly until I went from the empty test
website to the products website. Everything else remained the same.
Both websites are still on localhost.

>
> -Vito-
>
> --
> -----------
> Tafuni Vito
> v...@vitotafuni.com
> ---------------------------------------------
> "Verba volant, scripta manent... data corrupted"
>
> 2010/11/24 ceallach k. <ceallach.c...@gmail.com>
>
> > No, I can't seem to find one on the openfire server nor the asp localhost.
> > I've now tried adding them to the project file, the folder where the
> > strophe.js file is located and in the bin folder of openfire installtion
> > path. None seem to work.
>
> > I've tried running the examples that come with strophe and those do seem to
> > work. I don't understand it, since it worked on an empty asp.net website,
> > but as I integrated it into the product it's supposed to be working in, it
> > stopped working. I haven't changed anything to make it stop working.
>
> > On Wed, Nov 24, 2010 at 11:50 AM, Vito Tafuni <v...@vitotafuni.com> wrote:
>
> >> Is there a crossdomain.xml file on the BOSH server??
>
> >> --
> >> -----------
> >> Tafuni Vito
> >> v...@vitotafuni.com
> >> ---------------------------------------------
> >> "Verba volant, scripta manent... data corrupted"
>
> >> 2010/11/24 e k <ceallach.c...@gmail.com>
>
> >>>  Just tried it out, still no change.
>
> >>> On Tue, Nov 23, 2010 at 7:08 PM, Jack Moffitt <j...@metajack.im> wrote:
>
> >>>> > Im using openfire as my server.
>
> >>>> Openfire uses /http-bind/ not /http-bind. The trailing slash is
> >>>> important.
>
> >>>> Does that help?
>
> >>>> jack.
>
> >>>> --
> >>>> You received this message because you are subscribed to the Google
> >>>> Groups "Strophe" group.
> >>>> To post to this group, send email to str...@googlegroups.com.
> >>>> To unsubscribe from this group, send email to
> >>>> strophe+u...@googlegroups.com<strophe%2Bunsu...@googlegroups.com>
> >>>> .
> >>>> For more options, visit this group at
> >>>>http://groups.google.com/group/strophe?hl=en.
>
> >>>  --
> >>> You received this message because you are subscribed to the Google Groups
> >>> "Strophe" group.
> >>> To post to this group, send email to str...@googlegroups.com.
> >>> To unsubscribe from this group, send email to
> >>> strophe+u...@googlegroups.com<strophe%2Bunsu...@googlegroups.com>
> >>> .
> >>> For more options, visit this group at
> >>>http://groups.google.com/group/strophe?hl=en.
>
> >>  --
> >> You received this message because you are subscribed to the Google Groups
> >> "Strophe" group.
> >> To post to this group, send email to str...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> strophe+u...@googlegroups.com<strophe%2Bunsu...@googlegroups.com>
> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/strophe?hl=en.
>
> >  --
> > You received this message because you are subscribed to the Google Groups
> > "Strophe" group.
> > To post to this group, send email to str...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > strophe+u...@googlegroups.com<strophe%2Bunsu...@googlegroups.com>
> > .

Vito Tafuni

unread,
Nov 24, 2010, 10:57:41 AM11/24/10
to str...@googlegroups.com
can you try strophe with
var BOSH_SERVICE = ‘http://localhost:7070/http-bind
and crossdomain.xml in bosh root http://localhost:7070/crossdomain.xml
??

even if strophe is on the same machine of the webserver so you are not really make any "cross domain" request... isn't it?



-Vito-



--
-----------
Tafuni Vito
vi...@vitotafuni.com

---------------------------------------------
"Verba volant, scripta manent... data corrupted"


2010/11/24 ceallach <cealla...@gmail.com>
To unsubscribe from this group, send email to strophe+u...@googlegroups.com.

ceallach k.

unread,
Nov 24, 2010, 11:07:11 AM11/24/10
to str...@googlegroups.com
On Wed, Nov 24, 2010 at 4:57 PM, Vito Tafuni <vi...@vitotafuni.com> wrote:
can you try strophe with
var BOSH_SERVICE = ‘http://localhost:7070/http-bind
and crossdomain.xml in bosh root http://localhost:7070/crossdomain.xml
??

Still the same, no activity in Firefox
 
even if strophe is on the same machine of the webserver so you are not really make any "cross domain" request... isn't it?
-Vito-

that is correct, but that wouldn't have an impact on anything right now would it?
 

Vito Tafuni

unread,
Nov 24, 2010, 11:17:47 AM11/24/10
to str...@googlegroups.com
my last try
comment out flensed lib... firefox don't need it.

any change?



-Vito-

--
-----------
Tafuni Vito

vi...@vitotafuni.com
---------------------------------------------
"Verba volant, scripta manent... data corrupted"


2010/11/24 ceallach k. <cealla...@gmail.com>

ceallach k.

unread,
Nov 24, 2010, 11:27:17 AM11/24/10
to str...@googlegroups.com
No change :-(

Jack Moffitt

unread,
Nov 24, 2010, 11:34:44 AM11/24/10
to str...@googlegroups.com
Is this server online publicly? I could probably figure this out
quickly if I had HTTP request access to it.

If you are using flXHR or CORS, you do not need to proxy the BOSH
connection manager with apache. Unfortunately, Openfire doesn't
respond to GET /http-bind/ or you could use that as a test to see if
the proxy is working correctly. All the other connection managers do
this.

jack.

ceallach k.

unread,
Nov 24, 2010, 11:36:20 AM11/24/10
to str...@googlegroups.com
Stopped working in Opera, but logging in the server from I.E. speed up.

ceallach k.

unread,
Nov 24, 2010, 12:04:28 PM11/24/10
to str...@googlegroups.com
I'm sorry no, it's not online...it's all localhost.


jack.

--
You received this message because you are subscribed to the Google Groups "Strophe" group.
To post to this group, send email to str...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages