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

Init Actions crash when given an empty state #5

Open
sleipnir opened this issue Nov 14, 2023 · 0 comments
Open

Init Actions crash when given an empty state #5

sleipnir opened this issue Nov 14, 2023 · 0 comments

Comments

@sleipnir
Copy link
Member

Describe the bug

Methods marked as initialization end up popping an error when the actor's state is empty.

io.eigr.spawn.api.exceptions.ActorInvocationException: com.google.protobuf.InvalidProtocolBufferException: Type of the Any message does not match the given class.
    at io.eigr.spawn.internal.transport.server.ActorServiceHandler.callAction(ActorServiceHandler.java:168)
    at io.eigr.spawn.internal.transport.server.ActorServiceHandler.handleRequest(ActorServiceHandler.java:86)
    at io.eigr.spawn.internal.transport.server.ActorServiceHandler.handle(ActorServiceHandler.java:64)
    at jdk.httpserver/com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:98)
    at jdk.httpserver/sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:82)
    at jdk.httpserver/com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:101)
    at jdk.httpserver/sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:871)
    at jdk.httpserver/com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:98)
    at jdk.httpserver/sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:847)
    at java.base/java.util.concurrent.ThreadPerTaskExecutor$TaskRunner.run(ThreadPerTaskExecutor.java:314)
    at java.base/java.lang.VirtualThread.run(VirtualThread.java:311)
Caused by: com.google.protobuf.InvalidProtocolBufferException: Type of the Any message does not match the given class.
    at com.google.protobuf.Any.unpack(Any.java:225)
    at io.eigr.spawn.internal.transport.server.ActorServiceHandler.callAction(ActorServiceHandler.java:153)
    ... 10 common frames omitted

To Reproduce
Steps to reproduce the behavior:

  1. Create init method on Actor
  2. Start system
  3. See error

Additional context
Apparently it is trying to deserialize a protobuf type with no bytes in the Any type.

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

No branches or pull requests

1 participant