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

Akka.TestKit: DelegatingSupervisorStrategy KeyNotFoundException #7437

Closed
Aaronontheweb opened this issue Dec 24, 2024 · 1 comment · Fixed by #7438
Closed

Akka.TestKit: DelegatingSupervisorStrategy KeyNotFoundException #7437

Aaronontheweb opened this issue Dec 24, 2024 · 1 comment · Fixed by #7438
Labels
akka-testkit Akka.NET Testkit issues confirmed bug
Milestone

Comments

@Aaronontheweb
Copy link
Member

          Looks like some of the changes we made to the TestKit might have introduced a problem here:
Cause: Akka.Actor.ActorKilledException: Kill
   at Akka.Actor.ActorCell.Kill()
   at Akka.Actor.ActorCell.AutoReceiveMessage(Envelope envelope)
   at Akka.TestKit.Internal.InternalTestActorRef.TestActorCell.AutoReceiveMessage(Envelope envelope)
   at Akka.Actor.ActorCell.Invoke(Envelope envelope)
Warning: [12/24/2024 11:23:57.091Z][Thread 0015][akka://test/deadLetters] DeadLetter from TestActor[akka://test/user/$$d] to [akka://test/deadLetters]: <Received dead letter from TestActor[akka://test/user/$$d]: workDone>
[INFO][12/24/2024 11:23:57.091Z][Thread 0021][akka://test/deadLetters] Message [String] from TestActor[akka://test/user/$$d] to [akka://test/deadLetters] was not delivered. [1] dead letters encountered. If this is not an expected behavior then [akka://test/deadLetters] may have terminated unexpectedly. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. Message content: workDone
Error: [12/24/2024 11:23:57.590Z][Thread 0015][akka://test/system/testActor270] The given key '[akka://test/system/testActor270/$a#1593664040]' was not present in the dictionary.
Cause: System.Collections.Generic.KeyNotFoundException: The given key '[akka://test/system/testActor270/$a#1593664040]' was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at Akka.TestKit.DelegatingSupervisorStrategy.Handle(IActorRef child, Exception exception)
   at Akka.Actor.SupervisorStrategy.HandleFailure(ActorCell actorCell, IActorRef child, Exception cause, ChildRestartStats stats, IReadOnlyCollection`1 children)
   at Akka.Actor.ActorCell.HandleFailed(Failed f)
   at Akka.Actor.ActorCell.SysMsgInvokeAll(EarliestFirstSystemMessageList messages, Int32 currentState)
Error: [12/24/2024 11:23:57.590Z][Thread 0015][akka://test/system/testActor270] The given key '[akka://test/system/testActor270/actorName#616410545]' was not present in the dictionary.
Cause: System.Collections.Generic.KeyNotFoundException: The given key '[akka://test/system/testActor270/actorName#616410545]' was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at Akka.TestKit.DelegatingSupervisorStrategy.Handle(IActorRef child, Exception exception)
   at Akka.Actor.SupervisorStrategy.HandleFailure(ActorCell actorCell, IActorRef child, Exception cause, ChildRestartStats stats, IReadOnlyCollection`1 children)
   at Akka.Actor.ActorCell.HandleFailed(Failed f)
   at Akka.Actor.ActorCell.SysMsgInvokeAll(EarliestFirstSystemMessageList messages, Int32 currentState)

Originally posted by @Aaronontheweb in akkadotnet/Akka.Hosting#538 (comment)

@Aaronontheweb Aaronontheweb added confirmed bug akka-testkit Akka.NET Testkit issues labels Dec 24, 2024
@Aaronontheweb Aaronontheweb added this to the 1.5.34 milestone Dec 24, 2024
@Aaronontheweb
Copy link
Member Author

This error was introduced in v1.5.33 due to #7221 - it's probably an easy fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
akka-testkit Akka.NET Testkit issues confirmed bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant