Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
sadeghrz #1
Member since Apr 2017 · 6 posts
Group memberships: Members
Show profile · Link to this post
Subject: Object reference not set to an instance of an object
hi
i can connect to my openfire xmpp server from android smack api but for connecting to it in .net c# i chose agsXMPP but i got " Object reference not set to an instance of an object " error in onError method. the code info is this:


  1. xmpp.ConnectServer = "192.168.1.2";
  2. xmpp.Server = "hairedresser.chatserver";
  3. xmpp.Port = 5222;
  4. xmpp.AutoResolveConnectServer = false;
  5. xmpp.Username = "admin";
  6. xmpp.Password = "the pass";
  7. xmpp.Resource = "the resurse";
  8. xmpp.UseSSL = false;
  9. xmpp.Priority = 10;
  10. xmpp.SocketConnectionType = agsXMPP.net.SocketConnectionType.Direct;
  11. xmpp.UseStartTLS = true;
  12. xmpp.OnLogin += new ObjectHandler(xmpp_OnLogin);
  13. xmpp.OnReadXml += new XmlHandler(client_OnReadXml);
  14. xmpp.OnWriteXml += new XmlHandler(client_OnWriteXml);
  15. xmpp.OnError += new ErrorHandler(client_OnErr);
  16. xmpp.Open();


the xml send and recieve:


  1. "write: <stream:stream to='hairedresser.chatserver' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
  2.  
  3. read: <stream:stream xmlns:stream=\"http://etherx.jabber.org/streams\" version=\"1.0\" id=\"1hqrmju3aa\" xml:lang=\"en\" from=\"hairedresser.chatserver\" >
  4.  
  5. read: <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>EXTERNAL</mechanism><mechanism>DIGEST-MD5</mechanism><mechanism>SCRAM-SHA-1</mechanism><mechanism>PLAIN</mechanism><mechanism>CRAM-MD5</mechanism></mechanisms><compression xmlns=\"http://jabber.org/features/compress\"><method>zlib</method></compression><register xmlns=\"http://jabber.org/features/iq-register\" /></stream:features>
  6.  
  7.  
  8. write: <starttls xmlns=\"urn:ietf:params:xml:ns:xmpp-tls\" />
  9.  
  10.  
  11. read: <proceed xmlns=\"urn:ietf:params:xml:ns:xmpp-tls\" />
  12.  
  13.  
  14. write: <stream:stream to='hairedresser.chatserver' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
  15.  
  16.  
  17. read: <stream:stream xmlns:stream=\"http://etherx.jabber.org/streams\" version=\"1.0\" id=\"1hqrmju3aa\" xml:lang=\"en\" from=\"hairedresser.chatserver\" >
  18.  
  19.  
  20. read: <stream:features xmlns:stream=\"http://etherx.jabber.org/streams\"><mechanisms xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\"><mechanism>EXTERNAL</mechanism><mechanism>DIGEST-MD5</mechanism><mechanism>SCRAM-SHA-1</mechanism><mechanism>PLAIN</mechanism><mechanism>CRAM-MD5</mechanism></mechanisms><compression xmlns=\"http://jabber.org/features/compress\"><method>zlib</method></compression><register xmlns=\"http://jabber.org/features/iq-register\" /></stream:features>
  21.  
  22.  
  23. write: <auth xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\" mechanism=\"DIGEST-MD5\" />
  24.  
  25.  
  26. read: <challenge xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\">cmVhbG09ImhhaXJlZHJlc3Nlci5jaGF0c2VydmVyIixub25jZT0ieGtPSUhvU0dxWEx6dUVyK3dQUzd2QlFyYUZSSXRMaTdxK3c0T1NCYiIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=</challenge>"

stackTrace:

at agsXMPP.sasl.DigestMD5.Step2.SupportsAuth(String qop)\r\n   at agsXMPP.sasl.DigestMD5.Step2..ctor(Step1 step1, String username, String password, String server)\r\n   at agsXMPP.sasl.DigestMD5.DigestMD5Mechanism.Parse(Node e)\r\n   at agsXMPP.sasl.SaslHandler.OnStreamElement(Object sender, Node e)\r\n   at agsXMPP.Xml.StreamHandler.Invoke(Object sender, Node e)\r\n   at agsXMPP.Xml.StreamParser.DoRaiseOnStreamElement(Element el)
This post was edited 2 times, last on 2017-04-11, 16:35 by Alex.
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
With the latest Openfire update there were changes which cause this exception.
We pushed updates to the SVN repo which should fix this.
Please pull the latest codes, compile it and try again.

Alex
Avatar
sadeghrz #3
Member since Apr 2017 · 6 posts
Group memberships: Members
Show profile · Link to this post
Quote by Alex:
With the latest Openfire update there were changes which cause this exception.
We pushed updates to the SVN repo which should fix this.
Please pull the latest codes, compile it and try again.

Alex

pull last version via SVN copy to agsXMPP project directory build the project copy agsXMPP.dll file to my project references and i still have this error Alex!
This post was edited on 2017-04-09, 20:55 by sadeghrz.
Avatar
Alex #4
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
That's not possible, the function in your stacktrace above ( SupportsAuth) doesn't exist in the latest trunk code.
Where have you pulled the code from?

Alex
Avatar
sadeghrz #5
Member since Apr 2017 · 6 posts
Group memberships: Members
Show profile · Link to this post
Quote by Alex:
That's not possible, the function in your stacktrace above ( SupportsAuth) doesn't exist in the latest trunk code.
Where have you pulled the code from?

Alex

thanks for your answer alex.

all i do is this:

1- download the code from download page with that link:
http://www.ag-software.net/download/xmpp/agsxmpp_installer…

2-pull the code via TortoiseSVN app with that link:
svn://svn.ag-software.de/agsxmpp

3-copy and replace pulled code into folder that i installed app in step 1.

4-run the agsxmpp2008.sln from the folder. build the agsXMPP project from solution and add the agsXMPP.dll file from debug folder of the project to my project.

and i have same error.
i do somthing wrong?

thank you.
Avatar
Alex #6
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Are you sure it's the same error?
Can you post the complete stacktrace?
Avatar
sadeghrz #7
Member since Apr 2017 · 6 posts
Group memberships: Members
Show profile · Link to this post
Fixed!

it's the wrong .dll file.

thank you Alex!
Avatar
wenzl #8
Member since Feb 2019 · 1 post
Group memberships: Members
Show profile · Link to this post
Is there any way to download the latest SVN code?
The repository doesn't seem to be available at the moment.
Avatar
Alex #9
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
The SVN server got retired.
The repo was imported to GutHub, you can get the code here:
https://github.com/agnauck/agsXMPP

But be aware that the code is there only for reference. The project is retired and was replaced with MatriX and MatriX vNext.
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