Crash (`NSInvalidArgumentException: Calendar must be nil or Gregorian`) when setting a due date on non-Gregorian locale (`calendar=iso8601`)
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
Línea de trabajo
Empieza en RemindersStore de RemindCore, en createReminder(_:target:) y updateReminder(id:), donde el registro de fallos muestra que se llama a setDueDateComponents; encuentra dónde se construyen los DateComponents de la fecha de vencimiento y de qué calendario heredan desde Calendar.current/autoupdatingCurrent. Reproduce configurando defaults write NSGlobalDomain AppleLocale "en_US@calendar=iso8601" y ejecutando remindctl add "Test" --due "2026-11-21", luego verifica la corrección estableciendo una fecha de vencimiento tanto con locales ISO 8601 como gregorianos y confirmando que el recordatorio almacena la fecha correcta. Hecho significa que los comandos de fecha de vencimiento tienen éxito bajo una locale no gregoriana sin causar regresión en la ruta gregoriana.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Swift
- Estrellas
- 428
- Forks
- 86
- Merge medio
- 20 min
- PR fusionados (30 d)
- 5
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de openclaw/remindctl
-
Landmark geofence address can resolve to city-level coordinatesPosiblemente ocupada @adambiggs la tomó hace 35 días. Abiertoclawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr impact:other issue-rating: 🐚 platinum hermit P2
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
Todos los issues de openclaw/remindctl
Issues similares
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
-
[docs] GitHub 브랜치 수정Abiertodocumentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 60/100
DeveloperAcademy-POSTECH/2026-C6-A03-KIIKICK-iOS#115 ·
Los mantenedores suelen responder en 1 día
-
mac
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
VictorKildahl/cra#1085 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día