librelist archives

« back to archive

Error on Prebind

Error on Prebind

From:
Marvin
Date:
2015-09-03 @ 09:48
Hello,

Thanks for your wonderful web chat client.

by the way my setup is ejabberd the latest.

I have an issue using your conversejs with prebind.

I have made a prebind url and it's returning the jid,sid and ird. (
http://dev.megamitch.com/prebind/)

*However using his configurations;*


            bosh_service_url: 'http://dev.megamitch.com:5280/http-bind',

            keepalive: true,
            jid: 'jermaine@megamitch.com',
            authentication: 'prebind',
            prebind_url: 'http://localhost/prebind/',
            debug: true,
            allow_logout: false


I got an error on browser debug console.

" Could not restore session for jid: jermaine@megamitch.com Error message:
_restore: no restoreable session. "  converse.website.min.js:16229


I'm hoping you could shed some light on your extra time.

Regards,
*Marvin*

Re: [conversejs] Error on Prebind

From:
Jc Brand
Date:
2015-09-03 @ 09:59
On Thu, Sep 03, 2015 at 05:48:49PM +0800, Marvin wrote:
>    Thanks for your wonderful web chat client.

Thanks.

>    by the way my setup is ejabberd the latest.
>    I have an issue using your conversejs with prebind.
>    I have made a prebind url and it's returning the jid,sid and ird.
>    ([1]http://dev.megamitch.com/prebind/)
>    However using his configurations;
>                bosh_service_url:
>    '[2]http://dev.megamitch.com:5280/http-bind',                   
>                keepalive: true,
>                jid: '[3]jermaine@megamitch.com',            
>                authentication: 'prebind',
>                prebind_url: '[4]http://localhost/prebind/',
>                debug: true,            
>                allow_logout: false
>    I got an error on browser debug console.
>    " Could not restore session for jid: [5]jermaine@megamitch.com Error
>    message: _restore: no restoreable session. "
>     converse.website.min.js:16229
>    I'm hoping you could shed some light on your extra time.

Most likely what's happening is that http://localhost/prebind is called and
then an error such as 404 or 500 occurs.

The prebind_url must point to a URL which will return a valid RID, JID and SID
when called.

See here:
https://conversejs.org/docs/html/configuration.html#prebind-url

You can put a breakpoint here to debug:

https://github.com/jcbrand/converse.js/blob/c9b0d4c86a9ada565e9acc0d9b431b1ffd389631/converse.js#L5972

Looking at that code, I see that the JID is not sent to the prebind_url. I
think that code could probably be changed to make a POST instead of a GET and
to automatically send the JID, but currently it just makes a GET.

JC

Re: [conversejs] Error on Prebind

From:
Marvin
Date:
2015-09-04 @ 02:04
Hey JC,

I was able to get it fixed thanks for pointing out. It was indeed the
prebind url. I can see it locally and on the remote prebind url site but it
was not properly set as JSON object, hence it was just echoed.

So I made it a proper JSON object by setting the header application type on
the prebind URL.

Once again thanks for replying and helping me out. I will continue with my
integration.

Regards.
*Marvin*



On Thu, Sep 3, 2015 at 5:59 PM, JC Brand <lists@opkode.com> wrote:

> On Thu, Sep 03, 2015 at 05:48:49PM +0800, Marvin wrote:
> >    Thanks for your wonderful web chat client.
>
> Thanks.
>
> >    by the way my setup is ejabberd the latest.
> >    I have an issue using your conversejs with prebind.
> >    I have made a prebind url and it's returning the jid,sid and ird.
> >    ([1]http://dev.megamitch.com/prebind/)
> >    However using his configurations;
> >                bosh_service_url:
> >    '[2]http://dev.megamitch.com:5280/http-bind',
> >                keepalive: true,
> >                jid: '[3]jermaine@megamitch.com',
> >                authentication: 'prebind',
> >                prebind_url: '[4]http://localhost/prebind/',
> >                debug: true,
> >                allow_logout: false
> >    I got an error on browser debug console.
> >    " Could not restore session for jid: [5]jermaine@megamitch.com Error
> >    message: _restore: no restoreable session. "
> >     converse.website.min.js:16229
> >    I'm hoping you could shed some light on your extra time.
>
> Most likely what's happening is that http://localhost/prebind is called
> and
> then an error such as 404 or 500 occurs.
>
> The prebind_url must point to a URL which will return a valid RID, JID and
> SID
> when called.
>
> See here:
> https://conversejs.org/docs/html/configuration.html#prebind-url
>
> You can put a breakpoint here to debug:
>
> 
https://github.com/jcbrand/converse.js/blob/c9b0d4c86a9ada565e9acc0d9b431b1ffd389631/converse.js#L5972
>
> Looking at that code, I see that the JID is not sent to the prebind_url. I
> think that code could probably be changed to make a POST instead of a GET
> and
> to automatically send the JID, but currently it just makes a GET.
>
> JC
>

Re: [conversejs] Error on Prebind

From:
Jc Brand
Date:
2015-09-05 @ 07:55
You're welcome Marvin, I'm glad you sorted out out. :) 

On 04 September 2015 4:04:21 vm. GMT+02:00, Marvin <nefarios@gmail.com> wrote:
>Hey JC,
>
>I was able to get it fixed thanks for pointing out. It was indeed the
>prebind url. I can see it locally and on the remote prebind url site
>but it
>was not properly set as JSON object, hence it was just echoed.
>
>So I made it a proper JSON object by setting the header application
>type on
>the prebind URL.
>
>Once again thanks for replying and helping me out. I will continue with
>my
>integration.
>
>Regards.
>*Marvin*
>
>
>
>On Thu, Sep 3, 2015 at 5:59 PM, JC Brand <lists@opkode.com> wrote:
>
>> On Thu, Sep 03, 2015 at 05:48:49PM +0800, Marvin wrote:
>> >    Thanks for your wonderful web chat client.
>>
>> Thanks.
>>
>> >    by the way my setup is ejabberd the latest.
>> >    I have an issue using your conversejs with prebind.
>> >    I have made a prebind url and it's returning the jid,sid and
>ird.
>> >    ([1]http://dev.megamitch.com/prebind/)
>> >    However using his configurations;
>> >                bosh_service_url:
>> >    '[2]http://dev.megamitch.com:5280/http-bind',
>> >                keepalive: true,
>> >                jid: '[3]jermaine@megamitch.com',
>> >                authentication: 'prebind',
>> >                prebind_url: '[4]http://localhost/prebind/',
>> >                debug: true,
>> >                allow_logout: false
>> >    I got an error on browser debug console.
>> >    " Could not restore session for jid: [5]jermaine@megamitch.com
>Error
>> >    message: _restore: no restoreable session. "
>> >     converse.website.min.js:16229
>> >    I'm hoping you could shed some light on your extra time.
>>
>> Most likely what's happening is that http://localhost/prebind is
>called
>> and
>> then an error such as 404 or 500 occurs.
>>
>> The prebind_url must point to a URL which will return a valid RID,
>JID and
>> SID
>> when called.
>>
>> See here:
>> https://conversejs.org/docs/html/configuration.html#prebind-url
>>
>> You can put a breakpoint here to debug:
>>
>>

>https://github.com/jcbrand/converse.js/blob/c9b0d4c86a9ada565e9acc0d9b431b1ffd389631/converse.js#L5972
>>
>> Looking at that code, I see that the JID is not sent to the
>prebind_url. I
>> think that code could probably be changed to make a POST instead of a
>GET
>> and
>> to automatically send the JID, but currently it just makes a GET.
>>
>> JC
>>

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