You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ActorId and ActorReference work with the serializer and state store by default.
It's very common for actors to exchange their "addresses" and communicate with each other in asynchronous and disconnected ways. Using the primitive types that Dapr Actors provide should work for these usecases
Actual Behavior
The serializer throws an exception:
Exception has occurred: CLR/System.NotSupportedException
Exception thrown: 'System.NotSupportedException' in System.Private.CoreLib.dll: 'Deserialization of reference types without parameterless constructor is not supported. Type 'Dapr.Actors.ActorId''
at System.Text.Json.ThrowHelper.ThrowNotSupportedException_DeserializeCreateObjectDelegateIsNull(Type invalidType)
at System.Text.Json.JsonSerializer.HandleStartObject(JsonSerializerOptions options, ReadStack& state)
at System.Text.Json.JsonSerializer.ReadCore(JsonSerializerOptions options, Utf8JsonReader& reader, ReadStack& readStack)
at System.Text.Json.JsonSerializer.ReadCore(Type returnType, JsonSerializerOptions options, Utf8JsonReader& reader)
at System.Text.Json.JsonSerializer.Deserialize(String json, Type returnType, JsonSerializerOptions options)
at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
at Dapr.Actors.Runtime.DaprStateProvider.<TryLoadStateAsync>d__2`1.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Dapr.Actors.Runtime.ActorStateManager.<TryGetStateAsync>d__7`1.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at MatchMaker.MatchMakerActor.<RequestGameAsync>d__1.MoveNext() in /Users/ryan/github.com/rynowak/rock-paper-actors/src/MatchMaker/MatchMakerActor.cs:line 35
Steps to Reproduce the Problem
Create an actor that stores and reads an ActorReference from the state store.
Saving the reference will work, but reading it out will blow up on ActorId.
Release Note
RELEASE NOTE: FIX Bug in the Actors SDK for dotnet-sdk. Actor Reference and Id can now be stored.
The text was updated successfully, but these errors were encountered:
Fixes: #444
ActorId doesn't define a default constructor, and so it's not
deserializable via System.Text.Json.
This change implements a converter so that ActorId's API shape can work
with the serializer properly.
I added an integration test for ActorReference as well, but no library
changes we needed for that, ActorId was the blocker.
Fixes: #444
ActorId doesn't define a default constructor, and so it's not
deserializable via System.Text.Json.
This change implements a converter so that ActorId's API shape can work
with the serializer properly.
I added an integration test for ActorReference as well, but no library
changes we needed for that, ActorId was the blocker.
Expected Behavior
ActorId and ActorReference work with the serializer and state store by default.
It's very common for actors to exchange their "addresses" and communicate with each other in asynchronous and disconnected ways. Using the primitive types that Dapr Actors provide should work for these usecases
Actual Behavior
The serializer throws an exception:
Steps to Reproduce the Problem
Create an actor that stores and reads an
ActorReference
from the state store.Saving the reference will work, but reading it out will blow up on
ActorId
.Release Note
RELEASE NOTE: FIX Bug in the Actors SDK for dotnet-sdk. Actor Reference and Id can now be stored.
The text was updated successfully, but these errors were encountered: