Subject: NullReferenceException when connecting with X-FACEBOOK-PLATFORM
Hi,
im just testing the X-FACEBOOK-PLATFORM authentication in a Windows Forms application. Everything works fine when im connecting with username/password, but SASL fails on connection attempt with a NullReferenceException. Please find my debug.xml attached.
- Ive included the latest sources from SVN in my project.
- xmpp_login permission is granted by facebook.
- Valid AccessToken is provided (graph-api calls are working)
- My TestCode looks similar to this one: http://forum.ag-software.net/thread/1446-Connecting-to-Fac…
It looks like the parameter "AccessToken" in method BuildResponse is null, all of sudden. Apikey is still set.
im just testing the X-FACEBOOK-PLATFORM authentication in a Windows Forms application. Everything works fine when im connecting with username/password, but SASL fails on connection attempt with a NullReferenceException. Please find my debug.xml attached.
- Ive included the latest sources from SVN in my project.
- xmpp_login permission is granted by facebook.
- Valid AccessToken is provided (graph-api calls are working)
- My TestCode looks similar to this one: http://forum.ag-software.net/thread/1446-Connecting-to-Fac…
It looks like the parameter "AccessToken" in method BuildResponse is null, all of sudden. Apikey is still set.
- <stream:stream to='chat.facebook.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
- <stream:stream xmlns:stream="http://etherx.jabber.org/streams" version="1.0" id="1" xml:lang="en" from="chat.facebook.com" >
- <stream:features xmlns:stream="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" /><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>X-FACEBOOK-PLATFORM</mechanism><mechanism>PLAIN</mechanism></mechanisms></stream:features>
- <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
- <proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
- <stream:stream to='chat.facebook.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
- <stream:stream xmlns:stream="http://etherx.jabber.org/streams" version="1.0" id="1" xml:lang="en" from="chat.facebook.com" >
- <stream:features xmlns:stream="http://etherx.jabber.org/streams"><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>X-FACEBOOK-PLATFORM</mechanism><mechanism>PLAIN</mechanism></mechanisms></stream:features>
- <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="X-FACEBOOK-PLATFORM" />
- <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">dmVyc2lvbj0xJm1ldGhvZD1hdXRoLnhtcHBfbG9naW4mbm9uY2U9MDI5NjBDMzI5NDdFOTNDMzVCRjE1MUY1N0U1N0JFMTU=</challenge>
Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: stringToEscape
at System.Uri.EscapeDataString(String stringToEscape)
at agsXMPP.Sasl.Facebook.FacebookMechanism.BuildResponse(Dictionary`2 pairs) in c:\Users\Administrator\Downloads\agsxmpp-20e543b91df27aa5099e1f2ad4b62316bb274a42\agsxmpp-20e543b91df27aa5099e1f2ad4b62316bb274a42\agsxmpp\Sasl\Facebook\FacebookMechanism.cs:line 121
at agsXMPP.Sasl.Facebook.FacebookMechanism.Parse(Node e) in c:\Users\Administrator\Downloads\agsxmpp-20e543b91df27aa5099e1f2ad4b62316bb274a42\agsxmpp-20e543b91df27aa5099e1f2ad4b62316bb274a42\agsxmpp\Sasl\Facebook\FacebookMechanism.cs:line 56
at agsXMPP.Sasl.SaslHandler.OnStreamElement(Object sender, Node e) in c:\Users\Administrator\Downloads\agsxmpp-20e543b91df27aa5099e1f2ad4b62316bb274a42\agsxmpp-20e543b91df27aa5099e1f2ad4b62316bb274a42\agsxmpp\Sasl\SaslHandler.cs:line 173
at agsXMPP.Xml.StreamHandler.Invoke(Object sender, Node e)
at agsXMPP.Xml.StreamParser.DoRaiseOnStreamElement(Element el) in c:\Users\Administrator\Downloads\agsxmpp-20e543b91df27aa5099e1f2ad4b62316bb274a42\agsxmpp-20e543b91df27aa5099e1f2ad4b62316bb274a42\agsxmpp\Xml\StreamParser.cs:line 362
Parameter name: stringToEscape
at System.Uri.EscapeDataString(String stringToEscape)
at agsXMPP.Sasl.Facebook.FacebookMechanism.BuildResponse(Dictionary`2 pairs) in c:\Users\Administrator\Downloads\agsxmpp-20e543b91df27aa5099e1f2ad4b62316bb274a42\agsxmpp-20e543b91df27aa5099e1f2ad4b62316bb274a42\agsxmpp\Sasl\Facebook\FacebookMechanism.cs:line 121
at agsXMPP.Sasl.Facebook.FacebookMechanism.Parse(Node e) in c:\Users\Administrator\Downloads\agsxmpp-20e543b91df27aa5099e1f2ad4b62316bb274a42\agsxmpp-20e543b91df27aa5099e1f2ad4b62316bb274a42\agsxmpp\Sasl\Facebook\FacebookMechanism.cs:line 56
at agsXMPP.Sasl.SaslHandler.OnStreamElement(Object sender, Node e) in c:\Users\Administrator\Downloads\agsxmpp-20e543b91df27aa5099e1f2ad4b62316bb274a42\agsxmpp-20e543b91df27aa5099e1f2ad4b62316bb274a42\agsxmpp\Sasl\SaslHandler.cs:line 173
at agsXMPP.Xml.StreamHandler.Invoke(Object sender, Node e)
at agsXMPP.Xml.StreamParser.DoRaiseOnStreamElement(Element el) in c:\Users\Administrator\Downloads\agsxmpp-20e543b91df27aa5099e1f2ad4b62316bb274a42\agsxmpp-20e543b91df27aa5099e1f2ad4b62316bb274a42\agsxmpp\Xml\StreamParser.cs:line 362
This post was edited on 2013-10-24, 11:54 by Alex.