librelist archives

« back to archive

Converse login automation

Converse login automation

From:
Andrei Charepka
Date:
2014-06-03 @ 21:49
Hello,

I was successfully able to include Converse client into a Chrome 
extension. Now I am trying to add automatic login since I can store user 
credentials in the browser and don’t need them to re-entered.

Here’s what I tried: I opened a connection to the OpenFire server by using
Strophe directly. After the connection was established, I used the sid and
rid values to initialize Converse using pre-bind. This was also successful
– connection was established and I got  the roster with my contacts.

My problem is the following – when I try the above approach, after the 
Converse is connected, it keeps sending requests to the server. With debug
enabled, I keep seeing this in the logs:

0 request id 41.1 state changed to 2 converse.min.js:163
0 request id 41.1 state changed to 3 converse.min.js:163
0 request id 41.1 state changed to 4 converse.min.js:163
0 removing request converse.min.js:163
0 _throttledRequestHandler called with 0 requests converse.min.js:163
0 request id 41 should now be removed converse.min.js:163
0 request id 41.1 got 200 converse.min.js:163
<body xmlns=​"http:​/​/​jabber.org/​protocol/​httpbind">​</body>​ 
converse.min.js:163
0 request id 40.1 state changed to 2 converse.min.js:163
0 request id 40.1 state changed to 3 converse.min.js:163
0 request id 40.1 state changed to 4 converse.min.js:163
0 removing request converse.min.js:163
0 _throttledRequestHandler called with 0 requests converse.min.js:163
0 request id 40 should now be removed converse.min.js:163
0 request id 40.1 got 200 converse.min.js:163
1 no requests during idle cycle, sending blank request converse.min.js:163
0 request id 42.0 posting converse.min.js:163
0 request id 42.0 state changed to 1

with id just keeping increasing.

Also, the method attached to connection.xmlOutput keeps getting called 
with the following:
<body rid="4245947958" xmlns="http://jabber.org/protocol/httpbind" 
sid="8fcd472b"/>

Where rid keeps getting incremented.

As a result, the UI become unresponsive and Chrome freezes and eventually crashes.

Is there a simpler way to achieving automatic login with the current 
Converse implementation or will I have to modify the source code to get it
working?

Thanks a bunch!
Andrei


Re: [conversejs] Converse login automation

From:
Andrei Charepka
Date:
2014-06-04 @ 14:10
In case anybody encountered the same issue – the trick appears to be 
calling pause() on the connection created using Strophe directly before 
trying to initialize Converse with pre-bind.

Andrei

From: conversejs@librelist.com [mailto:conversejs@librelist.com] On Behalf
Of Andrei Charepka
Sent: Tuesday, June 03, 2014 5:50 PM
To: conversejs@librelist.com
Subject: [conversejs] Converse login automation

Hello,

I was successfully able to include Converse client into a Chrome 
extension. Now I am trying to add automatic login since I can store user 
credentials in the browser and don’t need them to re-entered.

Here’s what I tried: I opened a connection to the OpenFire server by using
Strophe directly. After the connection was established, I used the sid and
rid values to initialize Converse using pre-bind. This was also successful
– connection was established and I got  the roster with my contacts.

My problem is the following – when I try the above approach, after the 
Converse is connected, it keeps sending requests to the server. With debug
enabled, I keep seeing this in the logs:

0 request id 41.1 state changed to 2 converse.min.js:163
0 request id 41.1 state changed to 3 converse.min.js:163
0 request id 41.1 state changed to 4 converse.min.js:163
0 removing request converse.min.js:163
0 _throttledRequestHandler called with 0 requests converse.min.js:163
0 request id 41 should now be removed converse.min.js:163
0 request id 41.1 got 200 converse.min.js:163
<body 
xmlns=​"http:​/​/​jabber.org/​protocol/​httpbind<http://​/​/​jabber.org/​protocol/​httpbind>">​</body>​
converse.min.js:163
0 request id 40.1 state changed to 2 converse.min.js:163
0 request id 40.1 state changed to 3 converse.min.js:163
0 request id 40.1 state changed to 4 converse.min.js:163
0 removing request converse.min.js:163
0 _throttledRequestHandler called with 0 requests converse.min.js:163
0 request id 40 should now be removed converse.min.js:163
0 request id 40.1 got 200 converse.min.js:163
1 no requests during idle cycle, sending blank request converse.min.js:163
0 request id 42.0 posting converse.min.js:163
0 request id 42.0 state changed to 1

with id just keeping increasing.

Also, the method attached to connection.xmlOutput keeps getting called 
with the following:
<body rid="4245947958" xmlns="http://jabber.org/protocol/httpbind" 
sid="8fcd472b"/>

Where rid keeps getting incremented.

As a result, the UI become unresponsive and Chrome freezes and eventually crashes.

Is there a simpler way to achieving automatic login with the current 
Converse implementation or will I have to modify the source code to get it
working?

Thanks a bunch!
Andrei


Re: [conversejs] Converse login automation

From:
Jc Brand
Date:
2014-06-06 @ 08:02
Hi Andrei

Is the chrome extension code open-source?

Regards
JC

On Wed, Jun 04, 2014 at 02:10:31PM +0000, Andrei Charepka wrote:
>    In case anybody encountered the same issue – the trick appears to be
>    calling pause() on the connection created using Strophe directly before
>    trying to initialize Converse with pre-bind.
> 
>     
> 
>    Andrei
> 
>     
> 
>    From: conversejs@librelist.com [mailto:conversejs@librelist.com] On Behalf
>    Of Andrei Charepka
>    Sent: Tuesday, June 03, 2014 5:50 PM
>    To: conversejs@librelist.com
>    Subject: [conversejs] Converse login automation
> 
>     
> 
>    Hello,
> 
>     
> 
>    I was successfully able to include Converse client into a Chrome
>    extension. Now I am trying to add automatic login since I can store user
>    credentials in the browser and don’t need them to re-entered.
> 
>     
> 
>    Here’s what I tried: I opened a connection to the OpenFire server by using
>    Strophe directly. After the connection was established, I used the sid and
>    rid values to initialize Converse using pre-bind. This was also successful
>    – connection was established and I got  the roster with my contacts.
> 
>     
> 
>    My problem is the following – when I try the above approach, after the
>    Converse is connected, it keeps sending requests to the server. With debug
>    enabled, I keep seeing this in the logs:
> 
>     
> 
>    0 request id 41.1 state changed to 2 converse.min.js:163
> 
>    0 request id 41.1 state changed to 3 converse.min.js:163
> 
>    0 request id 41.1 state changed to 4 converse.min.js:163
> 
>    0 removing request converse.min.js:163
> 
>    0 _throttledRequestHandler called with 0 requests converse.min.js:163
> 
>    0 request id 41 should now be removed converse.min.js:163
> 
>    0 request id 41.1 got 200 converse.min.js:163
> 
>    <body xmlns=​"[1]http:​/​/​jabber.org/​protocol/​httpbind">​</body>​
>    converse.min.js:163
> 
>    0 request id 40.1 state changed to 2 converse.min.js:163
> 
>    0 request id 40.1 state changed to 3 converse.min.js:163
> 
>    0 request id 40.1 state changed to 4 converse.min.js:163
> 
>    0 removing request converse.min.js:163
> 
>    0 _throttledRequestHandler called with 0 requests converse.min.js:163
> 
>    0 request id 40 should now be removed converse.min.js:163
> 
>    0 request id 40.1 got 200 converse.min.js:163
> 
>    1 no requests during idle cycle, sending blank request converse.min.js:163
> 
>    0 request id 42.0 posting converse.min.js:163
> 
>    0 request id 42.0 state changed to 1
> 
>     
> 
>    with id just keeping increasing.
> 
>     
> 
>    Also, the method attached to connection.xmlOutput keeps getting called
>    with the following:
> 
>    <body rid="4245947958" xmlns="[2]http://jabber.org/protocol/httpbind"
>    sid="8fcd472b"/>
> 
>     
> 
>    Where rid keeps getting incremented.
> 
>     
> 
>    As a result, the UI become unresponsive and Chrome freezes and eventually
>    crashes.
> 
>     
> 
>    Is there a simpler way to achieving automatic login with the current
>    Converse implementation or will I have to modify the source code to get it
>    working?
> 
>     
> 
>    Thanks a bunch!
> 
>    Andrei
> 
>     
> 
>     
> 
>     
> 
> References
> 
>    Visible links
>    1. http://​/​/​jabber.org/​protocol/​httpbind
>    2. http://jabber.org/protocol/httpbind

Re: [conversejs] Converse login automation

From:
Andrei Charepka
Date:
2014-06-06 @ 17:44
Hi JC,

My colleague has written you a letter explaining the details of the 
project where ConverseJS is used and he is going to send it to you shortly
through the contact form on your web site. Please let me know if you have 
any other concerns.

Sincerely,
Andrei 

-----Original Message-----
From: conversejs@librelist.com [mailto:conversejs@librelist.com] On Behalf
Of JC Brand
Sent: Friday, June 06, 2014 4:02 AM
To: conversejs@librelist.com
Subject: Re: [conversejs] Converse login automation

Hi Andrei

Is the chrome extension code open-source?

Regards
JC

On Wed, Jun 04, 2014 at 02:10:31PM +0000, Andrei Charepka wrote:
>    In case anybody encountered the same issue – the trick appears to be
>    calling pause() on the connection created using Strophe directly before
>    trying to initialize Converse with pre-bind.
> 
>     
> 
>    Andrei
> 
>     
> 
>    From: conversejs@librelist.com [mailto:conversejs@librelist.com] On Behalf
>    Of Andrei Charepka
>    Sent: Tuesday, June 03, 2014 5:50 PM
>    To: conversejs@librelist.com
>    Subject: [conversejs] Converse login automation
> 
>     
> 
>    Hello,
> 
>     
> 
>    I was successfully able to include Converse client into a Chrome
>    extension. Now I am trying to add automatic login since I can store user
>    credentials in the browser and don’t need them to re-entered.
> 
>     
> 
>    Here’s what I tried: I opened a connection to the OpenFire server by using
>    Strophe directly. After the connection was established, I used the sid and
>    rid values to initialize Converse using pre-bind. This was also successful
>    – connection was established and I got  the roster with my contacts.
> 
>     
> 
>    My problem is the following – when I try the above approach, after the
>    Converse is connected, it keeps sending requests to the server. With debug
>    enabled, I keep seeing this in the logs:
> 
>     
> 
>    0 request id 41.1 state changed to 2 converse.min.js:163
> 
>    0 request id 41.1 state changed to 3 converse.min.js:163
> 
>    0 request id 41.1 state changed to 4 converse.min.js:163
> 
>    0 removing request converse.min.js:163
> 
>    0 _throttledRequestHandler called with 0 requests converse.min.js:163
> 
>    0 request id 41 should now be removed converse.min.js:163
> 
>    0 request id 41.1 got 200 converse.min.js:163
> 
>    <body xmlns=​"[1]http:​/​/​jabber.org/​protocol/​httpbind">​</body>​
>    converse.min.js:163
> 
>    0 request id 40.1 state changed to 2 converse.min.js:163
> 
>    0 request id 40.1 state changed to 3 converse.min.js:163
> 
>    0 request id 40.1 state changed to 4 converse.min.js:163
> 
>    0 removing request converse.min.js:163
> 
>    0 _throttledRequestHandler called with 0 requests converse.min.js:163
> 
>    0 request id 40 should now be removed converse.min.js:163
> 
>    0 request id 40.1 got 200 converse.min.js:163
> 
>    1 no requests during idle cycle, sending blank request converse.min.js:163
> 
>    0 request id 42.0 posting converse.min.js:163
> 
>    0 request id 42.0 state changed to 1
> 
>     
> 
>    with id just keeping increasing.
> 
>     
> 
>    Also, the method attached to connection.xmlOutput keeps getting called
>    with the following:
> 
>    <body rid="4245947958" xmlns="[2]http://jabber.org/protocol/httpbind"
>    sid="8fcd472b"/>
> 
>     
> 
>    Where rid keeps getting incremented.
> 
>     
> 
>    As a result, the UI become unresponsive and Chrome freezes and eventually
>    crashes.
> 
>     
> 
>    Is there a simpler way to achieving automatic login with the current
>    Converse implementation or will I have to modify the source code to get it
>    working?
> 
>     
> 
>    Thanks a bunch!
> 
>    Andrei
> 
>     
> 
>     
> 
>     
> 
> References
> 
>    Visible links
>    1. http://​/​/​jabber.org/​protocol/​httpbind
>    2. http://jabber.org/protocol/httpbind

Re: [conversejs] Converse login automation

From:
Jc Brand
Date:
2014-06-12 @ 22:34
Hi Andrei

Thanks for the heads up. I'm sick with the flu this week so didn't get much done.

I've however received the email and replied to it.

Regards
JC

On Fri, Jun 06, 2014 at 05:44:58PM +0000, Andrei Charepka wrote:
> Hi JC,
> 
> My colleague has written you a letter explaining the details of the 
project where ConverseJS is used and he is going to send it to you shortly
through the contact form on your web site. Please let me know if you have 
any other concerns.
> 
> Sincerely,
> Andrei 
> 
> -----Original Message-----
> From: conversejs@librelist.com [mailto:conversejs@librelist.com] On 
Behalf Of JC Brand
> Sent: Friday, June 06, 2014 4:02 AM
> To: conversejs@librelist.com
> Subject: Re: [conversejs] Converse login automation
> 
> Hi Andrei
> 
> Is the chrome extension code open-source?
> 
> Regards
> JC
> 
> On Wed, Jun 04, 2014 at 02:10:31PM +0000, Andrei Charepka wrote:
> >    In case anybody encountered the same issue – the trick appears to be
> >    calling pause() on the connection created using Strophe directly before
> >    trying to initialize Converse with pre-bind.
> > 
> >     
> > 
> >    Andrei
> > 
> >     
> > 
> >    From: conversejs@librelist.com [mailto:conversejs@librelist.com] On Behalf
> >    Of Andrei Charepka
> >    Sent: Tuesday, June 03, 2014 5:50 PM
> >    To: conversejs@librelist.com
> >    Subject: [conversejs] Converse login automation
> > 
> >     
> > 
> >    Hello,
> > 
> >     
> > 
> >    I was successfully able to include Converse client into a Chrome
> >    extension. Now I am trying to add automatic login since I can store user
> >    credentials in the browser and don’t need them to re-entered.
> > 
> >     
> > 
> >    Here’s what I tried: I opened a connection to the OpenFire server by using
> >    Strophe directly. After the connection was established, I used the sid and
> >    rid values to initialize Converse using pre-bind. This was also successful
> >    – connection was established and I got  the roster with my contacts.
> > 
> >     
> > 
> >    My problem is the following – when I try the above approach, after the
> >    Converse is connected, it keeps sending requests to the server. With debug
> >    enabled, I keep seeing this in the logs:
> > 
> >     
> > 
> >    0 request id 41.1 state changed to 2 converse.min.js:163
> > 
> >    0 request id 41.1 state changed to 3 converse.min.js:163
> > 
> >    0 request id 41.1 state changed to 4 converse.min.js:163
> > 
> >    0 removing request converse.min.js:163
> > 
> >    0 _throttledRequestHandler called with 0 requests converse.min.js:163
> > 
> >    0 request id 41 should now be removed converse.min.js:163
> > 
> >    0 request id 41.1 got 200 converse.min.js:163
> > 
> >    <body xmlns=​"[1]http:​/​/​jabber.org/​protocol/​httpbind">​</body>​
> >    converse.min.js:163
> > 
> >    0 request id 40.1 state changed to 2 converse.min.js:163
> > 
> >    0 request id 40.1 state changed to 3 converse.min.js:163
> > 
> >    0 request id 40.1 state changed to 4 converse.min.js:163
> > 
> >    0 removing request converse.min.js:163
> > 
> >    0 _throttledRequestHandler called with 0 requests converse.min.js:163
> > 
> >    0 request id 40 should now be removed converse.min.js:163
> > 
> >    0 request id 40.1 got 200 converse.min.js:163
> > 
> >    1 no requests during idle cycle, sending blank request converse.min.js:163
> > 
> >    0 request id 42.0 posting converse.min.js:163
> > 
> >    0 request id 42.0 state changed to 1
> > 
> >     
> > 
> >    with id just keeping increasing.
> > 
> >     
> > 
> >    Also, the method attached to connection.xmlOutput keeps getting called
> >    with the following:
> > 
> >    <body rid="4245947958" xmlns="[2]http://jabber.org/protocol/httpbind"
> >    sid="8fcd472b"/>
> > 
> >     
> > 
> >    Where rid keeps getting incremented.
> > 
> >     
> > 
> >    As a result, the UI become unresponsive and Chrome freezes and eventually
> >    crashes.
> > 
> >     
> > 
> >    Is there a simpler way to achieving automatic login with the current
> >    Converse implementation or will I have to modify the source code to get it
> >    working?
> > 
> >     
> > 
> >    Thanks a bunch!
> > 
> >    Andrei
> > 
> >     
> > 
> >     
> > 
> >     
> > 
> > References
> > 
> >    Visible links
> >    1. http://​/​/​jabber.org/​protocol/​httpbind
> >    2. http://jabber.org/protocol/httpbind

Re: [conversejs] Converse login automation

From:
Andrei Charepka
Date:
2014-06-16 @ 13:40
Hi JC,

I have not spoken to my colleague yet, but I know that he received your 
email. Thanks for your reply and I hope you are recovered from your flu.

Andrei

-----Original Message-----
From: conversejs@librelist.com [mailto:conversejs@librelist.com] On Behalf
Of JC Brand
Sent: Thursday, June 12, 2014 6:34 PM
To: conversejs@librelist.com
Subject: Re: [conversejs] Converse login automation

Hi Andrei

Thanks for the heads up. I'm sick with the flu this week so didn't get much done.

I've however received the email and replied to it.

Regards
JC

On Fri, Jun 06, 2014 at 05:44:58PM +0000, Andrei Charepka wrote:
> Hi JC,
> 
> My colleague has written you a letter explaining the details of the 
project where ConverseJS is used and he is going to send it to you shortly
through the contact form on your web site. Please let me know if you have 
any other concerns.
> 
> Sincerely,
> Andrei 
> 
> -----Original Message-----
> From: conversejs@librelist.com [mailto:conversejs@librelist.com] On 
Behalf Of JC Brand
> Sent: Friday, June 06, 2014 4:02 AM
> To: conversejs@librelist.com
> Subject: Re: [conversejs] Converse login automation
> 
> Hi Andrei
> 
> Is the chrome extension code open-source?
> 
> Regards
> JC
> 
> On Wed, Jun 04, 2014 at 02:10:31PM +0000, Andrei Charepka wrote:
> >    In case anybody encountered the same issue – the trick appears to be
> >    calling pause() on the connection created using Strophe directly before
> >    trying to initialize Converse with pre-bind.
> > 
> >     
> > 
> >    Andrei
> > 
> >     
> > 
> >    From: conversejs@librelist.com [mailto:conversejs@librelist.com] On Behalf
> >    Of Andrei Charepka
> >    Sent: Tuesday, June 03, 2014 5:50 PM
> >    To: conversejs@librelist.com
> >    Subject: [conversejs] Converse login automation
> > 
> >     
> > 
> >    Hello,
> > 
> >     
> > 
> >    I was successfully able to include Converse client into a Chrome
> >    extension. Now I am trying to add automatic login since I can store user
> >    credentials in the browser and don’t need them to re-entered.
> > 
> >     
> > 
> >    Here’s what I tried: I opened a connection to the OpenFire server by using
> >    Strophe directly. After the connection was established, I used the sid and
> >    rid values to initialize Converse using pre-bind. This was also successful
> >    – connection was established and I got  the roster with my contacts.
> > 
> >     
> > 
> >    My problem is the following – when I try the above approach, after the
> >    Converse is connected, it keeps sending requests to the server. With debug
> >    enabled, I keep seeing this in the logs:
> > 
> >     
> > 
> >    0 request id 41.1 state changed to 2 converse.min.js:163
> > 
> >    0 request id 41.1 state changed to 3 converse.min.js:163
> > 
> >    0 request id 41.1 state changed to 4 converse.min.js:163
> > 
> >    0 removing request converse.min.js:163
> > 
> >    0 _throttledRequestHandler called with 0 requests converse.min.js:163
> > 
> >    0 request id 41 should now be removed converse.min.js:163
> > 
> >    0 request id 41.1 got 200 converse.min.js:163
> > 
> >    <body xmlns=​"[1]http:​/​/​jabber.org/​protocol/​httpbind">​</body>​
> >    converse.min.js:163
> > 
> >    0 request id 40.1 state changed to 2 converse.min.js:163
> > 
> >    0 request id 40.1 state changed to 3 converse.min.js:163
> > 
> >    0 request id 40.1 state changed to 4 converse.min.js:163
> > 
> >    0 removing request converse.min.js:163
> > 
> >    0 _throttledRequestHandler called with 0 requests converse.min.js:163
> > 
> >    0 request id 40 should now be removed converse.min.js:163
> > 
> >    0 request id 40.1 got 200 converse.min.js:163
> > 
> >    1 no requests during idle cycle, sending blank request converse.min.js:163
> > 
> >    0 request id 42.0 posting converse.min.js:163
> > 
> >    0 request id 42.0 state changed to 1
> > 
> >     
> > 
> >    with id just keeping increasing.
> > 
> >     
> > 
> >    Also, the method attached to connection.xmlOutput keeps getting called
> >    with the following:
> > 
> >    <body rid="4245947958" xmlns="[2]http://jabber.org/protocol/httpbind"
> >    sid="8fcd472b"/>
> > 
> >     
> > 
> >    Where rid keeps getting incremented.
> > 
> >     
> > 
> >    As a result, the UI become unresponsive and Chrome freezes and eventually
> >    crashes.
> > 
> >     
> > 
> >    Is there a simpler way to achieving automatic login with the current
> >    Converse implementation or will I have to modify the source code to get it
> >    working?
> > 
> >     
> > 
> >    Thanks a bunch!
> > 
> >    Andrei
> > 
> >     
> > 
> >     
> > 
> >     
> > 
> > References
> > 
> >    Visible links
> >    1. http://​/​/​jabber.org/​protocol/​httpbind
> >    2. http://jabber.org/protocol/httpbind