thunderbird/thunderbird-android

Unparseable dates should be handled more gracefully

Open

#8,714 opened on 2025年1月3日

GitHub で見る
 (4 comments) (0 reactions) (0 assignees)Kotlin (13,479 stars) (2,734 forks)batch import
good first issuestatus: answeredtype: bug

説明

Checklist

  • I have used the search function to see if someone else has already submitted the same bug report.
  • I will describe the problem with as much detail as possible.

App

K-9 Mail

App version

8.2

Where did you get the app from?

Google Play

Android version

14

Device model

AGM_PAD_P2

Steps to reproduce

Attempt to retrieve a message with an unparseable date.

Expected behavior

Ideally, the message will be retrieved and displayed with some indication of the problem. At a minimum, the message should be ignored.

Actual behavior

An exception is thrown and none of the retrieved messages are displayed.

Logs

01-03 10:59:35.108 14049 14074 E ImapSync: synchronizeMailbox
01-03 10:59:35.108 14049 14074 E ImapSync: com.fsck.k9.mail.MessagingException: Unable to parse IMAP datetime 'Tue, 31 Dec 2024 23:00:02 +9900' 
01-03 10:59:35.108 14049 14074 E ImapSync:      at com.fsck.k9.mail.store.imap.ImapList.getDate(ImapList.java:86)
01-03 10:59:35.108 14049 14074 E ImapSync:      at com.fsck.k9.mail.store.imap.ImapList.getKeyedDate(ImapList.java:76)
01-03 10:59:35.108 14049 14074 E ImapSync:      at com.fsck.k9.mail.store.imap.RealImapFolder.handleFetchResponse(RealImapFolder.kt:760)
01-03 10:59:35.108 14049 14074 E ImapSync:      at com.fsck.k9.mail.store.imap.RealImapFolder.fetch(RealImapFolder.kt:623)
01-03 10:59:35.108 14049 14074 E ImapSync:      at com.fsck.k9.backend.imap.ImapSync.fetchUnsyncedMessages(ImapSync.kt:461)
01-03 10:59:35.108 14049 14074 E ImapSync:      at com.fsck.k9.backend.imap.ImapSync.downloadMessages(ImapSync.kt:331)
01-03 10:59:35.108 14049 14074 E ImapSync:      at com.fsck.k9.backend.imap.ImapSync.synchronizeMailboxSynchronous(ImapSync.kt:203)
01-03 10:59:35.108 14049 14074 E ImapSync:      at com.fsck.k9.backend.imap.ImapSync.sync(ImapSync.kt:34)
01-03 10:59:35.108 14049 14074 E ImapSync:      at com.fsck.k9.backend.imap.ImapBackend.sync(ImapBackend.kt:56)
01-03 10:59:35.108 14049 14074 E ImapSync:      at com.fsck.k9.controller.MessagingController.syncFolder(MessagingController.java:638)
01-03 10:59:35.108 14049 14074 E ImapSync:      at com.fsck.k9.controller.MessagingController.synchronizeMailboxSynchronous(MessagingController.java:578)
01-03 10:59:35.108 14049 14074 E ImapSync:      at com.fsck.k9.controller.MessagingController.loadMoreMessagesSynchronous(MessagingController.java:542)
01-03 10:59:35.108 14049 14074 E ImapSync:      at com.fsck.k9.controller.MessagingController.lambda$loadMoreMessages$4(MessagingController.java:526)
01-03 10:59:35.108 14049 14074 E ImapSync:      at com.fsck.k9.controller.MessagingController.$r8$lambda$R4JompHX5lAPJKWcyY6ODgWeMTs(MessagingController.java:0)
01-03 10:59:35.108 14049 14074 E ImapSync:      at com.fsck.k9.controller.MessagingController$$ExternalSyntheticLambda21.run(R8$$SyntheticClass:0)
01-03 10:59:35.108 14049 14074 E ImapSync:      at com.fsck.k9.controller.MessagingController.runInBackground(MessagingController.java:221)
01-03 10:59:35.108 14049 14074 E ImapSync:      at com.fsck.k9.controller.MessagingController.-$$Nest$mrunInBackground(MessagingController.java:0)
01-03 10:59:35.108 14049 14074 E ImapSync:      at com.fsck.k9.controller.MessagingController$1.run(MessagingController.java:162)
01-03 10:59:35.108 14049 14074 E ImapSync:      at java.lang.Thread.run(Thread.java:1012)
01-03 10:59:35.108 14049 14074 E ImapSync: Caused by: java.text.ParseException: Unparseable date: "Tue, 31 Dec 2024 23:00:02 +9900"
01-03 10:59:35.108 14049 14074 E ImapSync:      at java.text.DateFormat.parse(DateFormat.java:400)
01-03 10:59:35.108 14049 14074 E ImapSync:      at com.fsck.k9.mail.store.imap.ImapList.parseDate(ImapList.java:157)
01-03 10:59:35.108 14049 14074 E ImapSync:      at com.fsck.k9.mail.store.imap.ImapList.getDate(ImapList.java:84)
01-03 10:59:35.108 14049 14074 E ImapSync:      ... 18 more
01-03 10:59:35.117 14049 14074 E ImapSync: Failed synchronizing folder xxx@example.com:INBOX @ Fri Jan 03 10:59:35 PST 2025

コントリビューターガイド

Unparseable dates should be handled more gracefully · thunderbird/thunderbird-android#8714 | Good First Issue