Bug 72526 - can't log into ANY IRC server
Summary: can't log into ANY IRC server
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Applications
Component: IRC Plugin (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR major
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-13 06:59 UTC by jstuart
Modified: 2004-02-05 21:14 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jstuart 2004-01-13 06:59:14 UTC
Version:           unknown (using KDE 3.1.94 (CVS >= 20031206), Gentoo)
Compiler:          gcc version 3.3.1 20030927 (Gentoo Linux 3.3.1-r5, propolice)
OS:          Linux (i686) release 2.6.1-gentoo

I am unable to log into ANY IRC server at all using Kopete's IRC plugin.  CVS updated as of 9:00 PM EST 01/12/2004.  Note: I AM able to login to the IRC server using other IRC clients.  Below is the debug output that I get:

kopete (irc): Trying to connect to server irc.slashnet.org:6667
kopete (irc): Sock status: 0
kopete (irc): [void KIRC::connectToServer(const QString&, const QString&, short unsigned int)] startAsyncConnect() success!. Status: 200
MNG error 1029: Chunk out of sequence; chunk TERM; subcode 0:0
kopete (irc): [void KIRC::slotConnected()] Connected
kopete (irc - raw protocol): >> USER FurBall 0 * :Kopete User
kopete (irc - raw protocol): >> NICK FurBall
kopete (irc - raw protocol): idx: 29
kopete (irc - raw protocol): << Using codec UTF-8 << :radon.slashnet.org NOTICE * :*** Looking up your hostname...
kopete (irc - raw protocol): idx: 29
kopete (irc - raw protocol): << Using codec UTF-8 << :radon.slashnet.org NOTICE * :*** Checking ident...
kopete (irc - raw protocol): idx: 29
kopete (irc - raw protocol): << Using codec UTF-8 << :radon.slashnet.org NOTICE * :*** Checking for open SOCKS server...
kopete (irc - raw protocol): idx: 29
kopete (irc - raw protocol): << Using codec UTF-8 << :radon.slashnet.org NOTICE * :*** Found your hostname
kopete (irc): [void KIRC::slotConnectionClosed()] Connection Closed - local status: 0 sock status: 400
kopete (irc): [void KIRC::slotConnectionClosed()] Connection Closed - local status: 0 sock status: 400
kopete (connectionstatus): [void ConnectionStatusPlugin::slotCheckStatus()]
Comment 1 Matt Rogers 2004-01-13 07:47:40 UTC
setting the severity is good enough. :)
Comment 2 Sami Nieminen 2004-01-13 10:29:48 UTC
I have experienced the same problem for a week or two. When trying to connect to freenode, I get something like: "Bad user info" and disconnect.
Comment 3 Jason Keirstead 2004-01-13 13:27:13 UTC
Could you provide some more info?

- I assume you're using CVS. If not, can you try the latest CVS version
- Are you running an identd?
Comment 4 Jason Keirstead 2004-01-13 13:28:12 UTC
Also, if you are running an identd, what is your unix user name.. i not, what is the user name you have in the Kopete dialog?

( I am going to try to reproduce the disconnect )
Comment 5 Jason Keirstead 2004-01-13 13:32:17 UTC
Wait, after looking at the debug again I see that for some reason you aren't sending *any* data at all to the IRC server.

In addition to what I asked you above, what version of QT are you using?

If your unix user name / nick / ident is using some extended chars there may yet be another encoding problem, since it seems that codec->toUnicode(raw); is returning the empty string for you.
Comment 6 Sami Nieminen 2004-01-13 17:08:00 UTC
-no identd
-QT 3.2 (from qt-copy)
-kdelibs, kdenetwork CVS HEAD from few days ago
-username in irc account config dialog: Sami Nieminen
-nickname in irc account config dialog: samppa (alternate samppa-)

BTW, why is it not possible to edit the nickname on config dialog, only alternate nickname and username can be modified.
Comment 7 Jason Keirstead 2004-01-13 17:42:07 UTC
Subject: Re: [Kopete-devel]  can't log into ANY IRC server

On January 13, 2004 12:08 pm, Sami Nieminen wrote:
> -username in irc account config dialog: Sami Nieminen

For fun, can you try a username without a space in it?

> -nickname in irc account config dialog: samppa (alternate samppa-)
>
> BTW, why is it not possible to edit the nickname on config dialog, only
> alternate nickname and username can be modified.

Its a restriction of the current Kopete version, because it's used in the 
account ID so is immutable. You need to remove the account and 
recreate it to change the nickname or server info.

This will be changed in the next release.

Comment 8 Sami Nieminen 2004-01-13 18:11:22 UTC
I changed username to SamiNieminen, i.e. removed the space and now I can connect to freenode and UnderNet without problems. Thanks!
Comment 9 jstuart 2004-01-13 18:32:17 UTC
no identd, latest CVS, username: furball, QT: 3.2.3, kdelibs updated from CVS on 01/11/04.  No accented characters in username/nickname.
Comment 10 jstuart 2004-01-13 18:43:52 UTC
actually, now that I think about it, it's not true about identd.  I use fakeidentd which always returns jstuart as I recall.
Comment 11 Jason Keirstead 2004-01-13 18:44:20 UTC
Subject: Re: [Kopete-devel]  can't log into ANY IRC server

On January 13, 2004 1:32 pm, jstuart@computer-city.net wrote:
> 18:32 ------- no identd, latest CVS, username: furball, QT: 3.2.3, kdelibs
> updated from CVS on 01/11/04.  No accented characters in username/nickname.

Ok, do you have spaces in your username? That seems to be the issue.

I think username might be being mis-understood as "Name". Username is supposed 
to be like your UNIX user name. It is what is used for your IRC host if you 
don't have an identd server.

Although, spaces should still be valid here I *think*. I will have to check up 
on this spec. If spaces are valid, then theres something wrong with escaping. 
If spaces are not valid, I'll have to add a check in the account config.

Comment 12 jstuart 2004-01-13 19:59:52 UTC
No spaces.  
Comment 13 Jason Keirstead 2004-01-14 00:33:00 UTC
Indeed, you are not allowed to have spaces here. I added a validator for this field in CVS.

However I still don't know what is causing jstuart's problem.
Comment 14 Sami Nieminen 2004-01-14 08:38:04 UTC
Jason, yes, I misunderstood the Username field and thought that it was the field where you put your real name (when doing /whois with irssi, it seems to call that field ircname though). Anyway, validator for this field is good and should solve the problem I had.
Comment 15 Matt Rogers 2004-01-16 03:03:09 UTC
At work, I usually get disconnected on the first attempt because it has to look up my hostname and complains that my forward and reverse DNS don't match. However, mIRC automatically reconnects for me, and then all is fine. Perhaps this might be the same type of thing?
Comment 16 Jason Keirstead 2004-01-16 03:11:00 UTC
That's not what it looks like from the protocol debug. There is no message being returned *at all*, the server is just kicking him off.

Comment 17 jstuart 2004-01-16 23:44:44 UTC
matt, I can try as many times as I want, and I still get kicked off.  

Jason: here's the raw logs from konversation as I sign onto irc.kde.org.

[17:42:51] NICK jstuart 
[17:42:51] USER jstuart 8 * :jstuart 
[17:42:51] NOTICE AUTH :*** Looking up your hostname... 
[17:42:51] NOTICE AUTH :*** Checking ident 
[17:42:56] NOTICE AUTH :*** Found your hostname 
[17:43:26] NOTICE AUTH :*** No identd (auth) response 
[17:43:26] :leguin.freenode.net 001 jstuart :Welcome to the freenode IRC Network jstuart 

And if you look at the debug output above, you'll notice that A) you send the USER command first and then NICK, and then B) the count is 0 not 8!
Comment 18 jstuart 2004-01-16 23:46:14 UTC
Oh, FYI< this still doesn't work.  Updated to KDE CVS as of midnight EST this morning.  Did a complete clean rebuild, and did a build with builddir != srcdir.
Comment 19 Jason Keirstead 2004-01-17 00:05:50 UTC
Well, the number sent there is irrelavent as far as the IRC protocol goes, its just a placeholder.

The RFC says that the order of USER and NICK is irrelavent, but I can try switching it if you want to try that. I will port a patch here ASAP (but can't tonight).

The thing is, I can connect to irc.kde.org  perfectly fine! And I have no identd either.
Comment 20 jstuart 2004-01-17 04:15:39 UTC
hmm.. i'll go shut down fakeidentd and see what happens... if you want to point me to the file where user/nick is sent I can test it. :)
Comment 21 jstuart 2004-01-17 04:59:56 UTC
AH HA!! Ok.. I FINALLY found the problem.. (now to find it in the code LOL).  Since it takes me a good minute to connect to either irc.slashnet.org or irc.kde.org I THINK that kopete is timing out!  NOW... when I connect to irc.gamesnet.net... since I can connect in under 30 seconds or so... I get connected via kopete's IRC plugin PERFECTLY!
Comment 22 jstuart 2004-01-17 05:32:13 UTC
ARGH!!!!!!!!!!!!

I found the bug:

71522-done@bugs.kde.org
----------------------------
revision 1.95
date: 2004/01/06 00:33:50;  author: brunes;  state: Exp;  lines: +15 -0
15 second timeout for ISON replies, detects when the network goes down.


This in irc/libkirc/kirc.cpp.  Specifically line 363.  Once I set the timeout value to 60 seconds I was able to connect in fine!
Comment 23 Jason Keirstead 2004-01-18 18:01:32 UTC
Ah ha!

Well, at least the mystery is gone.

Why does it take you so long to connect? I thought 15 seconds was a reasonable timeout.

I could make the value adjustable ( read it from KConfig), but I could not add a GUI to adjust it right now.

Hrmmmm.

What do you guys think I should do?
Comment 24 jstuart 2004-01-18 23:20:58 UTC
Umm, I don't know WHY it takes me so long.. it COULD well be my firewall blocking packets that both irc.kde.org and irc.slashnet.net send to check for things like open proxies, etc.  My suggestion would be to use the KDE defaults for socket timeouts.  It makes sense to use that. :)
Comment 25 Martijn Klingens 2004-01-19 10:42:17 UTC
Subject: Re: [Kopete-devel]  can't log into ANY IRC server

On Sunday 18 January 2004 18:01, Jason Keirstead wrote:
> Why does it take you so long to connect? I thought 15 seconds was a
> reasonable timeout.

On a loaded line (modem, little bandwidth, ...) it's a bit little.

A minute is generally considered a good compromise between trying hard to 
maintain an existing link and not waiting forever. It's what MSN uses for 
example. We could make it a Kopete-wide config setting, it's not IRC 
specific.

Comment 26 jstuart 2004-01-19 10:51:08 UTC
I think instead, we should use the socket default timeouts.  IE Internet & Network | Preferences.  It's already there and makes sense to use. 
Comment 27 Jason Keirstead 2004-01-19 13:20:09 UTC
I would like to use these values, but I cannot figure out how to retrieve them.

Does anyone know how to access the socket timeout values?
Comment 28 jsvrp.gw 2004-01-22 01:40:09 UTC
I'm using KDE 3.2 RC1 with Kopete and I have no problems connection to IRC and I'm always on freenode.

JFYI,

Cheers,

Jeroen	
Comment 29 Jason Keirstead 2004-01-23 13:28:24 UTC
Subject: Re: [Kopete-devel]  can't log into ANY IRC server

JFYI, I have this patched here locally to use the KDE socket timeouts. So the bug
will soon be fixed.


Comment 30 Jason Keirstead 2004-01-29 04:24:15 UTC
Subject: kdenetwork/kopete/protocols/irc

CVS commit by brunes: 

A few cleanups

Use KDE socket ReadTimeout value for the timeout check.

CCMAIL: 72526-done@bugs.kde.org


  M +2 -8      ircaccount.cpp   1.62
  M +29 -8     irccontactmanager.cpp   1.15
  M +7 -8      irccontactmanager.h   1.8
  M +2 -14     libkirc/kirc.cpp   1.102
  M +1 -3      libkirc/kirc.h   1.59
  M +19 -0     libkirc/kircctcpqueries.h   1.2
  M +19 -1     libkirc/kircnumericreplies.h   1.2



Comment 31 jstuart 2004-02-05 21:14:38 UTC
Jason, please email me this patch seperately so that I can send it on to the gentoo folks so that kopete IRC is actually useful since this patch was NEVER back ported to KDE 3.2.