RpcClient sometimes not working with latest Mono
See original GitHub issueI had been using an older Mono 3.2.8 with EdjCase.JsonRpc.Client and it was working well, however I just had to update to the latest Mono 4.4.2 because of incompatibilities with another library, and now the JsonRpc.Client is throwing an exception.
System.AggregateException: One or more errors occurred. ---> EdjCase.JsonRpc.Client.RpcClientUnknownException: Error occurred when trying to send rpc requests(s) ---> System.MissingFieldException: Field 'System.Net.HttpWebRequest.ResendContentFactory' not found.
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].Start[TStateMachine] (System.Runtime.CompilerServices.TStateMachine& stateMachine) <0x303a6c8 + 0x00117> in <filename unknown>:0
at System.Net.Http.HttpClientHandler.SendAsync (System.Net.Http.HttpRequestMessage request, CancellationToken cancellationToken) <0x303a538 + 0x0016b> in <filename unknown>:0
at System.Net.Http.HttpMessageInvoker.SendAsync (System.Net.Http.HttpRequestMessage request, CancellationToken cancellationToken) <0x303a3a0 + 0x00021> in <filename unknown>:0
at System.Net.Http.HttpClient.<SendAsync>__BaseCallProxy0 (System.Net.Http.HttpRequestMessage request, CancellationToken cancellationToken) <0x303a370 + 0x0001f> in <filename unknown>:0
at System.Net.Http.HttpClient+<SendAsyncWorker>c__async0.MoveNext () <0x3039350 + 0x00237> in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x18aa010 + 0x00035> in <filename unknown>:0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x18a7830 + 0x000b7> in <filename unknown>:0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x18a7790 + 0x00087> in <filename unknown>:0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x18a7740 + 0x0003f> in <filename unknown>:0
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () <0x18a8040 + 0x00024> in <filename unknown>:0
at EdjCase.JsonRpc.Client.RpcClient+<SendAsync>c__async3`2[TRequest,TResponse].MoveNext () <0x2d8bb78 + 0x0042b> in <filename unknown>:0
--- End of inner exception stack trace ---
at EdjCase.JsonRpc.Client.RpcClient+<SendAsync>c__async3`2[TRequest,TResponse].MoveNext () <0x2d8bb78 + 0x008c7> in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x18aa010 + 0x00035> in <filename unknown>:0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x18a7830 + 0x000b7> in <filename unknown>:0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x18a7790 + 0x00087> in <filename unknown>:0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x18a7740 + 0x0003f> in <filename unknown>:0
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () <0x18a8040 + 0x00024> in <filename unknown>:0
at EdjCase.JsonRpc.Client.RpcClient+<SendRequestAsync>c__async0.MoveNext () <0x2d8b640 + 0x0017f> in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x18aa010 + 0x00035> in <filename unknown>:0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x18a7830 + 0x000b7> in <filename unknown>:0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x18a7790 + 0x00087> in <filename unknown>:0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x18a7740 + 0x0003f> in <filename unknown>:0
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () <0x18a8040 + 0x00024> in <filename unknown>:0
at Nethereum.JsonRpc.Client.RpcRequestResponseHandler`1+<SendRequestAsync>d__7[TResponse].MoveNext () <0x2d8ad30 + 0x001df> in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x18aa010 + 0x00035> in <filename unknown>:0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x18a7830 + 0x000b7> in <filename unknown>:0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x18a7790 + 0x00087> in <filename unknown>:0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x18a7740 + 0x0003f> in <filename unknown>:0
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () <0x18a8040 + 0x00024> in <filename unknown>:0
at Nethereum.Web3.FunctionBase+<CallAsync>d__27`1[TReturn].MoveNext () <0x2d8a478 + 0x00213> in <filename unknown>:0
Edit: I tried using the netstarndard, net451, and portable dlls and it made no difference.
Just found this commit, the description says “Not support by Public HttpWebRequest, but HttpClient runs in this mode”
https://github.com/mono/mono/commit/ca2f879ce11ec034a17494316d64406c8a06a615
Issue Analytics
- State:
- Created 7 years ago
- Comments:8
Top Results From Across the Web
Opened channels leaked and mapper return ...
When creating the RpcClient with Sender#rpcClient the Sender instance provides a Channel that will be closed when the Sender is closed. It is ......
Read more >Reactor RabbitMQ Reference Guide
The RpcClient handles the machinery to send the request and wait on a reply queue the result processed on the server queue, wrapping...
Read more >Third Party - Mirror - Open Source Networking for Unity
RpcClient calls are not called on server players, they are only called on (remote) clients/players. I wonder if it's a normal behavior? This ......
Read more >zshmodules - man pages section 1: User Commands
The strings and their default values are: zsh 5.0.5 Last change: January 5, ... The completion code sometimes decides not to show all...
Read more >xterm - man pages section 1: User Commands
+cu This option indicates that xterm should not work around the more(1) bug ... NOTE: This must be the last option on the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I also had this issue (though not using this project), removing Mono.Security.dll was the solution as well. This issue is literally the only result when searching for this error. Hopefully the Googlebot will pick it up.
@kgalic Are you also having this issue with latest Xamarin or another thing? Thanks!