sstrigler / JSJaC

JavaScript Jabber Client Library
Other
295 stars 86 forks source link

Connection problem with multiple tabs #45

Closed pokal4u closed 11 years ago

pokal4u commented 11 years ago

Hi, Login with same username with multiple tabs and different browsers not working, getting below error

first tab:

onetab

second tab:

twotab

my ejabbered settings:

maxconn

{host_config, "public.example.org", [{auth_method, anonymous}, {allow_multiple_connections, true}, {anonymous_protocol,both }]}.

we need multiple tabs login with same username

Please help me

Thanks

rraptorr commented 11 years ago

If you are basing your code on the simpleclient.html, then this is caused by using the same XMPP resource. XMPP supports multiple sessions for the same user, but it requires each session to have different resource. By default, simpleclient.html uses resource "jsjac_simpleclient". Simply generate a new random one for each session. Obviously you must also properly configure your server (in particular number of allowed concurrent sessions per user).

pokal4u commented 11 years ago

Hi, Thanks for reply,

I tried that way but getting same output.

oArgs.authtype = 'nonsasl'; is commented in my code error is:

notauth

and after conneting create any cookies? if,how to get that cookies? can i use connection cookie in another tab?

Pleasa help

Thanks

rraptorr commented 11 years ago

'not-authorized' clearly means that you have provided an invalid password.

rraptorr commented 11 years ago

Also, your configuration doesn't make sense:

pokal4u commented 11 years ago

HI, Thanks for reply.

I will try that way.

and how many registered users can accept ejabbered? how can i delete users from ejabbered?

Please help me

Thanks

rraptorr commented 11 years ago
  1. As many as you like or, to be more precise, as many as your hardware can handle.
  2. Using ejabberdctl unregister

Please note that this has nothing to do with JSJaC (and you opened an issue for JSJaC).

pokal4u commented 11 years ago

HI,

Thanks for reply

working good now in mozilla,chrome but

problem with ie 8,9 getting error by loading

'JSJaCConsoleLogger' is undefined

in ie6,7 getting error by loading

[object Error]

Plesae help me

Thanks

rraptorr commented 11 years ago

You cannot use crossdomain requests in older versions of IE. This means you cannot use http://quackquack.in:5280/http-bind/ you must use http://quackquack.in/http-bind/ (that's what the redirect is for) and all your HTML/JS code must also be loaded from quackquack.in.

pokal4u commented 11 years ago

Hi,

Thanks for reply.

It's working in ie8,9, but ie6,7 getting error [object Error]

Please help

Thanks

rraptorr commented 11 years ago

JSJaC works fine under IE6/7. So most probably you have some errors in your own JS code. You must debug your code and fix any problems. One common problem under IE6/7 is extra comma at the end of JS objects (JavaScript standard does not allow this, most browsers handle it, but IE6/7 will just error if such comma is encountered).

pokal4u commented 11 years ago

HI,

I got below errors in ie

  1. Unspecified error.
  2. Could not complete the operation due to error c00c023e.

What above error means?

Thanks

rraptorr commented 11 years ago

I have completely no idea:) Probably some IE6 magic, installing a debugger might help, but as far as I remember this is really inconvenient in IE6. You can also try to run your JS code through jslint/jshint. That said, I really don't believe this has anything to do with JSJaC.

pokal4u commented 11 years ago

Hi, very very hanks for reply for every message In Firefox connecting time taken 30-40 seconds some time hang the page Thanks

rraptorr commented 11 years ago

Well, what can I say? You must debug your code :)

pokal4u commented 11 years ago

Hi,

working fine now.

I lost the conversation on page refresh. how can i get previous message conversations? how can i clear the message conversations?

Please help

Thanks

rraptorr commented 11 years ago

You must implement it yourself on the server.

pokal4u commented 11 years ago

Hi,

In ejabbered server? How ? suggest me?

Thanks

rraptorr commented 11 years ago
rraptorr commented 11 years ago

I'd like to point out one more that, that those questions are completely unrelated to JSJaC. If you have solved your problem with connection then please close this issue. If you want to write a complex chat application, like it seems you do, then it will require a lot of work both on the client and server side. If you have server questions, please direct them to ejabberd forums.

pokal4u commented 11 years ago

Hi,

Ok, one last question (may be this question related to jsjac)

if send a message from 'pokal4u' to 'srinu' 'srinu' is not loggedin then all messages are coming back to 'pokal4u'. check this

conver

any solution?

Thanks Pokal4u

rraptorr commented 11 years ago

That is because XMPP server is responding with the error, stating that the other user is offline. Errors in XMPP include a copy of the original message. simpleclient.html does not handle errors properly so it displays the message.

simpleclient.html is only a very, very simple example (as the name suggests), it is not suitable for being used as a chat application out of the box. JSJaC is an XMPP library that provides XMPP connectivity. You must write your own chat application, based on your needs, using JSJaC. simpleclient.html is just an example on how to use JSJaC, the rest of the work must be done by you.

In this particular case you must add error handling, so that the error messages are not displayed.

pokal4u commented 11 years ago

HI, Ok Thanks Pokal4u