Bleeding Edge - Source Code → 'uninitialized value' warnings in IMAP/Client.pm

'uninitialized value' warnings in IMAP/Client.pm

I'm using the IMAP module with Gmail these days and sometimes I see the 'uninitialized value' warnings occur in IMAP/Client.pm.

Here's the console log:

Use of uninitialized value in numeric ne (!=) at /Users/sent/work/popfile/svn-b0_22_2/engine_sqlite3/Services/IMAP/Client.pm line 723.

And here's the popfile log (used current svn version to store the warnings in the log file):

2008/7/25 11:36:31 52074: imap: 501: Looking for new messages in folder hatena.
2008/7/25 11:36:31 52074: IMAP-Client: 333: << A00138 NOOP[0d][0a]
2008/7/25 11:36:31 52074: IMAP-Client: 658: Read slurp data A00138 OK Success[0d][0a]
2008/7/25 11:36:31 52074: IMAP-Client: 426: >> A00138 OK Success[0d][0a]
2008/7/25 11:36:31 52074: IMAP-Client: 333: << A00139 STATUS "hatena" (UIDNEXT UIDVALIDITY)[0d][0a]
2008/7/25 11:36:31 52074: IMAP-Client: 658: Read slurp data * BYE System Error[0d][0a]A00139 NO System error (Failure)[0d][0a]
2008/7/25 11:36:31 52074: IMAP-Client: 438: >> * BYE System Error[0d][0a]
2008/7/25 11:36:31 52074: IMAP-Client: 450: Got unsolicited BYE response from server while reading response for STATUS "hatena" (UIDNEXT UIDVALIDITY).
2008/7/25 11:36:31 52074: IMAP-Client: 422: >> A00139 NO System error (Failure)[0d][0a]
2008/7/25 11:36:31 52074: IMAP-Client: 267: Could not get UIDVALIDITY STATUS for folder hatena.
2008/7/25 11:36:31 52074: IMAP-Client: 267: Could not get UIDNEXT STATUS for folder hatena.
2008/7/25 11:36:31 52074: Perl warning: Use of uninitialized value in numeric ne (!=) at /Users/sent/work/popfile/svn-b0_22_2/engine_sqlite3/Services/IMAP/Client.pm line 723.[0a]
2008/7/25 11:36:31 52074: IMAP-Client: 724: The folder hatena has a new UIDVALIDTIY value! Skipping new messages (if any).
2008/7/25 11:36:31 52074: imap: 501: Looking for new messages in folder INBOX.
2008/7/25 11:36:31 52074: IMAP-Client: 333: << A00140 NOOP[0d][0a]
2008/7/25 11:36:31 52074: IMAP-Client: 984: The connection to the IMAP server was lost while trying to get a response to command 'NOOP'
2008/7/25 11:36:31 52074: imap: 461: Trying to disconnect all connections.
2008/7/25 11:36:31 52074: IMAP-Client: 286: IMAP-Client is exiting
2008/7/25 11:36:31 52074: imap: 272: The connection to the IMAP server was lost while trying to get a response to command 'NOOP' (/Users/sent/work/popfile/svn-b0_22_2/engine_sqlite3/Services/IMAP/Client.pm (489))

The 'hatena' folder (label in Gmail) has only one message and does not have any new messages.

If there's no problem, POPFile outputs like the following log:

2008/7/25 11:39:33 52074: imap: 501: Looking for new messages in folder hatena.
2008/7/25 11:39:34 52074: IMAP-Client: 333: << A00005 NOOP[0d][0a]
2008/7/25 11:39:34 52074: IMAP-Client: 658: Read slurp data A00005 OK Success[0d][0a]
2008/7/25 11:39:34 52074: IMAP-Client: 426: >> A00005 OK Success[0d][0a]
2008/7/25 11:39:34 52074: IMAP-Client: 333: << A00006 STATUS "hatena" (UIDNEXT UIDVALIDITY)[0d][0a]
2008/7/25 11:39:34 52074: IMAP-Client: 658: Read slurp data * STATUS "hatena" (UIDNEXT 2 UIDVALIDITY 27)[0d][0a]A00006 OK Success[0d][0a]
2008/7/25 11:39:34 52074: IMAP-Client: 438: >> * STATUS "hatena" (UIDNEXT 2 UIDVALIDITY 27)[0d][0a]
2008/7/25 11:39:34 52074: IMAP-Client: 426: >> A00006 OK Success[0d][0a]

Today, this warnings occurred three times (09:04, 10:44 and 11:36).

Any ideas?

Naoki

  • Message #295

    Hi Naoki.

    Seems that Google is having hickups for you:

     << A00139 STATUS "hatena" (UIDNEXT UIDVALIDITY)
     >> A00139 NO System error (Failure)
    

    So Google will not respond with a UIDNEXT and a UIDVALIDITY value and this will cause the uninitialized value warnings.

    Guess there's not much we can do about Google's system errors. Note that Google doesn't say "BAD" and complain about the IMAP modules syntax or command.

    Manni

    • Message #296

      Hi Manni

      Guess there's not much we can do about Google's system errors. Note that Google doesn't say "BAD" and complain about the IMAP modules syntax or command.

      Thanks for your response.
      I see that this is a Gmail's problem.
      I was only anxious because I saw the same warning three times a day.

      Naoki