2 Replies Latest reply: Oct 28, 2011 3:40 AM by 896541 RSS

    BAD Parse error connecting to iCloud

    896541
      Recently a lot of our users have been migrated from mobile me to icloud and we have started to encounter the error below

      I notice that default Thunderbird had the same problem however it has a way to make it use "old-style auth" which does work but I am unsure what old-style auth actually is

      It seems to be the AUTHENTICATE PLAIN command that is failing

      I have scoured the internet for clues but I'm at a dead end here so if anyone can suggest where to go next would be much appreciated


      2011-10-27 16:40:54,902 [INFO ][T2][111952][JavaMail]: DEBUG: getProvider() returning javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc]
      2011-10-27 16:40:54,902 [INFO ][T2][111952][JavaMail]:

      2011-10-27 16:40:54,902 [INFO ][T2][111952][JavaMail]:
      2011-10-27 16:40:54,902 [INFO ][T2][111952][JavaMail]: DEBUG: mail.imap.fetchsize: 1048576
      2011-10-27 16:40:54,902 [INFO ][T2][111952][JavaMail]:

      2011-10-27 16:40:54,902 [INFO ][T2][111952][JavaMail]:
      2011-10-27 16:40:54,902 [INFO ][T2][111952][JavaMail]: DEBUG: mail.imap.statuscachetimeout: 1000
      2011-10-27 16:40:54,902 [INFO ][T2][111952][JavaMail]:

      2011-10-27 16:40:54,902 [INFO ][T2][111952][JavaMail]:
      2011-10-27 16:40:54,903 [INFO ][T2][111952][JavaMail]: DEBUG: mail.imap.appendbuffersize: 102400
      2011-10-27 16:40:54,903 [INFO ][T2][111952][JavaMail]:

      2011-10-27 16:40:54,903 [INFO ][T2][111952][JavaMail]:
      2011-10-27 16:40:54,903 [INFO ][T2][111952][JavaMail]: DEBUG: mail.imap.minidletime: 10
      2011-10-27 16:40:54,903 [INFO ][T2][111952][JavaMail]:

      2011-10-27 16:40:54,903 [INFO ][T2][111952][JavaMail]:
      2011-10-27 16:40:54,904 [DEBUG][T2][111952][com.voxsurf.email.VxsStoreConnectionThread]: Connecting to mail store [imap.mail.me.com:993] with credentials hullo@me.com/***
      2011-10-27 16:40:54,904 [INFO ][T2][111952][JavaMail]: DEBUG: trying to connect to host "imap.mail.me.com", port 993, isSSL false
      2011-10-27 16:40:54,904 [INFO ][T2][111952][JavaMail]:

      2011-10-27 16:40:54,904 [INFO ][T2][111952][JavaMail]:
      2011-10-27 16:40:55,312 [INFO ][T2][111952][JavaMail]: * OK iSCREAM ready to rumble (r1F3601+:19103)

      2011-10-27 16:40:55,312 [INFO ][T2][111952][JavaMail]: A0 CAPABILITY

      2011-10-27 16:40:55,412 [INFO ][T2][111952][JavaMail]: * CAPABILITY st11p00mm-iscream001.mac.com r1F3601+ XAPPLEPUSHSERVICE IMAP4 IMAP4rev1 SASL-IR AUTH=ATOKEN AUTH=PLAIN

      2011-10-27 16:40:55,413 [INFO ][T2][111952][JavaMail]: A0 OK !!

      2011-10-27 16:40:55,413 [INFO ][T2][111952][JavaMail]: DEBUG IMAP: AUTH: ATOKEN
      2011-10-27 16:40:55,413 [INFO ][T2][111952][JavaMail]:

      2011-10-27 16:40:55,413 [INFO ][T2][111952][JavaMail]:
      2011-10-27 16:40:55,413 [INFO ][T2][111952][JavaMail]: DEBUG IMAP: AUTH: PLAIN
      2011-10-27 16:40:55,413 [INFO ][T2][111952][JavaMail]:

      2011-10-27 16:40:55,413 [INFO ][T2][111952][JavaMail]:
      2011-10-27 16:40:55,413 [INFO ][T2][111952][JavaMail]: DEBUG: protocolConnect login, host=imap.mail.me.com, user=hullo@me.com, password=<non-null>
      2011-10-27 16:40:55,413 [INFO ][T2][111952][JavaMail]:

      2011-10-27 16:40:55,413 [INFO ][T2][111952][JavaMail]:
      2011-10-27 16:40:55,413 [INFO ][T2][111952][JavaMail]: A1 AUTHENTICATE PLAIN

      2011-10-27 16:40:55,513 [INFO ][T2][111952][JavaMail]: A1 BAD Parse Error

      2011-10-27 16:40:55,513 [ERROR][T2][111952][com.voxsurf.email.VxsStoreConnectionThread]: Failed to connect to store 'com.voxsurf.email.VxsEmailImapAccountSession@3516b subscriberid: com.voxsurf.core.entities.persistence.jdbc.VxsUserIdLong@1b7c5: 111952 user:null acct: Other IMAP4 with specified port '993', connecting with default port
      javax.mail.MessagingException: A1 BAD Parse Error
           at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:663) ~[javax.mail-1.4.4.jar:1.4.4]
           at javax.mail.Service.connect(Service.java:295) ~[javax.mail-1.4.4.jar:1.4.4]
           at com.voxsurf.email.VxsStoreConnectionThread.tryToConnect(VxsStoreConnectionThread.java:265) [classes/:na]
           at com.voxsurf.email.VxsStoreConnectionThread.run(VxsStoreConnectionThread.java:140) [classes/:na]
           at com.voxsurf.core.VxsUserSession$3.run(VxsUserSession.java:404) [classes/:na]
           at com.voxsurf.util.thread.VxsThreadPoolRunnable.run(VxsThreadPoolRunnable.java:157) [classes/:na]
           at com.holub.asynch.Thread_pool$Pooled_thread.run(Thread_pool.java) [holub.jar:na]
      Caused by: com.sun.mail.iap.BadCommandException: A1 BAD Parse Error
           at com.sun.mail.iap.Protocol.handleResult(Protocol.java:346) ~[javax.mail-1.4.4.jar:1.4.4]
           at com.sun.mail.imap.protocol.IMAPProtocol.authplain(IMAPProtocol.java:545) ~[javax.mail-1.4.4.jar:1.4.4]
           at com.sun.mail.imap.IMAPStore.login(IMAPStore.java:716) ~[javax.mail-1.4.4.jar:1.4.4]
           at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:643) ~[javax.mail-1.4.4.jar:1.4.4]
           ... 6 common frames omitted
        • 1. Re: BAD Parse error connecting to iCloud
          Bill Shannon-Oracle
          It's a bug in the server. You're not the first one to notice it, but please report it to Apple anyway.
          The server says it supports PLAIN authentication but then when you try to use it it fails.
          The server also supports the SASL-IR extension, which allows the client to send additional
          information on the AUTHENTICATE command. The SASL-IR spec (RFC 4959) says:

          Note: support and use of the initial client response is optional for
          both clients and servers. Servers that implement this extension MUST
          support clients that omit the initial client response, and clients
          that implement this extension MUST NOT send an initial client
          response to servers that do not advertise the SASL-IR capability.

          Most likely the server is not following the above and instead treating it as required.
          Supporting SASL-IR for IMAP in JavaMail is on my list of things to do (SMTP already
          supports it). Maybe it's time to bump its priority. If you're willing to help test this when
          I have it ready, contact me at javamail_ww@oracle.com.

          But again, please do report this bug to Apple so they know it matters to
          a lot of people.
          • 2. Re: BAD Parse error connecting to iCloud
            896541
            Thanks for your response I will report it to Apple

            Managed to fix in my code by setting the property mail.imap.auth.plain.disable to true for the MobileMe accounts