Discussion:
Failed to open IMAP server
TSUCHIYA Masatoshi
2014-10-30 04:02:37 UTC
Permalink
Hi,

I face a quite mysterious trouble and am seeking advices.

My using softwares are:

emacs-version => "24.3.1"
gnus-version => "Ma Gnus v0.12"

I have just simplified my configuration into:

(setq gnus-select-method '(nnimap "imap.example.net"))

However, Gnus failed to open the IMAP server. Its error message is:

Unable to open server nnimap+imap.example.net due to: Wrong type
argument: listp, #<process *nnimap*>

I used edebug to investigate the cause of this trouble, and found that
open-network-stream() is called wihtout `parameters' argument.

In order to confirm my observation, I evaluated the following code and
tried re-connection.

(defadvice open-network-stream
(around check-parameters activate compile)
(unless parameters
(error "Unrecognizable error!!!"))
ad-do-it)

Gnus's error message changed into:

Unable to open server nnimap+imap.example.net due to: Unrecognizable
error!!!

I believe that this is an evidence of my observation.

However, nnimap-open-connection-1() calles open-network-stream() with
`parameters' argument, as you know.

I cannot understand my observation and cannot imagine its cause.
Any comments and suggestions?
--
TSUCHIYA Masatoshi
Katsumi Yamaoka
2014-10-30 05:21:34 UTC
Permalink
Post by TSUCHIYA Masatoshi
(setq gnus-select-method '(nnimap "imap.example.net"))
Unable to open server nnimap+imap.example.net due to: Wrong type
argument: listp, #<process *nnimap*>
I used edebug to investigate the cause of this trouble, and found that
open-network-stream() is called wihtout `parameters' argument.
Have you edebugged open-protocol-stream (proto-stream.el)?
nnimap uses it instead, and it calls open-network-stream without
`parameters' on some condition.
Katsumi Yamaoka
2014-10-30 05:36:05 UTC
Permalink
Post by Katsumi Yamaoka
Have you edebugged open-protocol-stream (proto-stream.el)?
nnimap uses it instead, and it calls open-network-stream without
`parameters' on some condition.
Please ignore it, sorry. network-stream.el overrides
open-protocol-stream to be an alias to open-network-stream.
But, er, if you load proto-stream.el or network-stream.el is
not loaded for some reason, ...
TSUCHIYA Masatoshi
2014-10-30 05:59:38 UTC
Permalink
Post by Katsumi Yamaoka
On Thu, 30 Oct 2014 14:21:34 +0900
Unable to open server nnimap+imap.example.net due to: Wrong type
argument: listp, #<process *nnimap*>
I used edebug to investigate the cause of this trouble, and found
that open-network-stream() is called wihtout `parameters' argument.
Have you edebugged open-protocol-stream (proto-stream.el)?
nnimap uses it instead, and it calls open-network-stream without
`parameters' on some condition.
In my environment, Emacs 24.3 on Debian GNU/Linux,
open-protocol-stream() is defined as follows:

(defalias 'open-protocol-stream 'open-network-stream)

in /usr/share/emacs/24.3/lisp/net/network-stream.el.
There is a conflict between two function definitions, maybe.

I explicitly load proto-stream.el distributed with Gnus, and tried
re-connection. After that, Gnus's error message changed into:

Warning: Unable to open server nnimap+imap.example.net due to: Wrong
type argument: stringp, nil

It is able to suppress this error by the attached patch because
`capabilities' is equal to nil, however, I cannot enter any IMAP group.
I think that the attached patch is not right solution and my trouble may
be caused by the other origin.
--
TSUCHIYA Masatoshi
TSUCHIYA Masatoshi
2014-11-17 14:22:12 UTC
Permalink
Hi,

I resolved the following problem, caused by my using additional program.
It defines an around advice of open-network-stream() to support SSH
tunneling, and unfortunately the advice discards the 5th argument of
open-network-stream(). I improved the advice to support the 5th
argument, and succeeded connection.
Post by TSUCHIYA Masatoshi
On Thu, 30 Oct 2014 13:02:37 +0900
I face a quite mysterious trouble and am seeking advices.
emacs-version => "24.3.1"
gnus-version => "Ma Gnus v0.12"
(setq gnus-select-method '(nnimap "imap.example.net"))
Unable to open server nnimap+imap.example.net due to: Wrong type
argument: listp, #<process *nnimap*>
I used edebug to investigate the cause of this trouble, and found that
open-network-stream() is called wihtout `parameters' argument.
In order to confirm my observation, I evaluated the following code and
tried re-connection.
(defadvice open-network-stream
(around check-parameters activate compile)
(unless parameters
(error "Unrecognizable error!!!"))
ad-do-it)
Unable to open server nnimap+imap.example.net due to: Unrecognizable
error!!!
I believe that this is an evidence of my observation.
However, nnimap-open-connection-1() calles open-network-stream() with
`parameters' argument, as you know.
I cannot understand my observation and cannot imagine its cause.
Any comments and suggestions?
--
TSUCHIYA Masatoshi
Loading...