Gnus development mailing list
 help / color / mirror / Atom feed
* Failed to open IMAP server
@ 2014-10-30  4:02 TSUCHIYA Masatoshi
  2014-10-30  5:21 ` Katsumi Yamaoka
  2014-11-17 14:22 ` TSUCHIYA Masatoshi
  0 siblings, 2 replies; 5+ messages in thread
From: TSUCHIYA Masatoshi @ 2014-10-30  4:02 UTC (permalink / raw)
  To: ding

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Failed to open IMAP server
  2014-10-30  4:02 Failed to open IMAP server TSUCHIYA Masatoshi
@ 2014-10-30  5:21 ` Katsumi Yamaoka
  2014-10-30  5:36   ` Katsumi Yamaoka
  2014-10-30  5:59   ` TSUCHIYA Masatoshi
  2014-11-17 14:22 ` TSUCHIYA Masatoshi
  1 sibling, 2 replies; 5+ messages in thread
From: Katsumi Yamaoka @ 2014-10-30  5:21 UTC (permalink / raw)
  To: ding

On Thu, 30 Oct 2014 13:02:37 +0900, TSUCHIYA Masatoshi wrote:
> 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.

Have you edebugged open-protocol-stream (proto-stream.el)?
nnimap uses it instead, and it calls open-network-stream without
`parameters' on some condition.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Failed to open IMAP server
  2014-10-30  5:21 ` Katsumi Yamaoka
@ 2014-10-30  5:36   ` Katsumi Yamaoka
  2014-10-30  5:59   ` TSUCHIYA Masatoshi
  1 sibling, 0 replies; 5+ messages in thread
From: Katsumi Yamaoka @ 2014-10-30  5:36 UTC (permalink / raw)
  To: ding

On Thu, 30 Oct 2014 14:21:34 +0900, Katsumi Yamaoka wrote:
> 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, ...



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Failed to open IMAP server
  2014-10-30  5:21 ` Katsumi Yamaoka
  2014-10-30  5:36   ` Katsumi Yamaoka
@ 2014-10-30  5:59   ` TSUCHIYA Masatoshi
  1 sibling, 0 replies; 5+ messages in thread
From: TSUCHIYA Masatoshi @ 2014-10-30  5:59 UTC (permalink / raw)
  To: ding

[-- Attachment #1: Type: text/plain, Size: 1357 bytes --]

>> On Thu, 30 Oct 2014 14:21:34 +0900
>> yamaoka@jpl.org (Katsumi Yamaoka) said as follows:

>> 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.

>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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-diff, Size: 439 bytes --]

--- a/lisp/nnimap.el
+++ b/lisp/nnimap.el
@@ -443,7 +443,7 @@ textual parts.")
 	    (setf (nnimap-greeting nnimap-object) greeting)
 	    (setf (nnimap-capabilities nnimap-object)
 		  (mapcar #'upcase
-			  (split-string capabilities)))
+			  (and capabilities (split-string capabilities))))
 	    (unless (gnus-string-match-p "[*.] PREAUTH" greeting)
 	      (if (not (setq credentials
 			     (if (eq nnimap-authenticator 'anonymous)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Failed to open IMAP server
  2014-10-30  4:02 Failed to open IMAP server TSUCHIYA Masatoshi
  2014-10-30  5:21 ` Katsumi Yamaoka
@ 2014-11-17 14:22 ` TSUCHIYA Masatoshi
  1 sibling, 0 replies; 5+ messages in thread
From: TSUCHIYA Masatoshi @ 2014-11-17 14:22 UTC (permalink / raw)
  To: ding

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.

>> On Thu, 30 Oct 2014 13:02:37 +0900
>> tsuchiya@namazu.org (TSUCHIYA Masatoshi) said as follows:

>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



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-11-17 14:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-30  4:02 Failed to open IMAP server TSUCHIYA Masatoshi
2014-10-30  5:21 ` Katsumi Yamaoka
2014-10-30  5:36   ` Katsumi Yamaoka
2014-10-30  5:59   ` TSUCHIYA Masatoshi
2014-11-17 14:22 ` TSUCHIYA Masatoshi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).