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

Unable to resolve type 'Orleans.Serialization.Serializers.IValueSerializer1[Orleans.Serialization.Codecs.ImmutableArraySurrogate1[Orleans.Metadata.GrainManifest]]' #133

Closed
dmitrig89 opened this issue Mar 29, 2023 · 5 comments
Assignees
Labels

Comments

@dmitrig89
Copy link

dmitrig89 commented Mar 29, 2023

Similar to issue #132

When running the Microsoft Orleans client, and using StashBox, I'm getting the following error:

Unable to resolve service for type 'Orleans.Serialization.Serializers.IValueSerializer`1[Orleans.Serialization.Codecs.ImmutableArraySurrogate`1[Orleans.Metadata.GrainManifest]]' while attempting to activate 'Orleans.Serialization.Codecs.ImmutableArrayCodec`1[Orleans.Metadata.GrainManifest]'

The following packages were used:

Microsoft.Extensions.Hosting Version=7.0.1
Microsoft.Orleans.Client Version=7.1.1
Stashbox.Extensions.Hosting Version=4.6.1

To reproduce the issue, simply run an Orleans client (with or without a server running, this issue will happen anyway):

using Microsoft.Extensions.Hosting;

await Host.CreateDefaultBuilder(args)
    .UseStashbox()
    .UseOrleansClient(siloBuilder =>
    {
        siloBuilder.UseLocalhostClustering(); ;
    })
    .RunConsoleAsync();

If we run without StashBox, no such error appears:

using Microsoft.Extensions.Hosting;

await Host.CreateDefaultBuilder(args)
    .UseOrleansClient(siloBuilder =>
    {
        siloBuilder.UseLocalhostClustering(); ;
    })
    .RunConsoleAsync();
@dmitrig89
Copy link
Author

This is happening because the ImmutableArraySurrogate is a struct and therefore a value type.
It will not have a public parameterless constructor.

@z4kn4fein
Copy link
Owner

Hi @dmitrig89, thanks again for reporting!
I've fixed this in v5.8.2. Let me know if further issues appear!

@dmitrig89
Copy link
Author

Thank you very much @z4kn4fein, I really appreciate your dedication and it's amazing how quickly you get issues resolved.

@z4kn4fein
Copy link
Owner

Thank you for your appreciation! :)

@z4kn4fein z4kn4fein self-assigned this Mar 29, 2023
@z4kn4fein z4kn4fein added the bug label Mar 29, 2023
@dmitrig89
Copy link
Author

Looks good so far.
Closing this issue.

Thanks a lot for your help @z4kn4fein

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants