Open
Description
Expected Behavior
Following code snippet should result in a functioning actor reminder -
await self.register_reminder(
"my_reminder,
state=b"", # <-- EMPTY STATE
due_time=timedelta(minutes=1),
period=timedelta(minutes=1),
)
The issue arises from ActorReminderData
- __init__
fails for None
state (though typing annotations suggest its valid), yet from_dict
explicitly sets state to None
if its empty.
Actual Behavior
Reminder is registered and daprd does fire it, but the Python SDK fails with code 500 when receiving it. Sample logs from daprd:
2025-02-15T09:23:39.012571944Z time="2025-02-15T09:23:39.012454243Z" level=error msg="Error invoking reminder on actor MyActor||MyActorID: error from actor service: {\"message\":\"ValueError(\\\"only bytes are allowed for state
: <class 'NoneType'>\\\")\",\"errorCode\":\"UNKNOWN\"}" app_id=my-app instance=my-app-instance scope=dapr
.runtime.actor type=log ver=1.14.4
Steps to Reproduce the Problem
Start app with the actor from snippet.
Release Note
RELEASE NOTE: FIX receiving reminders with empty state.