Replies: 1 comment
-
Looks like the issue here is that the shared |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The repo built and running each ChatServer.exe and ChatClient.exe are working as expected.
But when I created new projects (Server and Client) using the same code from repo, basically just copy the Program.cs and Messages.cs plus install Akka.Remote 1.4.14.
In the error message its trying to load Client assembly
Newtonsoft.Json.JsonSerializationException: Could not load assembly 'Client'
Please let me know if I miss something, thanks.
Here is the complete message:
[INFO][1/4/2021 4:31:47 PM][Thread 0001][remoting (akka://MyServer)] Starting remoting [INFO][1/4/2021 4:31:48 PM][Thread 0001][remoting (akka://MyServer)] Remoting started; listening on addresses : [akka.tcp://MyServer@localhost:8081] [INFO][1/4/2021 4:31:48 PM][Thread 0001][remoting (akka://MyServer)] Remoting now listens on addresses: [akka.tcp://MyServer@localhost:8081] [ERROR][1/4/2021 4:31:54 PM][Thread 0025][akka.tcp://MyServer@localhost:8081/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2FMyClient%40localhost%3A56299-1/endpointWriter] AssociationError [akka.tcp://MyServer@localhost:8081] <- akka.tcp://MyClient@localhost:56299: Error [Error resolving type specified in JSON 'ChatMessages.ConnectRequest, Client'. Path '$type', line 1, position 56.] [ at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolveTypeName(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, String qualifiedTypeName) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadMetadataProperties(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue, Object& newValue, String& id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, JsonSerializerSettings settings) at Akka.Serialization.NewtonSoftJsonSerializer.FromBinary(Byte[] bytes, Type type) at Akka.Serialization.Serialization.Deserialize(Byte[] bytes, Int32 serializerId, String manifest) at Akka.Remote.Serialization.WrappedPayloadSupport.PayloadFrom(Payload payload) at Akka.Remote.Serialization.MessageContainerSerializer.FromBinary(Byte[] bytes, Type type) at Akka.Serialization.Serialization.Deserialize(Byte[] bytes, Int32 serializerId, String manifest) at Akka.Remote.MessageSerializer.Deserialize(ExtendedActorSystem system, Payload messageProtocol) at Akka.Remote.DefaultMessageDispatcher.Dispatch(IInternalActorRef recipient, Address recipientAddress, Payload message, IActorRef senderOption) at Akka.Remote.EndpointReader.<Reading>b__11_0(InboundPayload inbound) at lambda_method(Closure , Object , Action
1 , Action1 , Action
1 )at Akka.Tools.MatchHandler.PartialHandlerArgumentsCapture
4.Handle(T value) at Akka.Actor.ReceiveActor.ExecutePartialMessageHandler(Object message, PartialAction
1 partialAction)at Akka.Actor.ReceiveActor.OnReceive(Object message)
at Akka.Actor.UntypedActor.Receive(Object message)
at Akka.Actor.ActorBase.AroundReceive(Receive receive, Object message)
at Akka.Actor.ActorCell.ReceiveMessage(Object message)
at Akka.Actor.ActorCell.Invoke(Envelope envelope)]
[WARNING][1/4/2021 4:31:54 PM][Thread 0026][akka.tcp://MyServer@localhost:8081/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2FMyClient%40localhost%3A56299-1] Association with remote system akka.tcp://MyClient@localhost:56299 has failed; address is now gated for 5000 ms. Reason is: [Newtonsoft.Json.JsonSerializationException: Error resolving type specified in JSON 'ChatMessages.ConnectRequest, Client'. Path '$type', line 1, position 56.
---> Newtonsoft.Json.JsonSerializationException: Could not load assembly 'Client'.
at Newtonsoft.Json.Serialization.DefaultSerializationBinder.GetTypeFromTypeNameKey(StructMultiKey
2 typeNameKey) at System.Collections.Concurrent.ConcurrentDictionary
2.GetOrAdd(TKey key, Func2 valueFactory) at Newtonsoft.Json.Utilities.ThreadSafeStore
2.Get(TKey key)at Newtonsoft.Json.Serialization.DefaultSerializationBinder.GetTypeByName(StructMultiKey
2 typeNameKey) at Newtonsoft.Json.Serialization.DefaultSerializationBinder.BindToType(String assemblyName, String typeName) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolveTypeName(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, String qualifiedTypeName) --- End of inner exception stack trace --- at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolveTypeName(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, String qualifiedTypeName) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadMetadataProperties(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue, Object& newValue, String& id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, JsonSerializerSettings settings) at Akka.Serialization.NewtonSoftJsonSerializer.FromBinary(Byte[] bytes, Type type) at Akka.Serialization.Serialization.Deserialize(Byte[] bytes, Int32 serializerId, String manifest) at Akka.Remote.Serialization.WrappedPayloadSupport.PayloadFrom(Payload payload) at Akka.Remote.Serialization.MessageContainerSerializer.FromBinary(Byte[] bytes, Type type) at Akka.Serialization.Serialization.Deserialize(Byte[] bytes, Int32 serializerId, String manifest) at Akka.Remote.MessageSerializer.Deserialize(ExtendedActorSystem system, Payload messageProtocol) at Akka.Remote.DefaultMessageDispatcher.Dispatch(IInternalActorRef recipient, Address recipientAddress, Payload message, IActorRef senderOption) at Akka.Remote.EndpointReader.<Reading>b__11_0(InboundPayload inbound) at lambda_method(Closure , Object , Action
1 , Action1 , Action
1 )at Akka.Tools.MatchHandler.PartialHandlerArgumentsCapture
4.Handle(T value) at Akka.Actor.ReceiveActor.ExecutePartialMessageHandler(Object message, PartialAction
1 partialAction)at Akka.Actor.ReceiveActor.OnReceive(Object message)
at Akka.Actor.UntypedActor.Receive(Object message)
at Akka.Actor.ActorBase.AroundReceive(Receive receive, Object message)
at Akka.Actor.ActorCell.ReceiveMessage(Object message)
at Akka.Actor.ActorCell.Invoke(Envelope envelope)
--- End of stack trace from previous location where exception was thrown ---
at Akka.Actor.ActorCell.HandleFailed(Failed f)
at Akka.Actor.ActorCell.SysMsgInvokeAll(EarliestFirstSystemMessageList messages, Int32 currentState)]
[ERROR][1/4/2021 4:31:54 PM][Thread 0026][akka://MyServer/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2FMyClient%40localhost%3A56299-1/endpointWriter] Error resolving type specified in JSON 'ChatMessages.ConnectRequest, Client'. Path '$type', line 1, position 56.
Cause: Newtonsoft.Json.JsonSerializationException: Error resolving type specified in JSON 'ChatMessages.ConnectRequest, Client'. Path '$type', line 1, position 56.
---> Newtonsoft.Json.JsonSerializationException: Could not load assembly 'Client'.
at Newtonsoft.Json.Serialization.DefaultSerializationBinder.GetTypeFromTypeNameKey(StructMultiKey
2 typeNameKey) at System.Collections.Concurrent.ConcurrentDictionary
2.GetOrAdd(TKey key, Func2 valueFactory) at Newtonsoft.Json.Utilities.ThreadSafeStore
2.Get(TKey key)at Newtonsoft.Json.Serialization.DefaultSerializationBinder.GetTypeByName(StructMultiKey
2 typeNameKey) at Newtonsoft.Json.Serialization.DefaultSerializationBinder.BindToType(String assemblyName, String typeName) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolveTypeName(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, String qualifiedTypeName) --- End of inner exception stack trace --- at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolveTypeName(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, String qualifiedTypeName) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadMetadataProperties(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue, Object& newValue, String& id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, JsonSerializerSettings settings) at Akka.Serialization.NewtonSoftJsonSerializer.FromBinary(Byte[] bytes, Type type) at Akka.Serialization.Serialization.Deserialize(Byte[] bytes, Int32 serializerId, String manifest) at Akka.Remote.Serialization.WrappedPayloadSupport.PayloadFrom(Payload payload) at Akka.Remote.Serialization.MessageContainerSerializer.FromBinary(Byte[] bytes, Type type) at Akka.Serialization.Serialization.Deserialize(Byte[] bytes, Int32 serializerId, String manifest) at Akka.Remote.MessageSerializer.Deserialize(ExtendedActorSystem system, Payload messageProtocol) at Akka.Remote.DefaultMessageDispatcher.Dispatch(IInternalActorRef recipient, Address recipientAddress, Payload message, IActorRef senderOption) at Akka.Remote.EndpointReader.<Reading>b__11_0(InboundPayload inbound) at lambda_method(Closure , Object , Action
1 , Action1 , Action
1 )at Akka.Tools.MatchHandler.PartialHandlerArgumentsCapture
4.Handle(T value) at Akka.Actor.ReceiveActor.ExecutePartialMessageHandler(Object message, PartialAction
1 partialAction)at Akka.Actor.ReceiveActor.OnReceive(Object message)
at Akka.Actor.UntypedActor.Receive(Object message)
at Akka.Actor.ActorBase.AroundReceive(Receive receive, Object message)
at Akka.Actor.ActorCell.ReceiveMessage(Object message)
at Akka.Actor.ActorCell.Invoke(Envelope envelope)
--- End of stack trace from previous location where exception was thrown ---
at Akka.Actor.ActorCell.HandleFailed(Failed f)
at Akka.Actor.ActorCell.SysMsgInvokeAll(EarliestFirstSystemMessageList messages, Int32 currentState)
`
Beta Was this translation helpful? Give feedback.
All reactions