1

I have an application that executes fine for several hours but after a while I start seeing 403 exceptions from the RPC client, usually on internal TranasactionManager calls like "Estimate Gas".

Any suggestions on why this is happening or how I can output logs from the internal web3 client? The Nethereum.Web3 instance and Nethereum.RPC.Accounts.IAccount instance are singletons.

I am using the BSC https://bsc-dataseed.binance.org endpoint.

Example stack trace:

Nethereum.JsonRpc.Client.RpcClientUnknownException: Error occurred when trying to send rpc requests(s)
 ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 403 (Forbidden).
   at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
   at Nethereum.JsonRpc.Client.RpcClient.SendAsync(RpcRequestMessage request, String route)
   --- End of inner exception stack trace ---
   at Nethereum.JsonRpc.Client.RpcClient.SendAsync(RpcRequestMessage request, String route)
   at Nethereum.JsonRpc.Client.ClientBase.SendInnerRequestAsync[T](RpcRequestMessage reqMsg, String route)
   at Nethereum.JsonRpc.Client.ClientBase.SendInnerRequestAsync[T](RpcRequest request, String route)
   at Nethereum.JsonRpc.Client.ClientBase.SendRequestAsync[T](RpcRequest request, String route)
   at Nethereum.Contracts.TransactionHandlers.TransactionEstimatorHandler`1.EstimateGasAsync(String contractAddress, TFunctionMessage functionMessage)
   at Nethereum.Contracts.TransactionHandlers.TransactionSenderHandler`1.GetOrEstimateMaximumGasAsync(TFunctionMessage functionMessage, String contractAddress)
   at Nethereum.Contracts.TransactionHandlers.TransactionSenderHandler`1.SendTransactionAsync(String contractAddress, TFunctionMessage functionMessage)
   at Nethereum.Contracts.TransactionHandlers.TransactionReceiptPollHandler`1.SendTransactionAsync(String contractAddress, TFunctionMessage functionMessage, CancellationTokenSource cancellationTokenSource)
2
  • 1
    You may want to check with Nethereum directly (I believe that's what you are using). Apr 23, 2021 at 14:07
  • How did you fix the error? Oct 20, 2021 at 16:58

0

Browse other questions tagged or ask your own question.