sstrigler / JSJaC

JavaScript Jabber Client Library
Other
295 stars 86 forks source link

Cookie not found error #47

Closed pokal4u closed 11 years ago

pokal4u commented 11 years ago

Hi,

Some time getting below errors ? --> JSJaCCookieException {message: "Cookie not found", name: "CookieException"}

--> Script error. (here type='terminate' )--------> In firefox only

--> Condition: item-not-found (type="cancel")

Please help

Thanks

Srinivas

rraptorr commented 11 years ago

This is normal and expected. JSJaC can use cookies to store session state and resume session when the page is reloaded. When this cookie is gone you get such exception. Once again, you must write proper error handling and try to reconnect in such case.

It seems that you are still trying to put simpleclient.html on a production site. This will not work. JSJaC is a library, that allows XMPP connectivity. As such it does not provide a working application, only a library. simpleclient.html is only a very simplistic example on how to use it to write applications, you cannot use it as a production ready chat application, it will not work as it lacks many things (proper error handling in the first place). The purpose of JSJaC is to provide a library, to connect to XMPP server, and that's it. You must write your own chat application. Trying to put simpleclient.html on a production server will not get you anywhere soon.