librelist archives

« back to archive

SSO - prebind, anyone got it working?

SSO - prebind, anyone got it working?

From:
Date:
2015-07-25 @ 23:38
I've setup converse with prosody (and it's bosh module) with the linked 
php lib from the documentation 
(https://github.com/candy-chat/xmpp-prebind-php). But it seems it doesn't 
work well. Generating a session etc. works fine, but at some point my test
users aren't able to chat/add new contacts anymore, their messages just 
don't arrive. I've also replaced prosody with ejabberd to check if it's a 
prosody problem, but I have the same problem with that jabber-server.

Sometimes the sent messages are received as offline messages when I switch
the test-users status in converse.

p.s. I've also checked prosody's/ejabberd's log in debug mode, no errors 
are shown there, just the usual new session/destroying session stuff. All 
clients are also stay connected, so it doesn't seem a problem with losing 
the connection.

Here is my converse config:

<script>
jQuery.getJSON('http://mydomain.com/prebind', function (data) {
	require(['converse'], function (converse) {
	    converse.initialize({
	        bosh_service_url: 'http://mydomain.com/http-bind',
	        keepalive: false,
	        authentication: 'prebind',
		sid: data.sid,
		jid: data.jid,
		rid: data.rid,
	        allow_logout: false,
	        allow_registration: false,
	        ping_interval: 25
	    });
	});
});
</script>

Re: [conversejs] SSO - prebind, anyone got it working?

From:
Jc Brand
Date:
2015-07-27 @ 14:13
On Sat, Jul 25, 2015 at 07:38:02PM -0400, silentneedle@Safe-mail.net wrote:
> I've setup converse with prosody (and it's bosh module) with the linked 
php lib from the documentation 
(https://github.com/candy-chat/xmpp-prebind-php). But it seems it doesn't 
work well. Generating a session etc. works fine, but at some point my test
users aren't able to chat/add new contacts anymore, their messages just 
don't arrive. I've also replaced prosody with ejabberd to check if it's a 
prosody problem, but I have the same problem with that jabber-server.
> 
> Sometimes the sent messages are received as offline messages when I 
switch the test-users status in converse.
> 
> p.s. I've also checked prosody's/ejabberd's log in debug mode, no errors
are shown there, just the usual new session/destroying session stuff. All 
clients are also stay connected, so it doesn't seem a problem with losing 
the connection.

It sounds to me like the XMPP connection between the browser and the XMPP
server is dropping. Set "debug: true" when calling converse.initialize and then
check the log output in your browser console.

If you find 404 errors, then the connection has likely dropped.
You might otherwise also see an error which could be the cause of the problem.

> Here is my converse config:
> 
> <script>
> jQuery.getJSON('http://mydomain.com/prebind', function (data) {
> 	require(['converse'], function (converse) {
> 	    converse.initialize({
> 	        bosh_service_url: 'http://mydomain.com/http-bind',
> 	        keepalive: false,
> 	        authentication: 'prebind',
> 		sid: data.sid,
> 		jid: data.jid,
> 		rid: data.rid,
> 	        allow_logout: false,
> 	        allow_registration: false,
> 	        ping_interval: 25
> 	    });
> 	});
> });
> </script>

You might wanna try without ping_interval, just to eliminate a potential cause.

Also, why do you have keepalive=false? Usually you'd want that to be true, to
avoid having to set up a new prebind connection on every page load.

JC

Re: [conversejs] SSO - prebind, anyone got it working?

From:
Date:
2015-07-31 @ 10:03
Unfortunately my Inbox was full, could you please resend it? Thanks.

-------- Original Message --------
From: JC Brand <lists@opkode.com>
Apparently from: conversejs@librelist.com
To: conversejs@librelist.com
Subject: Re: [conversejs] SSO - prebind, anyone got it working?
Date: Fri, 31 Jul 2015 10:03:11 +0200
 

> I sent you a private email yesterday with a link to the file. 
> 
> On 31 Julie 2015 9:42:08 vm. GMT+02:00, silentneedle@Safe-mail.net wrote:
> > 
> > Any update on this? :)
> > 
> > -------- Original Message --------
> > From: JC Brand <lists@opkode.com>
> > Apparently from: conversejs@librelist.com
> > To: conversejs@librelist.com
> > Subject: Re: [conversejs] SSO - prebind, anyone got it working?
> > Date: Mon, 27 Jul 2015 23:41:25 +0200
> >  
> > 
> > > I could, but only tomorrow. Try running "make dev" first, and then 
"make build". 
> > > 
> > > On 27 Julie 2015 10:51:36 nm. GMT+02:00, silentneedle@Safe-mail.net wrote:
> > > > 
> > > > Might it be possible that you could upload a build converse.js?
> > > > 
> > > > Unfortunately I'm getting errors on both of my two dev machines:
> > > >  
> > > > 
> > > > Running "jsmin" task
> > > > 
> > > > Error: Error: ERROR: module path does not exist: 
components/almond/almond.js for module named: components/almond/almond.js.
Path is relative to: /home/converse.js-0.9.4
> > > > 
> > > >     at /home/converse.js-0.9.4/node_modules/requirejs/bin/r.js:28660:35
> > > > 
> > > > 
> > > > -------- Original Message --------
> > > > From: JC Brand <lists@opkode.com>
> > > > Apparently from: conversejs@librelist.com
> > > > To: conversejs@librelist.com
> > > > Subject: Re: [conversejs] SSO - prebind, anyone got it working?
> > > > Date: Mon, 27 Jul 2015 22:14:11 +0200
> > > >  
> > > > 
> > > > > Sorry, I meant the converse.js file in the builds dir. 
> > > > > 
> > > > > If there isn't one, you'll have to run "make build". 
> > > > > 
> > > > > 
> > > > > On 27 Julie 2015 10:07:15 nm. GMT+02:00, 
silentneedle@Safe-mail.net wrote:
> > > > > 
> > > > > When using the unminified file I'm receiving the following error:
> > > > > 
> > > > > [Error] ReferenceError: Can't find variable: templates
> > > > >  (anonyme Funktion) (converse.js, line 33)
> > > > >  global code (converse.js, line 35)
> > > > > 
> > > > > I'm using 0.9.4.
> > > > > 
> > > > > -------- Original Message --------
> > > > > From: JC Brand <lists@opkode.com>
> > > > > Apparently from: conversejs@librelist.com
> > > > > To: conversejs@librelist.com
> > > > > Subject: Re: [conversejs] SSO - prebind, anyone got it working?
> > > > > Date: Mon, 27 Jul 2015 21:28:45 +0200
> > > > > 
> > > > > 
> > > > >  On Mon, Jul 27, 2015 at 12:02:00PM -0400, 
silentneedle@Safe-mail.net wrote:
> > > > > 
> > > > >  Hm you are right, it seems it has something to do with the 
ping, if I remove the ping_interval conversejs is doing fine, however, if 
I     refresh the page now the chat doesn't work anymore.
> > > > > 
> > > > >  
> > > > >  That's what keepalive is for, not ping.
> > > > >  
> > > > > 
> > > > >  I've enabled the debug mode, but no messages are thrown in the 
console, is there something other I need to do to trigger the debug 
messages?
> > > > > 
> > > > >  
> > > > >  No. You're supposed to get a lot of output in the console.
> > > > >  
> > > > > 
> > > > >  Ah I totally forgot to mention that I doesn't use keepalive 
because I receive the following error when using it:
> > > > >  
> > > > >  "[Error] TypeError: null is not an object (evaluating 't.indexOf')
> > > > >   getDomainFromJid (converse.website.min.js, line 411)
> > > > >   _attach (converse.website.min.js, line 411)
> > > > >   attach (converse.website.min.js, line 411)
> > > > >   (anonyme Funktion) (con  ve  rse.website.min.js, line 411)
> > > > >   (anonyme Funktion) ([native code], line 0)
> > > > >   f (converse.website.min.js, line 411)
> > > > >   fireWith (converse.website.min.js, line 411)
> > > > >   x (converse.website.min.js, line 411)
> > > > >   t (converse.website.min.js, line 411)"
> > > > > 
> > > > >  
> > > > >  Try the unminified file: converse.js and then give me the line 
number so that I
> > > > >  can take a look.
> > > > >  
> > > > >  Also, what version of converse.js are you using?
> > > > >   
> > > > > 
> > > > >  I've defined:
> > > > >  
> > > > >  jid: 'test@mydomain.com/website'
> > > > >  keepalive: true
> > > > >  prebind_url: 'http://mydomain.com/prebind'
> > > > > 
> > > > >  
> > > > >  Looks fine.
> > > > >  
> > > > >  JC
> > > > >  
> > > > >  
> > > > > 
> > > > >  -------- Original Message ------  -- From: JC Brand <lists@opkode.com>
> > > > >  Apparently from: conversejs@librelist.com
> > > > >  To: conversejs@librelist.com
> > > > >  Subject: Re: [conversejs] SSO - prebind, anyone got it working?
> > > > >  Date: Mon, 27 Jul 2015 16:13:54 +0200
> > > > >  
> > > > > 
> > > > >  
> > > > >  On Sat, Jul 25, 2015 at 07:38:02PM -0400, 
silentneedle@Safe-mail.net wrote:
> > > > > 
> > > > >  I've setup converse with prosody (and it's bosh module) with 
the linked php lib from the documentation 
(https://github.com/candy-chat/xmpp-prebind-php). But it seems it doesn't 
work well. Generating a session etc. works fine, but at some point my test
users aren't able to chat/add new contacts anymore, their messages just   
don't arrive. I've also replaced   prosody with ejabberd to check if it's 
a prosody problem, but I have the same problem with that jabber-server.
> > > > >  
> > > > >  Sometimes the sent messages are received as offline messages 
when I switch the test-users status in converse.
> > > > >  
> > > > >  p.s. I've also checked prosody's/ejabberd's log in debug mode, 
no errors are shown there, just the usual new session/destroying session 
stuff. All clients are also stay connected, so it doesn't seem a problem 
with losing the connection.
> > > > > 
> > > > >  
> > > > >  It sounds to me like the XMPP connection between the browser 
and the XMPP
> > > > >  server is dropping. Set "debug: true" when calling 
converse.initialize and then
> > > > >  check the log output in your browser console.
> > > > >  
> > > > >  If you find 404 errors, then the connection has likely dropped.
> > > > >  You might otherwise also see an error which could be the cause 
of the problem.
> > > > >  
> > > > > 
> > > > >  Here is my converse config:
> > > > >  
> > > > >  <script>
> > > > >  jQuery.getJSON('http://mydomain.com/prebind', function (data) {
> > > > >   require(['converse'], function (converse) {
> > > > >       converse.initialize({
> > > > >           bosh_service_url: 'http://mydomain.com/http-bind',
> > > > >           keepalive: false,
> > > > >           authentication: 'prebind',
> > > > >    sid: data.sid,
> > > > >    jid: data.jid,
> > > > >    rid: data.rid,
> > > > >           allow_logout: false,
> > > > >           allow_registration: false,
> > > > >           ping_interval: 25
> > > > >       });
> > > > >   });
> > > > >  });
> > > > >  </script>
> > > > > 
> > > > >  
> > > > >  You might wanna try without ping_interval, just to eliminate a 
potential cause.
> > > > >  
> > > > >  Also, why do you have keepalive=false? Usually you'd want that 
to be true, to
> > > > >  avoid having to set up a new prebind connection on every page load.
> > > > >  
> > > > >  JC&  lt;  br />
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > -- 
> > > > > Sent from my Android device with K-9 Mail. Please excuse my brevity.
> > > > 
> > > 
> > > 
> > > 
> > > -- 
> > > Sent from my Android device with K-9 Mail. Please excuse my brevity.
> > 
> 
> 
> 
> -- 
> Sent from my Android device with K-9 Mail. Please excuse my brevity.

Re: [conversejs] SSO - prebind, anyone got it working?

From:
Date:
2015-07-31 @ 07:42
Any update on this? :)

-------- Original Message --------
From: JC Brand <lists@opkode.com>
Apparently from: conversejs@librelist.com
To: conversejs@librelist.com
Subject: Re: [conversejs] SSO - prebind, anyone got it working?
Date: Mon, 27 Jul 2015 23:41:25 +0200
 

> I could, but only tomorrow. Try running "make dev" first, and then "make
build". 
> 
> On 27 Julie 2015 10:51:36 nm. GMT+02:00, silentneedle@Safe-mail.net wrote:
> > 
> > Might it be possible that you could upload a build converse.js?
> > 
> > Unfortunately I'm getting errors on both of my two dev machines:
> >  
> > 
> > Running "jsmin" task
> > 
> > Error: Error: ERROR: module path does not exist: 
components/almond/almond.js for module named: components/almond/almond.js.
Path is relative to: /home/converse.js-0.9.4
> > 
> >     at /home/converse.js-0.9.4/node_modules/requirejs/bin/r.js:28660:35
> > 
> > 
> > -------- Original Message --------
> > From: JC Brand <lists@opkode.com>
> > Apparently from: conversejs@librelist.com
> > To: conversejs@librelist.com
> > Subject: Re: [conversejs] SSO - prebind, anyone got it working?
> > Date: Mon, 27 Jul 2015 22:14:11 +0200
> >  
> > 
> > > Sorry, I meant the converse.js file in the builds dir. 
> > > 
> > > If there isn't one, you'll have to run "make build". 
> > > 
> > > 
> > > On 27 Julie 2015 10:07:15 nm. GMT+02:00, silentneedle@Safe-mail.net wrote:
> > > > 
> > > > When using the unminified file I'm receiving the following error:
> > > > 
> > > > [Error] ReferenceError: Can't find variable: templates
> > > >  (anonyme Funktion) (converse.js, line 33)
> > > >  global code (converse.js, line 35)
> > > > 
> > > > I'm using 0.9.4.
> > > > 
> > > > -------- Original Message --------
> > > > From: JC Brand <lists@opkode.com>
> > > > Apparently from: conversejs@librelist.com
> > > > To: conversejs@librelist.com
> > > > Subject: Re: [conversejs] SSO - prebind, anyone got it working?
> > > > Date: Mon, 27 Jul 2015 21:28:45 +0200
> > > > 
> > > > > 
> > > > >  On Mon, Jul 27, 2015 at 12:02:00PM -0400, 
silentneedle@Safe-mail.net wrote:
> > > > > 
> > > > >  Hm you are right, it seems it has something to do with the 
ping, if I remove the ping_interval conversejs is doing fine, however, if 
I   refresh the page now the chat doesn't work anymore.
> > > > > 
> > > > >  
> > > > >  That's what keepalive is for, not ping.
> > > > >  
> > > > > 
> > > > >  I've enabled the debug mode, but no messages are thrown in the 
console, is there something other I need to do to trigger the debug 
messages?
> > > > > 
> > > > >  
> > > > >  No. You're supposed to get a lot of output in the console.
> > > > >  
> > > > > 
> > > > >  Ah I totally forgot to mention that I doesn't use keepalive 
because I receive the following error when using it:
> > > > >  
> > > > >  "[Error] TypeError: null is not an object (evaluating 't.indexOf')
> > > > >   getDomainFromJid (converse.website.min.js, line 411)
> > > > >   _attach (converse.website.min.js, line 411)
> > > > >   attach (converse.website.min.js, line 411)
> > > > >   (anonyme Funktion) (conve  rse.website.min.js, line 411)
> > > > >   (anonyme Funktion) ([native code], line 0)
> > > > >   f (converse.website.min.js, line 411)
> > > > >   fireWith (converse.website.min.js, line 411)
> > > > >   x (converse.website.min.js, line 411)
> > > > >   t (converse.website.min.js, line 411)"
> > > > > 
> > > > >  
> > > > >  Try the unminified file: converse.js and then give me the line 
number so that I
> > > > >  can take a look.
> > > > >  
> > > > >  Also, what version of converse.js are you using?
> > > > >   
> > > > > 
> > > > >  I've defined:
> > > > >  
> > > > >  jid: 'test@mydomain.com/website'
> > > > >  keepalive: true
> > > > >  prebind_url: 'http://mydomain.com/prebind'
> > > > > 
> > > > >  
> > > > >  Looks fine.
> > > > >  
> > > > >  JC
> > > > >  
> > > > >  
> > > > > 
> > > > >  -------- Original Message -------- From: JC Brand <lists@opkode.com>
> > > > >  Apparently from: conversejs@librelist.com
> > > > >  To: conversejs@librelist.com
> > > > >  Subject: Re: [conversejs] SSO - prebind, anyone got it working?
> > > > >  Date: Mon, 27 Jul 2015 16:13:54 +0200
> > > > >  
> > > > > 
> > > > >  
> > > > >  On Sat, Jul 25, 2015 at 07:38:02PM -0400, 
silentneedle@Safe-mail.net wrote:
> > > > > 
> > > > >  I've setup converse with prosody (and it's bosh module) with 
the linked php lib from the documentation 
(https://github.com/candy-chat/xmpp-prebind-php). But it seems it doesn't 
work well. Generating a session etc. works fine, but at some point my test
users aren't able to chat/add new contacts anymore, their messages just 
don't arrive. I've also replaced   prosody with ejabberd to check if it's 
a prosody problem, but I have the same problem with that jabber-server.
> > > > >  
> > > > >  Sometimes the sent messages are received as offline messages 
when I switch the test-users status in converse.
> > > > >  
> > > > >  p.s. I've also checked prosody's/ejabberd's log in debug mode, 
no errors are shown there, just the usual new session/destroying session 
stuff. All clients are also stay connected, so it doesn't seem a problem 
with losing the connection.
> > > > > 
> > > > >  
> > > > >  It sounds to me like the XMPP connection between the browser 
and the XMPP
> > > > >  server is dropping. Set "debug: true" when calling 
converse.initialize and then
> > > > >  check the log output in your browser console.
> > > > >  
> > > > >  If you find 404 errors, then the connection has likely dropped.
> > > > >  You might otherwise also see an error which could be the cause 
of the problem.
> > > > >  
> > > > > 
> > > > >  Here is my converse config:
> > > > >  
> > > > >  <script>
> > > > >  jQuery.getJSON('http://mydomain.com/prebind', function (data) {
> > > > >   require(['converse'], function (converse) {
> > > > >       converse.initialize({
> > > > >           bosh_service_url: 'http://mydomain.com/http-bind',
> > > > >           keepalive: false,
> > > > >           authentication: 'prebind',
> > > > >    sid: data.sid,
> > > > >    jid: data.jid,
> > > > >    rid: data.rid,
> > > > >           allow_logout: false,
> > > > >           allow_registration: false,
> > > > >           ping_interval: 25
> > > > >       });
> > > > >   });
> > > > >  });
> > > > >  </script>
> > > > > 
> > > > >  
> > > > >  You might wanna try without ping_interval, just to eliminate a 
potential cause.
> > > > >  
> > > > >  Also, why do you have keepalive=false? Usually you'd want that 
to be true, to
> > > > >  avoid having to set up a new prebind connection on every page load.
> > > > >  
> > > > >  JC<  br />
> > > > > 
> > > > > 
> > > > 
> > > 
> > > 
> > > 
> > > -- 
> > > Sent from my Android device with K-9 Mail. Please excuse my brevity.
> > 
> 
> 
> 
> -- 
> Sent from my Android device with K-9 Mail. Please excuse my brevity.

Re: [conversejs] SSO - prebind, anyone got it working?

From:
Jc Brand
Date:
2015-07-31 @ 08:03
I sent you a private email yesterday with a link to the file. 

On 31 Julie 2015 9:42:08 vm. GMT+02:00, silentneedle@Safe-mail.net wrote:
>Any update on this? :)
>
>-------- Original Message --------
>From: JC Brand <lists@opkode.com>
>Apparently from: conversejs@librelist.com
>To: conversejs@librelist.com
>Subject: Re: [conversejs] SSO - prebind, anyone got it working?
>Date: Mon, 27 Jul 2015 23:41:25 +0200
> 
>
>> I could, but only tomorrow. Try running "make dev" first, and then
>"make build". 
>> 
>> On 27 Julie 2015 10:51:36 nm. GMT+02:00, silentneedle@Safe-mail.net
>wrote:
>> > 
>> > Might it be possible that you could upload a build converse.js?
>> > 
>> > Unfortunately I'm getting errors on both of my two dev machines:
>> >  
>> > 
>> > Running "jsmin" task
>> > 
>> > Error: Error: ERROR: module path does not exist:
>components/almond/almond.js for module named:
>components/almond/almond.js. Path is relative to:
>/home/converse.js-0.9.4
>> > 
>> >     at
>/home/converse.js-0.9.4/node_modules/requirejs/bin/r.js:28660:35
>> > 
>> > 
>> > -------- Original Message --------
>> > From: JC Brand <lists@opkode.com>
>> > Apparently from: conversejs@librelist.com
>> > To: conversejs@librelist.com
>> > Subject: Re: [conversejs] SSO - prebind, anyone got it working?
>> > Date: Mon, 27 Jul 2015 22:14:11 +0200
>> >  
>> > 
>> > > Sorry, I meant the converse.js file in the builds dir. 
>> > > 
>> > > If there isn't one, you'll have to run "make build". 
>> > > 
>> > > 
>> > > On 27 Julie 2015 10:07:15 nm. GMT+02:00,
>silentneedle@Safe-mail.net wrote:
>> > > > 
>> > > > When using the unminified file I'm receiving the following
>error:
>> > > > 
>> > > > [Error] ReferenceError: Can't find variable: templates
>> > > >  (anonyme Funktion) (converse.js, line 33)
>> > > >  global code (converse.js, line 35)
>> > > > 
>> > > > I'm using 0.9.4.
>> > > > 
>> > > > -------- Original Message --------
>> > > > From: JC Brand <lists@opkode.com>
>> > > > Apparently from: conversejs@librelist.com
>> > > > To: conversejs@librelist.com
>> > > > Subject: Re: [conversejs] SSO - prebind, anyone got it working?
>> > > > Date: Mon, 27 Jul 2015 21:28:45 +0200
>> > > > 
>> > > > > 
>> > > > >  On Mon, Jul 27, 2015 at 12:02:00PM -0400,
>silentneedle@Safe-mail.net wrote:
>> > > > > 
>> > > > >  Hm you are right, it seems it has something to do with the
>ping, if I remove the ping_interval conversejs is doing fine, however,
>if I   refresh the page now the chat doesn't work anymore.
>> > > > > 
>> > > > >  
>> > > > >  That's what keepalive is for, not ping.
>> > > > >  
>> > > > > 
>> > > > >  I've enabled the debug mode, but no messages are thrown in
>the console, is there something other I need to do to trigger the debug
>messages?
>> > > > > 
>> > > > >  
>> > > > >  No. You're supposed to get a lot of output in the console.
>> > > > >  
>> > > > > 
>> > > > >  Ah I totally forgot to mention that I doesn't use keepalive
>because I receive the following error when using it:
>> > > > >  
>> > > > >  "[Error] TypeError: null is not an object (evaluating
>'t.indexOf')
>> > > > >   getDomainFromJid (converse.website.min.js, line 411)
>> > > > >   _attach (converse.website.min.js, line 411)
>> > > > >   attach (converse.website.min.js, line 411)
>> > > > >   (anonyme Funktion) (conve  rse.website.min.js, line 411)
>> > > > >   (anonyme Funktion) ([native code], line 0)
>> > > > >   f (converse.website.min.js, line 411)
>> > > > >   fireWith (converse.website.min.js, line 411)
>> > > > >   x (converse.website.min.js, line 411)
>> > > > >   t (converse.website.min.js, line 411)"
>> > > > > 
>> > > > >  
>> > > > >  Try the unminified file: converse.js and then give me the
>line number so that I
>> > > > >  can take a look.
>> > > > >  
>> > > > >  Also, what version of converse.js are you using?
>> > > > >   
>> > > > > 
>> > > > >  I've defined:
>> > > > >  
>> > > > >  jid: 'test@mydomain.com/website'
>> > > > >  keepalive: true
>> > > > >  prebind_url: 'http://mydomain.com/prebind'
>> > > > > 
>> > > > >  
>> > > > >  Looks fine.
>> > > > >  
>> > > > >  JC
>> > > > >  
>> > > > >  
>> > > > > 
>> > > > >  -------- Original Message -------- From: JC Brand
><lists@opkode.com>
>> > > > >  Apparently from: conversejs@librelist.com
>> > > > >  To: conversejs@librelist.com
>> > > > >  Subject: Re: [conversejs] SSO - prebind, anyone got it
>working?
>> > > > >  Date: Mon, 27 Jul 2015 16:13:54 +0200
>> > > > >  
>> > > > > 
>> > > > >  
>> > > > >  On Sat, Jul 25, 2015 at 07:38:02PM -0400,
>silentneedle@Safe-mail.net wrote:
>> > > > > 
>> > > > >  I've setup converse with prosody (and it's bosh module) with
>the linked php lib from the documentation
>(https://github.com/candy-chat/xmpp-prebind-php). But it seems it
>doesn't work well. Generating a session etc. works fine, but at some
>point my test users aren't able to chat/add new contacts anymore, their
>messages just don't arrive. I've also replaced   prosody with ejabberd
>to check if it's a prosody problem, but I have the same problem with
>that jabber-server.
>> > > > >  
>> > > > >  Sometimes the sent messages are received as offline messages
>when I switch the test-users status in converse.
>> > > > >  
>> > > > >  p.s. I've also checked prosody's/ejabberd's log in debug
>mode, no errors are shown there, just the usual new session/destroying
>session stuff. All clients are also stay connected, so it doesn't seem
>a problem with losing the connection.
>> > > > > 
>> > > > >  
>> > > > >  It sounds to me like the XMPP connection between the browser
>and the XMPP
>> > > > >  server is dropping. Set "debug: true" when calling
>converse.initialize and then
>> > > > >  check the log output in your browser console.
>> > > > >  
>> > > > >  If you find 404 errors, then the connection has likely
>dropped.
>> > > > >  You might otherwise also see an error which could be the
>cause of the problem.
>> > > > >  
>> > > > > 
>> > > > >  Here is my converse config:
>> > > > >  
>> > > > >  <script>
>> > > > >  jQuery.getJSON('http://mydomain.com/prebind', function
>(data) {
>> > > > >   require(['converse'], function (converse) {
>> > > > >       converse.initialize({
>> > > > >           bosh_service_url: 'http://mydomain.com/http-bind',
>> > > > >           keepalive: false,
>> > > > >           authentication: 'prebind',
>> > > > >    sid: data.sid,
>> > > > >    jid: data.jid,
>> > > > >    rid: data.rid,
>> > > > >           allow_logout: false,
>> > > > >           allow_registration: false,
>> > > > >           ping_interval: 25
>> > > > >       });
>> > > > >   });
>> > > > >  });
>> > > > >  </script>
>> > > > > 
>> > > > >  
>> > > > >  You might wanna try without ping_interval, just to eliminate
>a potential cause.
>> > > > >  
>> > > > >  Also, why do you have keepalive=false? Usually you'd want
>that to be true, to
>> > > > >  avoid having to set up a new prebind connection on every
>page load.
>> > > > >  
>> > > > >  JC<  br />
>> > > > > 
>> > > > > 
>> > > > 
>> > > 
>> > > 
>> > > 
>> > > -- 
>> > > Sent from my Android device with K-9 Mail. Please excuse my
>brevity.
>> > 
>> 
>> 
>> 
>> -- 
>> Sent from my Android device with K-9 Mail. Please excuse my brevity.

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Re: [conversejs] SSO - prebind, anyone got it working?

From:
Date:
2015-07-28 @ 15:39
make dev also doesn't seem to work, gives me an error with the bower installation.

When using the converse.js from conversejs.org I'm receiving a child-src 
permission error.


-------- Original Message --------
From: JC Brand <lists@opkode.com>
Apparently from: conversejs@librelist.com
To: conversejs@librelist.com
Subject: Re: [conversejs] SSO - prebind, anyone got it working?
Date: Mon, 27 Jul 2015 23:41:25 +0200
 

> I could, but only tomorrow. Try running "make dev" first, and then "make
build". 
> 
> On 27 Julie 2015 10:51:36 nm. GMT+02:00, silentneedle@Safe-mail.net wrote:
> > 
> > Might it be possible that you could upload a build converse.js?
> > 
> > Unfortunately I'm getting errors on both of my two dev machines:
> >  
> > 
> > Running "jsmin" task
> > 
> > Error: Error: ERROR: module path does not exist: 
components/almond/almond.js for module named: components/almond/almond.js.
Path is relative to: /home/converse.js-0.9.4
> > 
> >     at /home/converse.js-0.9.4/node_modules/requirejs/bin/r.js:28660:35
> > 
> > 
> > -------- Original Message --------
> > From: JC Brand <lists@opkode.com>
> > Apparently from: conversejs@librelist.com
> > To: conversejs@librelist.com
> > Subject: Re: [conversejs] SSO - prebind, anyone got it working?
> > Date: Mon, 27 Jul 2015 22:14:11 +0200
> >  
> > 
> > > Sorry, I meant the converse.js file in the builds dir. 
> > > 
> > > If there isn't one, you'll have to run "make build". 
> > > 
> > > 
> > > On 27 Julie 2015 10:07:15 nm. GMT+02:00, silentneedle@Safe-mail.net wrote:
> > > > 
> > > > When using the unminified file I'm receiving the following error:
> > > > 
> > > > [Error] ReferenceError: Can't find variable: templates
> > > >  (anonyme Funktion) (converse.js, line 33)
> > > >  global code (converse.js, line 35)
> > > > 
> > > > I'm using 0.9.4.
> > > > 
> > > > -------- Original Message --------
> > > > From: JC Brand <lists@opkode.com>
> > > > Apparently from: conversejs@librelist.com
> > > > To: conversejs@librelist.com
> > > > Subject: Re: [conversejs] SSO - prebind, anyone got it working?
> > > > Date: Mon, 27 Jul 2015 21:28:45 +0200
> > > > 
> > > > > 
> > > > >  On Mon, Jul 27, 2015 at 12:02:00PM -0400, 
silentneedle@Safe-mail.net wrote:
> > > > > 
> > > > >  Hm you are right, it seems it has something to do with the 
ping, if I remove the ping_interval conversejs is doing fine, however, if 
I   refresh the page now the chat doesn't work anymore.
> > > > > 
> > > > >  
> > > > >  That's what keepalive is for, not ping.
> > > > >  
> > > > > 
> > > > >  I've enabled the debug mode, but no messages are thrown in the 
console, is there something other I need to do to trigger the debug 
messages?
> > > > > 
> > > > >  
> > > > >  No. You're supposed to get a lot of output in the console.
> > > > >  
> > > > > 
> > > > >  Ah I totally forgot to mention that I doesn't use keepalive 
because I receive the following error when using it:
> > > > >  
> > > > >  "[Error] TypeError: null is not an object (evaluating 't.indexOf')
> > > > >   getDomainFromJid (converse.website.min.js, line 411)
> > > > >   _attach (converse.website.min.js, line 411)
> > > > >   attach (converse.website.min.js, line 411)
> > > > >   (anonyme Funktion) (conve  rse.website.min.js, line 411)
> > > > >   (anonyme Funktion) ([native code], line 0)
> > > > >   f (converse.website.min.js, line 411)
> > > > >   fireWith (converse.website.min.js, line 411)
> > > > >   x (converse.website.min.js, line 411)
> > > > >   t (converse.website.min.js, line 411)"
> > > > > 
> > > > >  
> > > > >  Try the unminified file: converse.js and then give me the line 
number so that I
> > > > >  can take a look.
> > > > >  
> > > > >  Also, what version of converse.js are you using?
> > > > >   
> > > > > 
> > > > >  I've defined:
> > > > >  
> > > > >  jid: 'test@mydomain.com/website'
> > > > >  keepalive: true
> > > > >  prebind_url: 'http://mydomain.com/prebind'
> > > > > 
> > > > >  
> > > > >  Looks fine.
> > > > >  
> > > > >  JC
> > > > >  
> > > > >  
> > > > > 
> > > > >  -------- Original Message -------- From: JC Brand <lists@opkode.com>
> > > > >  Apparently from: conversejs@librelist.com
> > > > >  To: conversejs@librelist.com
> > > > >  Subject: Re: [conversejs] SSO - prebind, anyone got it working?
> > > > >  Date: Mon, 27 Jul 2015 16:13:54 +0200
> > > > >  
> > > > > 
> > > > >  
> > > > >  On Sat, Jul 25, 2015 at 07:38:02PM -0400, 
silentneedle@Safe-mail.net wrote:
> > > > > 
> > > > >  I've setup converse with prosody (and it's bosh module) with 
the linked php lib from the documentation 
(https://github.com/candy-chat/xmpp-prebind-php). But it seems it doesn't 
work well. Generating a session etc. works fine, but at some point my test
users aren't able to chat/add new contacts anymore, their messages just 
don't arrive. I've also replaced   prosody with ejabberd to check if it's 
a prosody problem, but I have the same problem with that jabber-server.
> > > > >  
> > > > >  Sometimes the sent messages are received as offline messages 
when I switch the test-users status in converse.
> > > > >  
> > > > >  p.s. I've also checked prosody's/ejabberd's log in debug mode, 
no errors are shown there, just the usual new session/destroying session 
stuff. All clients are also stay connected, so it doesn't seem a problem 
with losing the connection.
> > > > > 
> > > > >  
> > > > >  It sounds to me like the XMPP connection between the browser 
and the XMPP
> > > > >  server is dropping. Set "debug: true" when calling 
converse.initialize and then
> > > > >  check the log output in your browser console.
> > > > >  
> > > > >  If you find 404 errors, then the connection has likely dropped.
> > > > >  You might otherwise also see an error which could be the cause 
of the problem.
> > > > >  
> > > > > 
> > > > >  Here is my converse config:
> > > > >  
> > > > >  <script>
> > > > >  jQuery.getJSON('http://mydomain.com/prebind', function (data) {
> > > > >   require(['converse'], function (converse) {
> > > > >       converse.initialize({
> > > > >           bosh_service_url: 'http://mydomain.com/http-bind',
> > > > >           keepalive: false,
> > > > >           authentication: 'prebind',
> > > > >    sid: data.sid,
> > > > >    jid: data.jid,
> > > > >    rid: data.rid,
> > > > >           allow_logout: false,
> > > > >           allow_registration: false,
> > > > >           ping_interval: 25
> > > > >       });
> > > > >   });
> > > > >  });
> > > > >  </script>
> > > > > 
> > > > >  
> > > > >  You might wanna try without ping_interval, just to eliminate a 
potential cause.
> > > > >  
> > > > >  Also, why do you have keepalive=false? Usually you'd want that 
to be true, to
> > > > >  avoid having to set up a new prebind connection on every page load.
> > > > >  
> > > > >  JC<  br />
> > > > > 
> > > > > 
> > > > 
> > > 
> > > 
> > > 
> > > -- 
> > > Sent from my Android device with K-9 Mail. Please excuse my brevity.
> > 
> 
> 
> 
> -- 
> Sent from my Android device with K-9 Mail. Please excuse my brevity.

Re: [conversejs] SSO - prebind, anyone got it working?

From:
Date:
2015-07-27 @ 20:51
Might it be possible that you could upload a build converse.js?

Unfortunately I'm getting errors on both of my two dev machines:
 

Running "jsmin" task

Error: Error: ERROR: module path does not exist: 
components/almond/almond.js for module named: components/almond/almond.js.
Path is relative to: /home/converse.js-0.9.4

    at /home/converse.js-0.9.4/node_modules/requirejs/bin/r.js:28660:35


-------- Original Message --------
From: JC Brand <lists@opkode.com>
Apparently from: conversejs@librelist.com
To: conversejs@librelist.com
Subject: Re: [conversejs] SSO - prebind, anyone got it working?
Date: Mon, 27 Jul 2015 22:14:11 +0200
 

> Sorry, I meant the converse.js file in the builds dir. 
> 
> If there isn't one, you'll have to run "make build". 
> 
> 
> On 27 Julie 2015 10:07:15 nm. GMT+02:00, silentneedle@Safe-mail.net wrote:
> > 
> > When using the unminified file I'm receiving the following error:
> > 
> > [Error] ReferenceError: Can't find variable: templates
> >  (anonyme Funktion) (converse.js, line 33)
> >  global code (converse.js, line 35)
> > 
> > I'm using 0.9.4.
> > 
> > -------- Original Message --------
> > From: JC Brand <lists@opkode.com>
> > Apparently from: conversejs@librelist.com
> > To: conversejs@librelist.com
> > Subject: Re: [conversejs] SSO - prebind, anyone got it working?
> > Date: Mon, 27 Jul 2015 21:28:45 +0200
> > 
> > > 
> > >  On Mon, Jul 27, 2015 at 12:02:00PM -0400, silentneedle@Safe-mail.net wrote:
> > > > 
> > > >  Hm you are right, it seems it has something to do with the ping, 
if I remove the ping_interval conversejs is doing fine, however, if I 
refresh the page now the chat doesn't work anymore.
> > > 
> > >  
> > >  That's what keepalive is for, not ping.
> > >  
> > > > 
> > > >  I've enabled the debug mode, but no messages are thrown in the 
console, is there something other I need to do to trigger the debug 
messages?
> > > 
> > >  
> > >  No. You're supposed to get a lot of output in the console.
> > >  
> > > > 
> > > >  Ah I totally forgot to mention that I doesn't use keepalive 
because I receive the following error when using it:
> > > >  
> > > >  "[Error] TypeError: null is not an object (evaluating 't.indexOf')
> > > >   getDomainFromJid (converse.website.min.js, line 411)
> > > >   _attach (converse.website.min.js, line 411)
> > > >   attach (converse.website.min.js, line 411)
> > > >   (anonyme Funktion) (converse.website.min.js, line 411)
> > > >   (anonyme Funktion) ([native code], line 0)
> > > >   f (converse.website.min.js, line 411)
> > > >   fireWith (converse.website.min.js, line 411)
> > > >   x (converse.website.min.js, line 411)
> > > >   t (converse.website.min.js, line 411)"
> > > 
> > >  
> > >  Try the unminified file: converse.js and then give me the line 
number so that I
> > >  can take a look.
> > >  
> > >  Also, what version of converse.js are you using?
> > >   
> > > > 
> > > >  I've defined:
> > > >  
> > > >  jid: 'test@mydomain.com/website'
> > > >  keepalive: true
> > > >  prebind_url: 'http://mydomain.com/prebind'
> > > 
> > >  
> > >  Looks fine.
> > >  
> > >  JC
> > >  
> > >  
> > > > 
> > > >  -------- Original Message --------
> > > >  From: JC Brand <lists@opkode.com>
> > > >  Apparently from: conversejs@librelist.com
> > > >  To: conversejs@librelist.com
> > > >  Subject: Re: [conversejs] SSO - prebind, anyone got it working?
> > > >  Date: Mon, 27 Jul 2015 16:13:54 +0200
> > > >  
> > > > > 
> > > > >  
> > > > >  On Sat, Jul 25, 2015 at 07:38:02PM -0400, 
silentneedle@Safe-mail.net wrote:
> > > > > 
> > > > >  I've setup converse with prosody (and it's bosh module) with 
the linked php lib from the documentation 
(https://github.com/candy-chat/xmpp-prebind-php). But it seems it doesn't 
work well. Generating a session etc. works fine, but at some point my test
users aren't able to chat/add new contacts anymore, their messages just 
don't arrive. I've also replaced prosody with ejabberd to check if it's a 
prosody problem, but I have the same problem with that jabber-server.
> > > > >  
> > > > >  Sometimes the sent messages are received as offline messages 
when I switch the test-users status in converse.
> > > > >  
> > > > >  p.s. I've also checked prosody's/ejabberd's log in debug mode, 
no errors are shown there, just the usual new session/destroying session 
stuff. All clients are also stay connected, so it doesn't seem a problem 
with losing the connection.
> > > > > 
> > > > >  
> > > > >  It sounds to me like the XMPP connection between the browser 
and the XMPP
> > > > >  server is dropping. Set "debug: true" when calling 
converse.initialize and then
> > > > >  check the log output in your browser console.
> > > > >  
> > > > >  If you find 404 errors, then the connection has likely dropped.
> > > > >  You might otherwise also see an error which could be the cause 
of the problem.
> > > > >  
> > > > > 
> > > > >  Here is my converse config:
> > > > >  
> > > > >  <script>
> > > > >  jQuery.getJSON('http://mydomain.com/prebind', function (data) {
> > > > >   require(['converse'], function (converse) {
> > > > >       converse.initialize({
> > > > >           bosh_service_url: 'http://mydomain.com/http-bind',
> > > > >           keepalive: false,
> > > > >           authentication: 'prebind',
> > > > >    sid: data.sid,
> > > > >    jid: data.jid,
> > > > >    rid: data.rid,
> > > > >           allow_logout: false,
> > > > >           allow_registration: false,
> > > > >           ping_interval: 25
> > > > >       });
> > > > >   });
> > > > >  });
> > > > >  </script>
> > > > > 
> > > > >  
> > > > >  You might wanna try without ping_interval, just to eliminate a 
potential cause.
> > > > >  
> > > > >  Also, why do you have keepalive=false? Usually you'd want that 
to be true, to
> > > > >  avoid having to set up a new prebind connection on every page load.
> > > > >  
> > > > >  JC
> > > > 
> > > 
> > 
> 
> 
> 
> -- 
> Sent from my Android device with K-9 Mail. Please excuse my brevity.

Re: [conversejs] SSO - prebind, anyone got it working?

From:
Jc Brand
Date:
2015-07-27 @ 21:41
I could, but only tomorrow. Try running "make dev" first, and then "make build". 

On 27 Julie 2015 10:51:36 nm. GMT+02:00, silentneedle@Safe-mail.net wrote:
>Might it be possible that you could upload a build converse.js?
>
>Unfortunately I'm getting errors on both of my two dev machines:
> 
>
>Running "jsmin" task
>
>Error: Error: ERROR: module path does not exist:
>components/almond/almond.js for module named:
>components/almond/almond.js. Path is relative to:
>/home/converse.js-0.9.4
>
>    at /home/converse.js-0.9.4/node_modules/requirejs/bin/r.js:28660:35
>
>
>-------- Original Message --------
>From: JC Brand <lists@opkode.com>
>Apparently from: conversejs@librelist.com
>To: conversejs@librelist.com
>Subject: Re: [conversejs] SSO - prebind, anyone got it working?
>Date: Mon, 27 Jul 2015 22:14:11 +0200
> 
>
>> Sorry, I meant the converse.js file in the builds dir. 
>> 
>> If there isn't one, you'll have to run "make build". 
>> 
>> 
>> On 27 Julie 2015 10:07:15 nm. GMT+02:00, silentneedle@Safe-mail.net
>wrote:
>> > 
>> > When using the unminified file I'm receiving the following error:
>> > 
>> > [Error] ReferenceError: Can't find variable: templates
>> >  (anonyme Funktion) (converse.js, line 33)
>> >  global code (converse.js, line 35)
>> > 
>> > I'm using 0.9.4.
>> > 
>> > -------- Original Message --------
>> > From: JC Brand <lists@opkode.com>
>> > Apparently from: conversejs@librelist.com
>> > To: conversejs@librelist.com
>> > Subject: Re: [conversejs] SSO - prebind, anyone got it working?
>> > Date: Mon, 27 Jul 2015 21:28:45 +0200
>> > 
>> > > 
>> > >  On Mon, Jul 27, 2015 at 12:02:00PM -0400,
>silentneedle@Safe-mail.net wrote:
>> > > > 
>> > > >  Hm you are right, it seems it has something to do with the
>ping, if I remove the ping_interval conversejs is doing fine, however,
>if I refresh the page now the chat doesn't work anymore.
>> > > 
>> > >  
>> > >  That's what keepalive is for, not ping.
>> > >  
>> > > > 
>> > > >  I've enabled the debug mode, but no messages are thrown in the
>console, is there something other I need to do to trigger the debug
>messages?
>> > > 
>> > >  
>> > >  No. You're supposed to get a lot of output in the console.
>> > >  
>> > > > 
>> > > >  Ah I totally forgot to mention that I doesn't use keepalive
>because I receive the following error when using it:
>> > > >  
>> > > >  "[Error] TypeError: null is not an object (evaluating
>'t.indexOf')
>> > > >   getDomainFromJid (converse.website.min.js, line 411)
>> > > >   _attach (converse.website.min.js, line 411)
>> > > >   attach (converse.website.min.js, line 411)
>> > > >   (anonyme Funktion) (converse.website.min.js, line 411)
>> > > >   (anonyme Funktion) ([native code], line 0)
>> > > >   f (converse.website.min.js, line 411)
>> > > >   fireWith (converse.website.min.js, line 411)
>> > > >   x (converse.website.min.js, line 411)
>> > > >   t (converse.website.min.js, line 411)"
>> > > 
>> > >  
>> > >  Try the unminified file: converse.js and then give me the line
>number so that I
>> > >  can take a look.
>> > >  
>> > >  Also, what version of converse.js are you using?
>> > >   
>> > > > 
>> > > >  I've defined:
>> > > >  
>> > > >  jid: 'test@mydomain.com/website'
>> > > >  keepalive: true
>> > > >  prebind_url: 'http://mydomain.com/prebind'
>> > > 
>> > >  
>> > >  Looks fine.
>> > >  
>> > >  JC
>> > >  
>> > >  
>> > > > 
>> > > >  -------- Original Message --------
>> > > >  From: JC Brand <lists@opkode.com>
>> > > >  Apparently from: conversejs@librelist.com
>> > > >  To: conversejs@librelist.com
>> > > >  Subject: Re: [conversejs] SSO - prebind, anyone got it
>working?
>> > > >  Date: Mon, 27 Jul 2015 16:13:54 +0200
>> > > >  
>> > > > > 
>> > > > >  
>> > > > >  On Sat, Jul 25, 2015 at 07:38:02PM -0400,
>silentneedle@Safe-mail.net wrote:
>> > > > > 
>> > > > >  I've setup converse with prosody (and it's bosh module) with
>the linked php lib from the documentation
>(https://github.com/candy-chat/xmpp-prebind-php). But it seems it
>doesn't work well. Generating a session etc. works fine, but at some
>point my test users aren't able to chat/add new contacts anymore, their
>messages just don't arrive. I've also replaced prosody with ejabberd to
>check if it's a prosody problem, but I have the same problem with that
>jabber-server.
>> > > > >  
>> > > > >  Sometimes the sent messages are received as offline messages
>when I switch the test-users status in converse.
>> > > > >  
>> > > > >  p.s. I've also checked prosody's/ejabberd's log in debug
>mode, no errors are shown there, just the usual new session/destroying
>session stuff. All clients are also stay connected, so it doesn't seem
>a problem with losing the connection.
>> > > > > 
>> > > > >  
>> > > > >  It sounds to me like the XMPP connection between the browser
>and the XMPP
>> > > > >  server is dropping. Set "debug: true" when calling
>converse.initialize and then
>> > > > >  check the log output in your browser console.
>> > > > >  
>> > > > >  If you find 404 errors, then the connection has likely
>dropped.
>> > > > >  You might otherwise also see an error which could be the
>cause of the problem.
>> > > > >  
>> > > > > 
>> > > > >  Here is my converse config:
>> > > > >  
>> > > > >  <script>
>> > > > >  jQuery.getJSON('http://mydomain.com/prebind', function
>(data) {
>> > > > >   require(['converse'], function (converse) {
>> > > > >       converse.initialize({
>> > > > >           bosh_service_url: 'http://mydomain.com/http-bind',
>> > > > >           keepalive: false,
>> > > > >           authentication: 'prebind',
>> > > > >    sid: data.sid,
>> > > > >    jid: data.jid,
>> > > > >    rid: data.rid,
>> > > > >           allow_logout: false,
>> > > > >           allow_registration: false,
>> > > > >           ping_interval: 25
>> > > > >       });
>> > > > >   });
>> > > > >  });
>> > > > >  </script>
>> > > > > 
>> > > > >  
>> > > > >  You might wanna try without ping_interval, just to eliminate
>a potential cause.
>> > > > >  
>> > > > >  Also, why do you have keepalive=false? Usually you'd want
>that to be true, to
>> > > > >  avoid having to set up a new prebind connection on every
>page load.
>> > > > >  
>> > > > >  JC
>> > > > 
>> > > 
>> > 
>> 
>> 
>> 
>> -- 
>> Sent from my Android device with K-9 Mail. Please excuse my brevity.

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Re: [conversejs] SSO - prebind, anyone got it working?

From:
Date:
2015-07-27 @ 16:02
Hm you are right, it seems it has something to do with the ping, if I 
remove the ping_interval conversejs is doing fine, however, if I refresh 
the page now the chat doesn't work anymore.

I've enabled the debug mode, but no messages are thrown in the console, is
there something other I need to do to trigger the debug messages?

Ah I totally forgot to mention that I doesn't use keepalive because I 
receive the following error when using it:

"[Error] TypeError: null is not an object (evaluating 't.indexOf')
	getDomainFromJid (converse.website.min.js, line 411)
	_attach (converse.website.min.js, line 411)
	attach (converse.website.min.js, line 411)
	(anonyme Funktion) (converse.website.min.js, line 411)
	(anonyme Funktion) ([native code], line 0)
	f (converse.website.min.js, line 411)
	fireWith (converse.website.min.js, line 411)
	x (converse.website.min.js, line 411)
	t (converse.website.min.js, line 411)"

I've defined:

jid: 'test@mydomain.com/website'
keepalive: true
prebind_url: 'http://mydomain.com/prebind'

-------- Original Message --------
From: JC Brand <lists@opkode.com>
Apparently from: conversejs@librelist.com
To: conversejs@librelist.com
Subject: Re: [conversejs] SSO - prebind, anyone got it working?
Date: Mon, 27 Jul 2015 16:13:54 +0200

> 
> On Sat, Jul 25, 2015 at 07:38:02PM -0400, silentneedle@Safe-mail.net wrote:
> > I've setup converse with prosody (and it's bosh module) with the 
linked php lib from the documentation 
(https://github.com/candy-chat/xmpp-prebind-php). But it seems it doesn't 
work well. Generating a session etc. works fine, but at some point my test
users aren't able to chat/add new contacts anymore, their messages just 
don't arrive. I've also replaced prosody with ejabberd to check if it's a 
prosody problem, but I have the same problem with that jabber-server.
> > 
> > Sometimes the sent messages are received as offline messages when I 
switch the test-users status in converse.
> > 
> > p.s. I've also checked prosody's/ejabberd's log in debug mode, no 
errors are shown there, just the usual new session/destroying session 
stuff. All clients are also stay connected, so it doesn't seem a problem 
with losing the connection.
> 
> It sounds to me like the XMPP connection between the browser and the XMPP
> server is dropping. Set "debug: true" when calling converse.initialize and then
> check the log output in your browser console.
> 
> If you find 404 errors, then the connection has likely dropped.
> You might otherwise also see an error which could be the cause of the problem.
> 
> > Here is my converse config:
> > 
> > <script>
> > jQuery.getJSON('http://mydomain.com/prebind', function (data) {
> > 	require(['converse'], function (converse) {
> > 	    converse.initialize({
> > 	        bosh_service_url: 'http://mydomain.com/http-bind',
> > 	        keepalive: false,
> > 	        authentication: 'prebind',
> > 		sid: data.sid,
> > 		jid: data.jid,
> > 		rid: data.rid,
> > 	        allow_logout: false,
> > 	        allow_registration: false,
> > 	        ping_interval: 25
> > 	    });
> > 	});
> > });
> > </script>
> 
> You might wanna try without ping_interval, just to eliminate a potential cause.
> 
> Also, why do you have keepalive=false? Usually you'd want that to be true, to
> avoid having to set up a new prebind connection on every page load.
> 
> JC

Re: [conversejs] SSO - prebind, anyone got it working?

From:
Jc Brand
Date:
2015-07-27 @ 19:28
On Mon, Jul 27, 2015 at 12:02:00PM -0400, silentneedle@Safe-mail.net wrote:
> Hm you are right, it seems it has something to do with the ping, if I 
remove the ping_interval conversejs is doing fine, however, if I refresh 
the page now the chat doesn't work anymore.

That's what keepalive is for, not ping.

> I've enabled the debug mode, but no messages are thrown in the console, 
is there something other I need to do to trigger the debug messages?

No. You're supposed to get a lot of output in the console.

> Ah I totally forgot to mention that I doesn't use keepalive because I 
receive the following error when using it:
> 
> "[Error] TypeError: null is not an object (evaluating 't.indexOf')
> 	getDomainFromJid (converse.website.min.js, line 411)
> 	_attach (converse.website.min.js, line 411)
> 	attach (converse.website.min.js, line 411)
> 	(anonyme Funktion) (converse.website.min.js, line 411)
> 	(anonyme Funktion) ([native code], line 0)
> 	f (converse.website.min.js, line 411)
> 	fireWith (converse.website.min.js, line 411)
> 	x (converse.website.min.js, line 411)
> 	t (converse.website.min.js, line 411)"

Try the unminified file: converse.js and then give me the line number so that I
can take a look.

Also, what version of converse.js are you using?
 
> I've defined:
> 
> jid: 'test@mydomain.com/website'
> keepalive: true
> prebind_url: 'http://mydomain.com/prebind'

Looks fine.

JC


> -------- Original Message --------
> From: JC Brand <lists@opkode.com>
> Apparently from: conversejs@librelist.com
> To: conversejs@librelist.com
> Subject: Re: [conversejs] SSO - prebind, anyone got it working?
> Date: Mon, 27 Jul 2015 16:13:54 +0200
> 
> > 
> > On Sat, Jul 25, 2015 at 07:38:02PM -0400, silentneedle@Safe-mail.net wrote:
> > > I've setup converse with prosody (and it's bosh module) with the 
linked php lib from the documentation 
(https://github.com/candy-chat/xmpp-prebind-php). But it seems it doesn't 
work well. Generating a session etc. works fine, but at some point my test
users aren't able to chat/add new contacts anymore, their messages just 
don't arrive. I've also replaced prosody with ejabberd to check if it's a 
prosody problem, but I have the same problem with that jabber-server.
> > > 
> > > Sometimes the sent messages are received as offline messages when I 
switch the test-users status in converse.
> > > 
> > > p.s. I've also checked prosody's/ejabberd's log in debug mode, no 
errors are shown there, just the usual new session/destroying session 
stuff. All clients are also stay connected, so it doesn't seem a problem 
with losing the connection.
> > 
> > It sounds to me like the XMPP connection between the browser and the XMPP
> > server is dropping. Set "debug: true" when calling converse.initialize
and then
> > check the log output in your browser console.
> > 
> > If you find 404 errors, then the connection has likely dropped.
> > You might otherwise also see an error which could be the cause of the problem.
> > 
> > > Here is my converse config:
> > > 
> > > <script>
> > > jQuery.getJSON('http://mydomain.com/prebind', function (data) {
> > > 	require(['converse'], function (converse) {
> > > 	    converse.initialize({
> > > 	        bosh_service_url: 'http://mydomain.com/http-bind',
> > > 	        keepalive: false,
> > > 	        authentication: 'prebind',
> > > 		sid: data.sid,
> > > 		jid: data.jid,
> > > 		rid: data.rid,
> > > 	        allow_logout: false,
> > > 	        allow_registration: false,
> > > 	        ping_interval: 25
> > > 	    });
> > > 	});
> > > });
> > > </script>
> > 
> > You might wanna try without ping_interval, just to eliminate a 
potential cause.
> > 
> > Also, why do you have keepalive=false? Usually you'd want that to be true, to
> > avoid having to set up a new prebind connection on every page load.
> > 
> > JC

Re: [conversejs] SSO - prebind, anyone got it working?

From:
Date:
2015-07-27 @ 20:07
When using the unminified file I'm receiving the following error:

[Error] ReferenceError: Can't find variable: templates
	(anonyme Funktion) (converse.js, line 33)
	global code (converse.js, line 35)

I'm using 0.9.4.

-------- Original Message --------
From: JC Brand <lists@opkode.com>
Apparently from: conversejs@librelist.com
To: conversejs@librelist.com
Subject: Re: [conversejs] SSO - prebind, anyone got it working?
Date: Mon, 27 Jul 2015 21:28:45 +0200

> On Mon, Jul 27, 2015 at 12:02:00PM -0400, silentneedle@Safe-mail.net wrote:
> > Hm you are right, it seems it has something to do with the ping, if I 
remove the ping_interval conversejs is doing fine, however, if I refresh 
the page now the chat doesn't work anymore.
> 
> That's what keepalive is for, not ping.
> 
> > I've enabled the debug mode, but no messages are thrown in the 
console, is there something other I need to do to trigger the debug 
messages?
> 
> No. You're supposed to get a lot of output in the console.
> 
> > Ah I totally forgot to mention that I doesn't use keepalive because I 
receive the following error when using it:
> > 
> > "[Error] TypeError: null is not an object (evaluating 't.indexOf')
> > 	getDomainFromJid (converse.website.min.js, line 411)
> > 	_attach (converse.website.min.js, line 411)
> > 	attach (converse.website.min.js, line 411)
> > 	(anonyme Funktion) (converse.website.min.js, line 411)
> > 	(anonyme Funktion) ([native code], line 0)
> > 	f (converse.website.min.js, line 411)
> > 	fireWith (converse.website.min.js, line 411)
> > 	x (converse.website.min.js, line 411)
> > 	t (converse.website.min.js, line 411)"
> 
> Try the unminified file: converse.js and then give me the line number so that I
> can take a look.
> 
> Also, what version of converse.js are you using?
>  
> > I've defined:
> > 
> > jid: 'test@mydomain.com/website'
> > keepalive: true
> > prebind_url: 'http://mydomain.com/prebind'
> 
> Looks fine.
> 
> JC
> 
> 
> > -------- Original Message --------
> > From: JC Brand <lists@opkode.com>
> > Apparently from: conversejs@librelist.com
> > To: conversejs@librelist.com
> > Subject: Re: [conversejs] SSO - prebind, anyone got it working?
> > Date: Mon, 27 Jul 2015 16:13:54 +0200
> > 
> > > 
> > > On Sat, Jul 25, 2015 at 07:38:02PM -0400, silentneedle@Safe-mail.net wrote:
> > > > I've setup converse with prosody (and it's bosh module) with the 
linked php lib from the documentation 
(https://github.com/candy-chat/xmpp-prebind-php). But it seems it doesn't 
work well. Generating a session etc. works fine, but at some point my test
users aren't able to chat/add new contacts anymore, their messages just 
don't arrive. I've also replaced prosody with ejabberd to check if it's a 
prosody problem, but I have the same problem with that jabber-server.
> > > > 
> > > > Sometimes the sent messages are received as offline messages when 
I switch the test-users status in converse.
> > > > 
> > > > p.s. I've also checked prosody's/ejabberd's log in debug mode, no 
errors are shown there, just the usual new session/destroying session 
stuff. All clients are also stay connected, so it doesn't seem a problem 
with losing the connection.
> > > 
> > > It sounds to me like the XMPP connection between the browser and the XMPP
> > > server is dropping. Set "debug: true" when calling 
converse.initialize and then
> > > check the log output in your browser console.
> > > 
> > > If you find 404 errors, then the connection has likely dropped.
> > > You might otherwise also see an error which could be the cause of 
the problem.
> > > 
> > > > Here is my converse config:
> > > > 
> > > > <script>
> > > > jQuery.getJSON('http://mydomain.com/prebind', function (data) {
> > > > 	require(['converse'], function (converse) {
> > > > 	    converse.initialize({
> > > > 	        bosh_service_url: 'http://mydomain.com/http-bind',
> > > > 	        keepalive: false,
> > > > 	        authentication: 'prebind',
> > > > 		sid: data.sid,
> > > > 		jid: data.jid,
> > > > 		rid: data.rid,
> > > > 	        allow_logout: false,
> > > > 	        allow_registration: false,
> > > > 	        ping_interval: 25
> > > > 	    });
> > > > 	});
> > > > });
> > > > </script>
> > > 
> > > You might wanna try without ping_interval, just to eliminate a 
potential cause.
> > > 
> > > Also, why do you have keepalive=false? Usually you'd want that to be
true, to
> > > avoid having to set up a new prebind connection on every page load.
> > > 
> > > JC

Re: [conversejs] SSO - prebind, anyone got it working?

From:
Jc Brand
Date:
2015-07-27 @ 20:14
Sorry, I meant the converse.js file in the builds dir. 

If there isn't one, you'll have to run "make build". 


On 27 Julie 2015 10:07:15 nm. GMT+02:00, silentneedle@Safe-mail.net wrote:
>When using the unminified file I'm receiving the following error:
>
>[Error] ReferenceError: Can't find variable: templates
>	(anonyme Funktion) (converse.js, line 33)
>	global code (converse.js, line 35)
>
>I'm using 0.9.4.
>
>-------- Original Message --------
>From: JC Brand <lists@opkode.com>
>Apparently from: conversejs@librelist.com
>To: conversejs@librelist.com
>Subject: Re: [conversejs] SSO - prebind, anyone got it working?
>Date: Mon, 27 Jul 2015 21:28:45 +0200
>
>> On Mon, Jul 27, 2015 at 12:02:00PM -0400, silentneedle@Safe-mail.net
>wrote:
>> > Hm you are right, it seems it has something to do with the ping, if
>I remove the ping_interval conversejs is doing fine, however, if I
>refresh the page now the chat doesn't work anymore.
>> 
>> That's what keepalive is for, not ping.
>> 
>> > I've enabled the debug mode, but no messages are thrown in the
>console, is there something other I need to do to trigger the debug
>messages?
>> 
>> No. You're supposed to get a lot of output in the console.
>> 
>> > Ah I totally forgot to mention that I doesn't use keepalive because
>I receive the following error when using it:
>> > 
>> > "[Error] TypeError: null is not an object (evaluating 't.indexOf')
>> > 	getDomainFromJid (converse.website.min.js, line 411)
>> > 	_attach (converse.website.min.js, line 411)
>> > 	attach (converse.website.min.js, line 411)
>> > 	(anonyme Funktion) (converse.website.min.js, line 411)
>> > 	(anonyme Funktion) ([native code], line 0)
>> > 	f (converse.website.min.js, line 411)
>> > 	fireWith (converse.website.min.js, line 411)
>> > 	x (converse.website.min.js, line 411)
>> > 	t (converse.website.min.js, line 411)"
>> 
>> Try the unminified file: converse.js and then give me the line number
>so that I
>> can take a look.
>> 
>> Also, what version of converse.js are you using?
>>  
>> > I've defined:
>> > 
>> > jid: 'test@mydomain.com/website'
>> > keepalive: true
>> > prebind_url: 'http://mydomain.com/prebind'
>> 
>> Looks fine.
>> 
>> JC
>> 
>> 
>> > -------- Original Message --------
>> > From: JC Brand <lists@opkode.com>
>> > Apparently from: conversejs@librelist.com
>> > To: conversejs@librelist.com
>> > Subject: Re: [conversejs] SSO - prebind, anyone got it working?
>> > Date: Mon, 27 Jul 2015 16:13:54 +0200
>> > 
>> > > 
>> > > On Sat, Jul 25, 2015 at 07:38:02PM -0400,
>silentneedle@Safe-mail.net wrote:
>> > > > I've setup converse with prosody (and it's bosh module) with
>the linked php lib from the documentation
>(https://github.com/candy-chat/xmpp-prebind-php). But it seems it
>doesn't work well. Generating a session etc. works fine, but at some
>point my test users aren't able to chat/add new contacts anymore, their
>messages just don't arrive. I've also replaced prosody with ejabberd to
>check if it's a prosody problem, but I have the same problem with that
>jabber-server.
>> > > > 
>> > > > Sometimes the sent messages are received as offline messages
>when I switch the test-users status in converse.
>> > > > 
>> > > > p.s. I've also checked prosody's/ejabberd's log in debug mode,
>no errors are shown there, just the usual new session/destroying
>session stuff. All clients are also stay connected, so it doesn't seem
>a problem with losing the connection.
>> > > 
>> > > It sounds to me like the XMPP connection between the browser and
>the XMPP
>> > > server is dropping. Set "debug: true" when calling
>converse.initialize and then
>> > > check the log output in your browser console.
>> > > 
>> > > If you find 404 errors, then the connection has likely dropped.
>> > > You might otherwise also see an error which could be the cause of
>the problem.
>> > > 
>> > > > Here is my converse config:
>> > > > 
>> > > > <script>
>> > > > jQuery.getJSON('http://mydomain.com/prebind', function (data) {
>> > > > 	require(['converse'], function (converse) {
>> > > > 	    converse.initialize({
>> > > > 	        bosh_service_url: 'http://mydomain.com/http-bind',
>> > > > 	        keepalive: false,
>> > > > 	        authentication: 'prebind',
>> > > > 		sid: data.sid,
>> > > > 		jid: data.jid,
>> > > > 		rid: data.rid,
>> > > > 	        allow_logout: false,
>> > > > 	        allow_registration: false,
>> > > > 	        ping_interval: 25
>> > > > 	    });
>> > > > 	});
>> > > > });
>> > > > </script>
>> > > 
>> > > You might wanna try without ping_interval, just to eliminate a
>potential cause.
>> > > 
>> > > Also, why do you have keepalive=false? Usually you'd want that to
>be true, to
>> > > avoid having to set up a new prebind connection on every page
>load.
>> > > 
>> > > JC

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.