Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Registering actor reminder with empty state results in error while receiving it #782

Open
natasky opened this issue Feb 15, 2025 · 0 comments
Assignees
Labels
kind/bug Something isn't working
Milestone

Comments

@natasky
Copy link

natasky commented Feb 15, 2025

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.

@natasky natasky added the kind/bug Something isn't working label Feb 15, 2025
@elena-kolevska elena-kolevska self-assigned this Feb 19, 2025
@elena-kolevska elena-kolevska added this to the v1.16 milestone Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants