librelist archives

« back to archive

How to resolve "IMAP Connection Lost" Error ?

How to resolve "IMAP Connection Lost" Error ?

From:
Denis Kutlubaev
Date:
2012-10-02 @ 16:43
I am trying to retrieve CTCoreMessage, using CTCoreFolder this way: 

MailCoreEnableLogging();
self.coreMessage = [self.folder.coreFolder messageWithUID:self.messageUID];
MailCoreDisableLogging();

Here self.coreMessage is a CTCoreMessage object.
coreFolder is CTCoreFolder, it is not nil. 
self.messageUID here is not NULL. 

I get nil object. Last error is "IMAP Connection Lost". This happens, when
I try to refresh an email list. If I do not refresh it, everything works 
nicely. What might be the problem? I guess, my CTCoreAccount or 
CTCoreFolder object gets corrupt some way. 

I get this log, when I switch logging on using MailCoreEnableLogging();
>>>>>>> send >>>>>>

21 UID FETCH 171 (UID BODYSTRUCTURE ENVELOPE BODY.PEEK[HEADER.FIELDS 
(References)])
22 FETCH 1:* (UID FLAGS RFC822.SIZE)
23 UID FETCH 171 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
24 UID FETCH 170 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
25 UID FETCH 171 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
26 UID FETCH 170 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
27 UID FETCH 170 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
28 UID FETCH 168 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
29 UID FETCH 170 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
30 UID FETCH 168 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
31 UID FETCH 168 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
32 UID FETCH 167 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
33 UID FETCH 168 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
34 UID FETCH 167 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
35 UID FETCH 167 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
36 UID FETCH 169 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
37 UID FETCH 167 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
38 UID FETCH 169 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
39 UID FETCH 169 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
40 UID FETCH 164 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
41 UID FETCH 169 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
42 UID FETCH 164 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
43 UID FETCH 164 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
44 UID FETCH 163 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
45 UID FETCH 164 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
46 UID FETCH 163 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
47 UID FETCH 163 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
48 UID FETCH 162 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
49 UID FETCH 163 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
50 UID FETCH 162 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
51 UID FETCH 162 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
52 UID FETCH 159 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
53 UID FETCH 162 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
54 UID FETCH 159 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
55 UID FETCH 159 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
56 UID FETCH 159 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
57 FETCH 1:* (UID FLAGS RFC822.SIZE)
58 FETCH 1:* (UID FLAGS RFC822.SIZE)
59 UID FETCH 171 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
60 UID FETCH 171 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])



>>>>>>> end send >>>>>>






When it works I get this log: 

>>>>>>> send >>>>>>

5 UID FETCH 171 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])



>>>>>>> end send >>>>>>

<<<<<<< read <<<<<<

* 159 FETCH (UID 171 ENVELOPE ("Fri, 21 Sep 2012 15:44:17 +0200" "Re: 
[mailcore] CTCoreMessage rfc822" (("=?ISO-8859-1?Q?Olivier_Palli=E8re?=" 
NIL "olivier" "molowa.com")) ((NIL NIL "mailcore" "librelist.com")) ((NIL 
NIL "mailcore" "librelist.com")) ((NIL NIL "mailcore" "librelist.com")) 
NIL NIL "<3357E215-B317-4FBE-9854-A5B10F9D64BD@me.com>" 
"<C4CD0447-3F07-44C1-A01E-A16A3CAB70BA@molowa.com>") BODY[HEADER.FIELDS 
(References)] {373}
References: <E2787607-D6B7-49B7-9AFF-2B2E4F7F4AA3@molowa.com>
 <E2787607-D6B7-49B7-9AFF-2B2E4F7F4AA3@molowa.com>
 <61BDD593-2485-4A4F-BF1A-6C86CFBC8456@mronge.com>
 <A18CABCC-CB6A-4F26-94E1-1F71DD628975@molowa.com>
 <3301EA4C-BC7D-4714-9751-A896C2AB1BC1@molowa.com>
 <81AF7ADC-1457-472B-9AB4-7DABB7904BAB@molowa.com>
 <3357E215-B317-4FBE-9854-A5B10F9D64BD@me.com>

)
5 OK Success



<<<<<<< end read <<<<<<

>>>>>>> send >>>>>>

6 UID FETCH 171 (UID FLAGS)



>>>>>>> end send >>>>>>

<<<<<<< read <<<<<<

* 159 FETCH (UID 171 FLAGS (NotJunk $NotJunk \Seen))
6 OK Success



<<<<<<< end read <<<<<<

Re: [mailcore] How to resolve "IMAP Connection Lost" Error ?

From:
Matt Ronge
Date:
2012-10-08 @ 22:38
Hi Denis,

It maybe that you are losing the network connection and it can't recover. 
When the network connection goes down you have to disconnect and reconnect
both your CTCoreAccount and your CTCoreFolder.

Matt

On Oct 2, 2012, at 11:43 AM, Denis Kutlubaev <kutlubaev.denis@gmail.com> wrote:

> I am trying to retrieve CTCoreMessage, using CTCoreFolder this way: 
> 
> MailCoreEnableLogging();
> self.coreMessage = [self.folder.coreFolder messageWithUID:self.messageUID];
> MailCoreDisableLogging();
> 
> Here self.coreMessage is a CTCoreMessage object.
> coreFolder is CTCoreFolder, it is not nil. 
> self.messageUID here is not NULL. 
> 
> I get nil object. Last error is "IMAP Connection Lost". This happens, 
when I try to refresh an email list. If I do not refresh it, everything 
works nicely. What might be the problem? I guess, my CTCoreAccount or 
CTCoreFolder object gets corrupt some way. 
> 
> I get this log, when I switch logging on using MailCoreEnableLogging();
> >>>>>>> send >> >>>>
> 
> 21 UID FETCH 171 (UID BODYSTRUCTURE ENVELOPE BODY.PEEK[HEADER.FIELDS 
(References)])
> 22 FETCH 1:* (UID FLAGS RFC822.SIZE)
> 23 UID FETCH 171 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 24 UID FETCH 170 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 25 UID FETCH 171 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 26 UID FETCH 170 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 27 UID FETCH 170 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 28 UID FETCH 168 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 29 UID FETCH 170 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 30 UID FETCH 168 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 31 UID FETCH 168 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 32 UID FETCH 167 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 33 UID FETCH 168 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 34 UID FETCH 167 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 35 UID FETCH 167 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 36 UID FETCH 169 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 37 UID FETCH 167 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 38 UID FETCH 169 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 39 UID FETCH 169 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 40 UID FETCH 164 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 41 UID FETCH 169 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 42 UID FETCH 164 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 43 UID FETCH 164 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 44 UID FETCH 163 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 45 UID FETCH 164 (UID ENVELOPE BODY .PEEK[HEADER.FIELDS (References)])
> 46 UID FETCH 163 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 47 UID FETCH 163 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 48 UID FETCH 162 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 49 UID FETCH 163 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 50 UID FETCH 162 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 51 UID FETCH 162 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 52 UID FETCH 159 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 53 UID FETCH 162 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 54 UID FETCH 159 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 55 UID FETCH 159 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 56 UID FETCH 159 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 57 FETCH 1:* (UID FLAGS RFC822.SIZE)
> 58 FETCH 1:* (UID FLAGS RFC822.SIZE)
> 59 UID FETCH 171 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 60 UID FETCH 171 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 
> 
> 
> >>>>>>> end send >>>>>>
> 
> 
> 
> 
> 
> 
> When it works I get this log: 
> 
> >>>>>>> send >>>>>>
> 
> 5 UID FETCH 171 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
> 
> 
> 
> >>>>>>> end send >>>>>>
> 
> <<<<<<< read <<<<<<
> 
> * 159 FETCH (UID 171 ENVELOPE ("Fri, 21 Sep 2012 15:44:17 +0200" "Re: 
[mailcore] CTCoreMessage rfc822" (("=?ISO-8859-1?Q?Olivier_Palli=E8re?=" 
NIL "olivier" "molowa.com")) ((NIL NIL "mailcore" "librelist.com")) ((NIL 
NIL "mailcore" "librelist.com")) ((NIL NIL "mailcore" "librelist.com")) 
NIL NIL "<3357E215-B317-4FBE-9854-A5B10F9D64BD@me.com>" 
"<C4CD0447-3F07-44C1-A01E-A16A3CAB70BA@molowa.com>") BODY[HEADER.FIELDS 
(References)] {373}
> References: <E2787607-D6B7-49B7-9AFF-2B2E4F7F4AA3@molowa.com>
>  <E2787607-D6B7-49B7-9AFF-2B2E4F7F4AA3@molowa.com>
>  <61BDD593-2485-4A4F-BF1A-6C86CFBC8456@mronge.com>
> & nbsp;<A18CABCC-CB6A-4F26-94E1-1F71DD628975@molowa.com>
>  <3301EA4C-BC7D-4714-9751-A896C2AB1BC1@molowa.com>
>  <81AF7ADC-1457-472B-9AB4-7DABB7904BAB@molowa.com>
>  <3357E215-B317-4FBE-9854-A5B10F9D64BD@me.com>
> 
> )
> 5 OK Success
> 
> 
> 
> <<<<<<< end read <<<<<<
> 
> >>>>>>> send >>>>>>
> 
> 6 UID FETCH 171 (UID FLAGS)
> 
> 
> 
> >>>>>>> end send >>>>>>
> 
> <<<<<<< read <<<<& lt;<
> 
> * 159 FETCH (UID 171 FLAGS (NotJunk $NotJunk \Seen))
> 6 OK Success
> 
> 
> 
> <<<<<<< end read <<<<<<

Re: [mailcore] How to resolve "IMAP Connection Lost" Error ?

From:
Denis Kutlubaev
Date:
2012-10-08 @ 22:49
Hi Matt,

Thanks, I'll try. It is really useful information.

09.10.2012, в 2:38, Matt Ronge <mronge@mronge.com> написал(а):

> Hi Denis,
> 
> It maybe that you are losing the network connection and it can't 
recover. When the network connection goes down you have to disconnect and 
reconnect both your CTCoreAccount and your CTCoreFolder.
> 
> Matt
> 
> On Oct 2, 2012, at 11:43 AM, Denis Kutlubaev <kutlubaev.denis@gmail.com> wrote:
> 
>> I am trying to retrieve CTCoreMessage, using CTCoreFolder this way: 
>> 
>> MailCoreEnableLogging();
>> self.coreMessage = [self.folder.coreFolder messageWithUID:self.messageUID];
>> MailCoreDisableLogging();
>> 
>> Here self.coreMessage is a CTCoreMessage object.
>> coreFolder is CTCoreFolder, it is not nil. 
>> self.messageUID here is not NULL. 
>> 
>> I get nil object. Last error is "IMAP Connection Lost". This happens, 
when I try to refresh an email list. If I do not refresh it, everything 
works nicely. What might be the problem? I guess, my CTCoreAccount or 
CTCoreFolder object gets corrupt some way. 
>> 
>> I get this log, when I switch logging on using MailCoreEnableLogging();
>>>>>>>>> send >> >>>>
>> 
>> 21 UID FETCH 171 (UID BODYSTRUCTURE ENVELOPE BODY.PEEK[HEADER.FIELDS 
(References)])
>> 22 FETCH 1:* (UID FLAGS RFC822.SIZE)
>> 23 UID FETCH 171 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 24 UID FETCH 170 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 25 UID FETCH 171 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 26 UID FETCH 170 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 27 UID FETCH 170 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 28 UID FETCH 168 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 29 UID FETCH 170 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 30 UID FETCH 168 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 31 UID FETCH 168 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 32 UID FETCH 167 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 33 UID FETCH 168 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 34 UID FETCH 167 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 35 UID FETCH 167 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 36 UID FETCH 169 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 37 UID FETCH 167 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 38 UID FETCH 169 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 39 UID FETCH 169 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 40 UID FETCH 164 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 41 UID FETCH 169 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 42 UID FETCH 164 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 43 UID FETCH 164 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 44 UID FETCH 163 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 45 UID FETCH 164 (UID ENVELOPE BODY .PEEK[HEADER.FIELDS (References)])
>> 46 UID FETCH 163 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 47 UID FETCH 163 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 48 UID FETCH 162 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 49 UID FETCH 163 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 50 UID FETCH 162 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 51 UID FETCH 162 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 52 UID FETCH 159 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 53 UID FETCH 162 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 54 UID FETCH 159 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 55 UID FETCH 159 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 56 UID FETCH 159 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 57 FETCH 1:* (UID FLAGS RFC822.SIZE)
>> 58 FETCH 1:* (UID FLAGS RFC822.SIZE)
>> 59 UID FETCH 171 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 60 UID FETCH 171 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 
>> 
>> 
>>>>>>>>> end send >>>>>>
>> 
>> 
>> 
>> 
>> 
>> 
>> When it works I get this log: 
>> 
>>>>>>>>> send >>>>>>
>> 
>> 5 UID FETCH 171 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (References)])
>> 
>> 
>> 
>>>>>>>>> end send >>>>>>
>> 
>> <<<<<<< read <<<<<<
>> 
>> * 159 FETCH (UID 171 ENVELOPE ("Fri, 21 Sep 2012 15:44:17 +0200" "Re: 
[mailcore] CTCoreMessage rfc822" (("=?ISO-8859-1?Q?Olivier_Palli=E8re?=" 
NIL "olivier" "molowa.com")) ((NIL NIL "mailcore" "librelist.com")) ((NIL 
NIL "mailcore" "librelist.com")) ((NIL NIL "mailcore" "librelist.com")) 
NIL NIL "<3357E215-B317-4FBE-9854-A5B10F9D64BD@me.com>" 
"<C4CD0447-3F07-44C1-A01E-A16A3CAB70BA@molowa.com>") BODY[HEADER.FIELDS 
(References)] {373}
>> References: <E2787607-D6B7-49B7-9AFF-2B2E4F7F4AA3@molowa.com>
>> <E2787607-D6B7-49B7-9AFF-2B2E4F7F4AA3@molowa.com>
>> <61BDD593-2485-4A4F-BF1A-6C86CFBC8456@mronge.com>
>> & nbsp;<A18CABCC-CB6A-4F26-94E1-1F71DD628975@molowa.com>
>> <3301EA4C-BC7D-4714-9751-A896C2AB1BC1@molowa.com>
>> <81AF7ADC-1457-472B-9AB4-7DABB7904BAB@molowa.com>
>> <3357E215-B317-4FBE-9854-A5B10F9D64BD@me.com>
>> 
>> )
>> 5 OK Success
>> 
>> 
>> 
>> <<<<<<< end read <<<<<<
>> 
>>>>>>>>> send >>>>>>
>> 
>> 6 UID FETCH 171 (UID FLAGS)
>> 
>> 
>> 
>>>>>>>>> end send >>>>>>
>> 
>> <<<<<<< read <<<<& lt;<
>> 
>> * 159 FETCH (UID 171 FLAGS (NotJunk $NotJunk \Seen))
>> 6 OK Success
>> 
>> 
>> 
>> <<<<<<< end read <<<<<<
> 

С уважением и наилучшими пожеланиями, 
Кутлубаев Денис
CEO, Alwawee
E-mail: kutlubaev.denis@gmail.com
Skype: IL2Shturmovik
ICQ: 5075827
Twitter: wzbozon