powered by Jive Software

Google Talk client using XIFF

Hi.

I have developed a simple chat client using XIFF, it is working fine with few Jabber servers like Jabber.org and igniterealtime.org but my basic goal is to connect to Google talk so I can import all my contact list of gmail account in the Roaster and my client can work like Google talk. But after trying alot I am still unable to connect to talk.google.com.

Initial messages are passed and socket connection is created with talk.google.com but then connection breaks.

Outgoing–> <?xml version=“1.0”?><stream:stream to=“talk.google.com” xmlns=“jabber:client” xmlns:stream=“http://etherx.jabber.org/streams”>

Response–> <stream:stream from=“talk.google.com” id=“F95F2086DA47900B” xmlns:stream=“http://etherx.jabber.org/streams” xmlns=“jabber:client” />

Outgoing—> <iq type=“get” id=“log_user_1”><query xmlns=“jabber:iq:auth”><username>mr.google</username></query& gt;</iq>

Error #2070: Security sandbox violation: caller cannot access Stage owned by .

There are few issues I have. I will be really glad if someone can help out.

I know there is a problem of crossdomain.xml but still client should work fine in development enviornment so leave crossdomain issue for a while.

  1. I came to know from some source that XIFF does not support TLS and SASL, while google talk needs these securities. If yes then is there any way to handle it.

  2. There are two different servers for Google Talk. one is talk.google.com which is the Host and then gmail server. I tried using this sample application http://velloff.com/XIFF_AS3/XIFF_AS3_GUI.html but this interface only support one server which surely is not enough to connect to google talk.

  3. Is google talk have implemented some XMPP extensions so one have to follow them to connect ot it.

  4. Did anybody have used XIFF to connect to Google talk.

Thanks in Advance

Regards,

I have plans to do a similar client, but the time for that is not yet, as it will b e a part of Tsuka 1.3, where as Tsuka now is not even 1.0 yet.

Perhaps http://crypto.hurlant.com/ could help with the TLS encryption.

I have the same problem, and I’m using XIFF3 with my own XMPP conference server (Openfire), not Google Talk. Everything works as expected, but after several minutes the connection drops with the error:

Error: Error #2070: Security sandbox violation: caller cannot access Stage owned by .

I don’t think crossdomain.xml is involved at this point since two-way communication is established fine. The error comes from the bSocketReceivedData method in XMPPSocketConnection.as (~ line 181), where parseXML is called. I put a try catch block around that code and trapped the raw xml. It’s sending </stream:stream>, which closes the socket. I think the problem has to do with unterminated XML nodes but have really just started investigating.

-mdb

hi integrin,

have you figured anything out about this problem? we are having the same issue.

thanks!

Hi Cameran,

The solution depends on exactly which problem you’re having, and if you’re not able to establish Google Talk connectivity at all, there are probably several contributing factors.

Are you connecting and then seeing disconnects or not connecting at all? Are you printing any debug info just before (or after) the disconnect event?

I was able to fix the disconnects by sending ‘keep-alive’ presence packets at least once per minute, so I think there must be some default timeout (intentional or unintentional) on the socket implementation itself, but your problem may have to do with improper handling of null or unterminated XML packets.

-mdb

hi,

well it appears we just solved our error. we kept getting an error similar to this:

Error: Error #2070: Security sandbox violation: caller cannot access Stage owned by .

at Error$/throwError()

at flash.xml::XMLDocument/parseXML()

in our custom XIFF/Flex3 application.

We read through the forum posts and found that it could be related to keepalive packets so we set the OpenFire server to disable idle. you can do this by adding the server property: xmpp.client.idle and setting it to -1

our connection has been stable for 2 hours now with no crashes. previously we would get a crash at about every 7-10 minutes.

hope this helps someone.

cameran

This is good to know, thanks for the info. Let me ask you, with idle turned off is there any need to send the keep alive aymore?

hello,

we no longer use keepalive packets now that idle is turned off.

we have extensively tested the connection and can report no errors since we changed the idle setting.

cameran

Great to hear!

A few months ago I made a simple chat client in Flash CS3 using XIFF. I then proceeded to try to connect to Google Talk, but found two limitations:

  • The flash player does not support TLS internally. It relies on the browser for that. It was unavailable using the XMLSocket.

  • Once the file was on a web server, it was IMPOSSIBLE TO CONNECT THE XMLSOCKET TO ANY OTHER HOST THAN THE HOST SERVING THE .SWF. It doesn’t matter if you have crossdomain files there. It works great in the development environment, but not once it’s hosted somewhere.

So unless you manage to get a chat client using an HTTP connection through the browser, you’re f*cked. I thought I’d share that to all of you having the same ambitions.

If somebody found a work-around let me know!!!

Martin

Xiff is not working under proxy.

I have created a simple web chat application based on xiff. It is working fine for live ip users or those who are not under any proxy server but those who are working under proxy server it is showing connection error.

I think The socket (as3.0) connection is not working under proxy !!!

Please help me