Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
pooya #1
Member since Nov 2005 · 4 posts · Location: Iran
Group memberships: Members
Show profile · Link to this post
Subject: Problem in auth with Google Talk
Hi,
I am developed a new Client for Google Talk.
I set Server and ConnectServer to "gmail.com" and "talk.google.com" I use TLS and 5222 port. I open my connection and comunicate with server successful but when Client Send "Auth" to server after a while my connection will close, without any failed or success message from server ! I set my con.Username like "pooya.m@gmail.com" and "pooya.m" but in both I have problem !
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
hi,

could use please post  your code to make sure its correct. And also the xml debug log.
Make sure you use the latest version, or the SVN version.

Alex
Avatar
pooya #3
Member since Nov 2005 · 4 posts · Location: Iran
Group memberships: Members
Show profile · Link to this post
I use this code to connect and auth with google talk
xmpp = new agsXMPP.XmppClientConnection();
xmpp.OnReadXml += new agsXMPP.XmlHandler(XmppCon_OnReadXml);
xmpp.OnWriteXml    += new agsXMPP.XmlHandler(XmppCon_OnWriteXml);
xmpp.OnClose += new agsXMPP.ObjectHandler(XmppCon_OnClose);

xmpp.Port = 5222;
xmpp.UseSSL = false;
xmpp.ConnectServer = "talk.google.com";
xmpp.Server = "gmail.com";
xmpp.Username = "mygmailid"; // with and without @gmail.com tested
xmpp.Password = "mygmailpass";
try
{
    xmpp.Open();
}
catch(Exception e)
{
    MessageBox.Show(e.Message);
}
and my Comunication log is :

SEND: <stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>
RECV: <stream:stream xmlns:stream=&quot;http://etherx.jabber.org/streams&quot; version=&quot;1.0&quot; from=&quot;gmail.com&quot; id=&quot;B015150FCF5AE5A8&quot; >
RECV: <stream:features xmlns:stream=&quot;http://etherx.jabber.org/streams&quot;><starttls xmlns=&quot;urn:ietf:params:xml:ns:xmpp-tls&quot; /><mechanisms xmlns=&quot;urn:ietf:params:xml:ns:xmpp-sasl&quot;><mechanism>X-GOOGLE-TOKEN</mechanism></mechanisms></stream:features>
SEND: <starttls xmlns=&quot;urn:ietf:params:xml:ns:xmpp-tls&quot; />
RECV: <proceed xmlns=&quot;urn:ietf:params:xml:ns:xmpp-tls&quot; />
SEND: <stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>
RECV: <stream:stream xmlns:stream=&quot;http://etherx.jabber.org/streams&quot; version=&quot;1.0&quot; from=&quot;gmail.com&quot; id=&quot;0B38CF0265864EE7&quot; >
RECV: <stream:features xmlns:stream=&quot;http://etherx.jabber.org/streams&quot;><mechanisms xmlns=&quot;urn:ietf:params:xml:ns:xmpp-sasl&quot;><mechanism>PLAIN</mechanism><mechanism>X-GOOGLE-TOKEN</mechanism></mechanisms></stream:features>
SEND: <auth xmlns=&quot;urn:ietf:params:xml:ns:xmpp-sasl&quot; mechanism=&quot;PLAIN&quot;>AHBvb3lhLm0AMXEydzNl</auth>


afte sending auth tags my close event handlerl fire !
I forgot to say that I use the agsXMPP libs that I downloaded from ag-software ! I compile agsXMPP_Desktop Project and use .dll files in my project as refrence !
Avatar
Alex #4
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hi pooya,

is it possible that your password contains some Non Ascii characters?
When yes, could you try to change your password to only ASCII and try it again. I made changes for this in the latest SVN code. But i have to take a closer look again.

Alex
Avatar
pooya #5
Member since Nov 2005 · 4 posts · Location: Iran
Group memberships: Members
Show profile · Link to this post
Hi Alix,

There are not any NON Ascii characters in my uid or pwd !
but I am behind an ISA Server Fire wall !

Can I comunicate with talk.google.com:5222 using telnet and send this xml manualy ?
Avatar
Alex #6
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
yes, this is possible

Alex
Avatar
Alex #7
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
could you please also try to fetch the socket log?
There is a xml log and a plain socket log. I think your xml log doesnt show the complete log.
Look in the MiniClient how to subscribe to the Socket events.

Alex
Avatar
pooya #8
Member since Nov 2005 · 4 posts · Location: Iran
Group memberships: Members
Show profile · Link to this post
Hi Alex,
I add two event handlers to my code :

xmpp.ClientSocket.OnReceive    += new agsXMPP.net.ClientSocket.OnSocketDataHandler(ClientSocket_OnReceive);
xmpp.ClientSocket.OnSend += new agsXMPP.net.ClientSocket.OnSocketDataHandler(ClientSocket_OnSend);

and results :

SEND: <stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>
RECV: <?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?><stream:stream from=&quot;gmail.com&quot; id=&quot;0E8C9D74772BDB0E&quot; version=&quot;1.0&quot; xmlns:stream=&quot;http://etherx.jabber.org/streams&quot; xmlns=&quot;jabber:client&quot;>
SEND: <starttls xmlns=&quot;urn:ietf:params:xml:ns:xmpp-tls&quot; />
RECV: <stream:features><starttls xmlns=&quot;urn:ietf:params:xml:ns:xmpp-tls&quot;/><mechanisms xmlns=&quot;urn:ietf:params:xml:ns:xmpp-sasl&quot;><mechanism>X-GOOGLE-TOKEN</mechanism></mechanisms></stream:features>
SEND: 
SEND: <stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>
RECV: <proceed xmlns=&quot;urn:ietf:params:xml:ns:xmpp-tls&quot;/>xml:ns:xmpp-tls&quot;/><mechanisms xmlns=&quot;urn:ietf:params:xml:ns:xmpp-sasl&quot;><mechanism>X-GOOGLE-TOKEN</mechanism></mechanisms></stream:features>
SEND: <auth xmlns=&quot;urn:ietf:params:xml:ns:xmpp-sasl&quot; mechanism=&quot;PLAIN&quot;>AHBvb3lhLm0AMXEydzNl</auth>
RECV: <?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?><stream:stream from=&quot;gmail.com&quot; id=&quot;8F5F1A58A3E751DA&quot; version=&quot;1.0&quot; xmlns:stream=&quot;http://etherx.jabber.org/streams&quot; xmlns=&quot;jabber:client&quot;><stream:features><mechanisms xmlns=&quot;urn:ietf:params:xml:ns:xmpp-sasl&quot;><mechanism>PLAIN</mechanism><mechanism>X-GOOGLE-TOKEN</mechanism></mechanisms></stream:features>
Avatar
Alex #9
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
it looks like your connection is dead after sending the auth packet. Normally the server must respond to this packet with either success or failure. But there is nothing in your logs.
I just downloaded the code of teh webpage and tested it with my google account. It works fine here for me.
Could you try to debug the library with your project and look if there is a incoming packet after the auth packet is sent?

Set a breakoint in ClientSocket.cs to the function

private void EndReceive(IAsyncResult ar)

Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS