When using akka.serialize-messages = on together with Phobos it throws errors in the application when trying to fetch the actor hierarchy
#22
Description
When I have Phobos 1.1.3 and Petabridge.CMD 0.8.5 I get the following errors when I want to fetch the actor hierarchy via pbm. Also no hierarchy is shown except /user.
Output of the pbm console:
petabridge.cmd (0.8.5.0)
Copyright 2017 - 2021, Petabridge�.successfully connected to [::ffff:127.0.0.1]:9110
Commands downloaded from server. typehelp
to see what's available
[127.0.0.1:9110] pbm> actor hierarchy
/user
Errors thrown in the application running the actorsystem:
[15:57:42.356 +02:00 Error] [Petabridge.Cmd.Host.Default.Actor.ActorTracer] [RequestId: ] Swallowing exception during message send
System.Runtime.Serialization.SerializationException: Failed to serialize and deserialize payload object [Phobos.Tracing.SpanEnvelope]. Envelope: [<Phobos.Tracing.SpanEnvelope> from [akka://blueprint-service/user/petabridge.cmd/127.0.0.1%3A46166/actor/handler/$a/$J#202894395]], Actor type: [Petabridge.Cmd.Host.Default.Actor.ActorTracer]
---> System.InvalidCastException: Unable to cast object of type 'Surrogate' to type 'Akka.Actor.ActorPath'.
at lambda_method(Closure , Stream , DeserializerSession )
at lambda_method(Closure , Stream , DeserializerSession )
at Hyperion.Serializer.Deserialize[T](Stream stream)
at Akka.Serialization.HyperionSerializer.FromBinary(Byte[] bytes, Type type)
at Akka.Serialization.Serialization.Deserialize(Byte[] bytes, Int32 serializerId, String manifest)
at Phobos.Tracing.Serialization.WrappedPayloadSupport.PayloadFrom(Payload payload)
at Phobos.Tracing.Serialization.TraceEnvelopeSerializer.WithTraceFromProto(Byte[] bytes)
at Akka.Serialization.Serialization.Deserialize(Byte[] bytes, Int32 serializerId, String manifest)
at Akka.Actor.ActorCell.SerializeAndDeserializePayload(Object obj)
at Akka.Actor.ActorCell.SerializeAndDeserialize(Envelope envelope)
--- End of inner exception stack trace ---
at Akka.Actor.ActorCell.SerializeAndDeserialize(Envelope envelope)
at Akka.Actor.ActorCell.SendMessage(Envelope message)
[15:57:42.357 +02:00 Error] [Petabridge.Cmd.Host.Default.Actor.ActorTracer] [RequestId: ] Swallowing exception during message send