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

Fix Akka.Remote serialization exception bubbling and messages #5072

Merged
merged 10 commits into from
Jun 9, 2021

Conversation

Arkatufus
Copy link
Contributor

Closes #5062

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not fixed

src/core/Akka/Serialization/Serialization.cs Outdated Show resolved Hide resolved
@Aaronontheweb Aaronontheweb self-requested a review June 9, 2021 14:26
@Aaronontheweb Aaronontheweb enabled auto-merge (squash) June 9, 2021 14:27
Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addresses a totally different problem and introduces new ones.

var o = new object();
var ex = o.Invoking(s => MessageSerializer.Deserialize((ExtendedActorSystem)Sys, serialized)).Should()
.Throw<SerializationException>()
.WithMessage("Failed to deserialize object with serialization id [6] (manifest []).")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This literally reproduces the error we want to get rid of in #5062

//.WithInnerExceptionExactly<SerializationException>()
//.WithMessage("Failed to deserialize object with serialization id [11] (manifest [E]).")
.WithInnerExceptionExactly<SerializationException>()
.WithMessage("Failed to deserialize object with serialization id [13] (manifest [SM]).");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your use case and reproduction here is wrong - need to have a scenario where SomeMessage isn't registered at all, not that it fails during deserialization.

The goal of this bug is to unpack the inner exception and throw that - so the user gets a clear error message: that the payload carried by an ActorSelection couldn't be found because of a missing manifest, not that the ActorSelection itself couldn't be deserialized.

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Aaronontheweb Aaronontheweb enabled auto-merge (squash) June 9, 2021 15:38
@Aaronontheweb Aaronontheweb merged commit 6a7373f into akkadotnet:dev Jun 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Akka.Remote: MessageContainerSerializer throws misleading error message when can't deserialize payload
2 participants