raykichi / jabber-net

Automatically exported from code.google.com/p/jabber-net
Other
0 stars 0 forks source link

Please post issues here. #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We will be monitoring this space for issues.

Original issue reported on code.google.com by hil...@gmail.com on 20 Nov 2007 at 12:37

GoogleCodeExporter commented 9 years ago
This occurs in the 2005-Example project when I attempt to register a new user 
on a 
server with invalid certificate (even though SSL is not required):

Last call:    jc.Register(new JID(jc.User, jc.Server, null));

Error:
System.Reflection.TargetInvocationException was unhandled
  Message="Exception has been thrown by the target of an invocation."
  Source="mscorlib"
  StackTrace:
       at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] 
arguments, SignatureStruct& sig, MethodAttributes methodAttributes, 
RuntimeTypeHandle typeOwner)
       at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] 
arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle 
typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags 
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean 
skipVisibilityChecks)
       at System.Delegate.DynamicInvokeImpl(Object[] args)
       at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry 
tme)
       at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at 
System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup
(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext 
executionContext, ContextCallback callback, Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, 
ContextCallback callback, Object state)
       at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
       at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.ContainerControl.WndProc(Message& m)
       at System.Windows.Forms.Form.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 
msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at 
System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNat
iveMe
thods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, 
Int32 
pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 
reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 
reason, ApplicationContext context)
       at System.Windows.Forms.Application.Run(Form mainForm)
       at ChatDemo3.Program.Main() in C:\Documents and Settings\Rory\My 
Documents\Visual Studio 2005\Projects\ChatDemo3\ChatDemo3\Program.cs:line 17
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence 
assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, 
ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()

Original comment by rory.gro...@gmail.com on 24 Jan 2008 at 1:58

GoogleCodeExporter commented 9 years ago
Forgot to post the inner-exception:

Message:
"Object reference not set to an instance of an object."

Stack:
"   at jabber.client.JabberClient.OnGetRegister(Object sender, IQ iq, Object 
data)
\r\n   at jabber.connection.IQTracker.OnIQ(Object sender, XmlElement elem)"

Original comment by rory.gro...@gmail.com on 24 Jan 2008 at 2:03

GoogleCodeExporter commented 9 years ago
jabber.client.JabberClient, line 608:

        private void OnGetRegister(object sender, IQ iq, object data)
        {

            if (iq == null)
            {
                FireOnError(new IQTimeoutException((JID) data));
                return;
            }

            if (iq.Type == IQType.error)
            {
                if (OnRegistered != null)
                {
                    if (InvokeRequired)
                        CheckedInvoke(OnRegistered, new object[] {this, iq});
                    else
                        OnRegistered(this, iq);
                }
            }
            else if (iq.Type == IQType.result)
            {
                JID jid = (JID)data;
                iq.Type = IQType.set;
                iq.From = null;
                iq.To = jid.Server;
                iq.ID = Element.NextID();
                Register r = iq.Query as Register;
                if (r == null)
                    throw new BadProtocolException(iq, "Expected a register 
response");

                jabber.protocol.x.Data xdata = r["x", URI.XDATA] as 
jabber.protocol.x.Data;
                jabber.protocol.x.Field f;
                if (data != null)
                {
*** 608:            f = xdata.GetField("username");
                    if (f != null)
                        f.Val = jid.User;
                    f = xdata.GetField("password");
                    if (f != null)
                        f.Val = this.Password;
                }

"xdata" is null.

Original comment by rory.gro...@gmail.com on 24 Jan 2008 at 2:20

GoogleCodeExporter commented 9 years ago
Please create a new issue, rather than commenting on this one.  Just checked in 
a fix.

Original comment by hil...@gmail.com on 24 Jan 2008 at 2:49

GoogleCodeExporter commented 9 years ago

Original comment by hil...@gmail.com on 24 Jan 2008 at 2:50

GoogleCodeExporter commented 9 years ago
Thanks, i'll post new issues from now on.

Client is brilliant. Pass my praise along to the team.

Original comment by rory.gro...@gmail.com on 24 Jan 2008 at 3:15

GoogleCodeExporter commented 9 years ago
Getting another null object error on line 652:

                xdata.Type = jabber.protocol.x.XDataType.result;

Original comment by rory.gro...@gmail.com on 24 Jan 2008 at 3:29

GoogleCodeExporter commented 9 years ago
Really.  Please just file a new issue.  Once you do, I'll look at this.

Original comment by hil...@gmail.com on 24 Jan 2008 at 5:34

GoogleCodeExporter commented 9 years ago

Original comment by hil...@gmail.com on 28 Jan 2008 at 8:20

GoogleCodeExporter commented 9 years ago
How a about implementing sometgin regarding XEP 0065 
(http://xmpp.org/extensions/xep-
0065.html).

Original comment by Gamitech@gmail.com on 22 Aug 2009 at 12:09

GoogleCodeExporter commented 9 years ago
I Try the following code in jabber-net for my chat application...

private void Form1_Load(object sender, EventArgs e)
        {
            jabberClient1.Connect();
              }

private void jabberClient1_OnMessage(object sender, 
jabber.protocol.client.Message 
msg)
        {
jabber.protocol.client.Message reply = new jabber.protocol.client.Message
(jabberClient1.Document);
            reply.Body = "Hello!";
            reply.To = msg.From;
            jabberClient1.Write(reply); 

        }
         }

I am getting  the following ERROR PLEASE HELP ME HOW TO SOLVE THIS PROBLEM...

Username must not be null for XEP-78 authentication

Original comment by saravana...@gmail.com on 15 Apr 2010 at 8:11

GoogleCodeExporter commented 9 years ago
saravanan28, make sure to supply a username/password to jabberClient1.

Original comment by hil...@gmail.com on 21 Apr 2010 at 4:35

GoogleCodeExporter commented 9 years ago
I'm going to close this issue, since people are continually confused by my 
directions NOT to add comments 
here, but to create new issues instead.

Original comment by hil...@gmail.com on 21 Apr 2010 at 4:36