Crash (`NSInvalidArgumentException: Calendar must be nil or Gregorian`) when setting a due date on non-Gregorian locale (`calendar=iso8601`)
まだ誰も着手していません。
評価
調査の方向性
RemindCore の RemindersStore の createReminder(_:target:) と updateReminder(id:) から始めます。ここではクラッシュログに setDueDateComponents が呼ばれていることが示されています。期限日の DateComponents がどこで構築され、どのカレンダーを Calendar.current/autoupdatingCurrent から継承しているかを見つけてください。defaults write NSGlobalDomain AppleLocale "en_US@calendar=iso8601" を設定し、remindctl add "Test" --due "2026-11-21" を実行して再現し、その後、ISO 8601 とグレゴリオ暦の両方のロケールで期限日を設定し、リマインダーが正しい日付を保存することを確認して修正を検証してください。完了とは、非グレゴリオ暦のロケール下で期限日コマンドが成功し、グレゴリオ暦の経路にリグレッションがないことを意味します。
索引モデルが issue の本文から書いたものです。
説明
Bug report for github.com/openclaw/remindctl
generated by Lumo plus
Title: Crash (NSInvalidArgumentException: Calendar must be nil or Gregorian) when setting a due date on non-Gregorian locale (calendar=iso8601)
Summary
Any remindctl operation that sets a due date crashes with an uncaught
NSInvalidArgumentException from EventKit:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: 'Calendar must be nil or Gregorian'
Operations without a due date (add, edit --title, complete, show/list) work fine.
This happens with every due-date variant I tried (today, absolute date, date+time),
on both add and edit.
Environment
- macOS version: 27.3 — Apple Silicon
- remindctl version: 0.3.9
- Installed via:
brew install steipete/tap/remindctl - Relevant locale setting:
$ defaults read NSGlobalDomain AppleLocale
en_CH@calendar=iso8601
The system calendar is set to ISO 8601 (Settings → General → Language & Region),
not Gregorian.
Steps to reproduce
- Set system locale to a non-Gregorian calendar, e.g.:
defaults write NSGlobalDomain AppleLocale "en_US@calendar=iso8601"(or use System Settings) - Run any due-date-setting command:
remindctl add "Test" --due "2026-11-21"
# or
remindctl edit <id> --due "2026-11-21"
# or
remindctl add "Test" --due today
Expected behavior
Reminder is created/updated with the given due date.
Actual behavior
Process aborts (Abort trap: 6), no reminder is written.
Crash log
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Calendar must be nil or Gregorian'
*** First throw call stack:
(
0 CoreFoundation 0x000000018551e790 __exceptionPreprocess + 176
1 libobjc.A.dylib 0x000000018112c64c objc_exception_throw + 88
2 EventKit 0x00000001ae7425f4 -[EKReminder(Shared) setDueDateComponents:] + 888
3 remindctl 0x0000000104e4afa0 $s10RemindCore14RemindersStoreC14createReminder_6targetAA0F4ItemVAA0F5DraftV_AA0F10ListTargetOtYaKFTY0_ + 672
4 remindctl 0x0000000104e1c935 $s9remindctl10AddCommandO4specAA0C4SpecVvgZy9Commander12ParsedValuesV_AA14RuntimeOptionsVtYaYbKcfU_TQ5_ + 1
5 remindctl 0x0000000104e1cf01 $s9remindctl10AddCommandO4specAA0C4SpecVvgZy9Commander12ParsedValuesV_AA14RuntimeOptionsVtYaYbKcfU_TATQ0_ + 1
6 remindctl 0x0000000104e1812d $s9remindctl13CommandRouterV3run4argvs5Int32VSaySSG_tYaFTQ1_ + 1
7 remindctl 0x0000000104e3b081 $sIetH_yts5Error_pIegHrzo_TR10async_MainTf3npf_nTQ2_ + 1
8 libswift_Concurrency.dylib 0x00000001853ade69 _ZL22completeTaskAndReleasePN5swift12AsyncContextE + 0
)
libc++abi: terminating due to uncaught exception of type NSException
(The identical crash occurs in RemindersStore.updateReminder(id:...) for remindctl edit --due.)
Analysis
EventKit's -[EKReminder setDueDateComponents:] throws when the
NSDateComponents.calendar is neither nil nor a Gregorian NSCalendar.
With a system locale like en_CH@calendar=iso8601, the calendar picked up via
Calendar.current / autoupdatingCurrent is NSCalendarIdentifierISO8601, so any
due-date assignment aborts.
Likely fix: when constructing DateComponents for due dates, either leave
components.calendar = nil, or normalize the calendar explicitly to
Calendar(identifier: .gregorian) (keeping the user's timezone) before passing
the components to EventKit.
A defensive alternative is converting the crash into a graceful error, but
normalizing to Gregorian would actually fix the feature for non-Gregorian locales.
Workaround
None found via remindctl itself; due dates can be set in Reminders.app, or via a
different tool (e.g. keith/reminders-cli — untested whether it shares the code path).
Removing @calendar=iso8601 from the locale restores functionality but changes
system-wide calendar display.
- 主要言語
- Swift
- スター
- 428
- フォーク
- 86
- 平均マージ
- 20分
- マージ済み PR(30日)
- 5
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
openclaw/remindctl のほかの issue
-
Landmark geofence address can resolve to city-level coordinates対応中かも @adambiggs が 35 日前に担当しました。 オープンclawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr impact:other issue-rating: 🐚 platinum hermit P2
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
openclaw/remindctl の issue をすべて見る
似ている issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
-
[docs] GitHub 브랜치 수정オープンdocumentation
難易度 1/5 1時間未満 初心者へのやさしさ 60/100
DeveloperAcademy-POSTECH/2026-C6-A03-KIIKICK-iOS#115 ·
メンテナーはふだん 1 日以内に返信
-
mac
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
VictorKildahl/cra#1085 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信