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

Deserialise error an Actor Reminder when using GetReminderAsync() #1464

Open
olitomlinson opened this issue Feb 21, 2025 · 8 comments · Fixed by #1475
Open

Deserialise error an Actor Reminder when using GetReminderAsync() #1464

olitomlinson opened this issue Feb 21, 2025 · 8 comments · Fixed by #1475
Assignees
Milestone

Comments

@olitomlinson
Copy link

Expected Behavior

Calling .GetReminderAsync(String reminderName) shouldn't throw the following exception :

2025-02-21 19:33:53 Specified argument was out of the range of valid values.    at Dapr.Actors.Runtime.ConverterUtils.ConvertTimeSpanValueFromISO8601Format(String valueString)
2025-02-21 19:33:53    at Dapr.Actors.Runtime.ReminderInfo.DeserializeAsync(Stream stream)
2025-02-21 19:33:53    at Dapr.Actors.Runtime.DefaultActorTimerManager.DeserializeReminderAsync(Stream stream, ActorReminderToken token)
2025-02-21 19:33:53    at Dapr.Actors.Runtime.DefaultActorTimerManager.GetReminderAsync(ActorReminderToken token)
2025-02-21 19:33:53    at Dapr.Actors.Runtime.Actor.GetReminderAsync(String reminderName)

Actual Behavior

Should deserialize the Reminder correctly.

Steps to Reproduce the Problem

  • Create a Reminder on an Actor (await this.RegisterReminderAsync("Report", null, TimeSpan.FromSeconds(15), TimeSpan.FromSeconds(15));)
  • Call GetReminderAsync("Report")

Release Note

RELEASE NOTE:

@olitomlinson olitomlinson added the kind/bug Something isn't working label Feb 21, 2025
@WhitWaldo WhitWaldo self-assigned this Feb 21, 2025
@WhitWaldo WhitWaldo added this to the v1.15 milestone Feb 21, 2025
@WhitWaldo
Copy link
Contributor

This appears to have been an issue since at least 1.12 if not earlier in that the deserializer only supports ISO8601 values and not any of the other valid value formats (per the documentation).

@WhitWaldo WhitWaldo removed the kind/bug Something isn't working label Feb 21, 2025
@WhitWaldo WhitWaldo removed their assignment Feb 24, 2025
@siri-varma
Copy link
Contributor

/assign

@siri-varma
Copy link
Contributor

siri-varma commented Feb 25, 2025

I tried to repro with the 1.14.4 version but don't see this exception. I just ran the SDK examples DemoActor and ActorClient

Image

Image

@olitomlinson
Copy link
Author

@siri-varma try with the latest 1.15 runtime RC

@siri-varma
Copy link
Contributor

siri-varma commented Feb 25, 2025

Thank you for helping olitomlinson.

Something changed with payload we receive from run time I think

This is from the 1.15-rc version:
{"period":"@every 5s","data":"","actorID":"abc","actorType":"DemoActor","dueTime":"0h0m5s0ms"}

Image

This is from the 1.14.4
APP == {"period":"0h0m5s0ms","data":"","dueTime":"0h0m5s0ms"}

should we raise an issue with the dapr runtime? or is this expected ?

Image

@WhitWaldo
Copy link
Contributor

Per @olitomlinson comment here intended for this issue:

Can no longer repro on rc6 w/ runtime 1.15 rc18

@WhitWaldo WhitWaldo closed this as not planned Won't fix, can't repro, duplicate, stale Feb 26, 2025
@olitomlinson olitomlinson reopened this Feb 26, 2025
@olitomlinson
Copy link
Author

Still a problem on the latest sdk and runtime

app-dapr-1     | time="2025-02-26T14:24:23.008838011Z" level=error msg="Error executing reminder for actor TenantTracker||1||Report: error from actor service: (500) " app_id=watchdog instance=ae442fcc5b7e scope=dapr.runtime.actors.targets.app type=log ver=1.15.0-rc.18
app-1          |       System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
app-dapr-1     | time="2025-02-26T14:24:23.008879178Z" level=error msg="failed to invoke scheduled actor reminder named: Report due to: error from actor service: (500) " app_id=watchdog instance=ae442fcc5b7e scope=dapr.runtime.scheduler.cluster type=log ver=1.15.0-rc.18
app-1          |          at Dapr.Actors.Runtime.ConverterUtils.ConvertTimeSpanValueFromISO8601Format(String valueString)
app-1          |          at Dapr.Actors.Runtime.ReminderInfo.DeserializeAsync(Stream stream)
app-1          |          at Dapr.Actors.Runtime.DefaultActorTimerManager.DeserializeReminderAsync(Stream stream, ActorReminderToken token)
app-1          |          at Dapr.Actors.Runtime.DefaultActorTimerManager.GetReminderAsync(ActorReminderToken token)
app-1          |          at Dapr.Actors.Runtime.Actor.GetReminderAsync(String reminderName)
app-1          |          at X.Actors.TenantTracker.RegisterReportReminder() in /src/Actors/TenantTracker.cs:line 200
app-1          |          at X.Actors.TenantTracker.OnActivateAsync() in /src/Actors/TenantTracker.cs:line 187
app-1          |          at Dapr.Actors.Runtime.Actor.OnActivateInternalAsync()
app-1          |          at Dapr.Actors.Runtime.ActorManager.ActivateActorAsync(ActorId actorId)
app-1          |          at Dapr.Actors.Runtime.ActorManager.ActivateActorAsync(ActorId actorId)
app-1          |          at Dapr.Actors.Runtime.ActorManager.DispatchInternalAsync[T](ActorId actorId, ActorMethodContext actorMethodContext, Func`3 actorFunc, CancellationToken cancellationToken)
app-1          |          at Dapr.Actors.Runtime.ActorManager.FireReminderAsync(ActorId actorId, String reminderName, Stream requestBodyStream, CancellationToken cancellationToken)
app-1          |          at Microsoft.AspNetCore.Builder.ActorsEndpointRouteBuilderExtensions.<>c__DisplayClass4_0.<<MapReminderEndpoint>b__0>d.MoveNext()
app-1          |       --- End of stack trace from previous location ---
app-1          |          at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)

@olitomlinson
Copy link
Author

Image

@WhitWaldo WhitWaldo self-assigned this Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants