web3.unity icon indicating copy to clipboard operation
web3.unity copied to clipboard

Samples that require gas fee not working with Web3Auth and WebGL

Open juans-chainsafe opened this issue 1 year ago • 2 comments

Describe the bug In dev branch, after building in WebGL with Web3Auth, samples that require gas fee are not working.

Steps Steps to reproduce the behavior:

  1. Use the scene [SampleLogin - Web3Auth]
  2. Login with [Web3Auth]
  3. Click on any sample that require gass fee, for example: GetNonce

Expected behavior

  • Expected output is displayed in the console without errors, like the nonce (if you click on GetNonce)

Console errors

webgl3.framework.js.gz:10 DllNotFoundException: Unable to load DLL 'libc'. Tried the load the following dynamic libraries: 
Rethrow as RpcClientUnknownException: Error occurred when trying to send rpc requests(s): eth_getTransactionCount
  at Nethereum.JsonRpc.Client.SimpleRpcClient.SendAsync (Nethereum.JsonRpc.Client.RpcMessages.RpcRequestMessage request, System.String route) [0x00000] in <00000000000000000000000000000000>:0 
Rethrow as Web3Exception: Error occurred when trying to send rpc requests(s): eth_getTransactionCount
  at ChainSafe.Gaming.InProcessTransactionExecutor.InProcessTransactionExecutor.SendTransaction (ChainSafe.Gaming.Evm.Transactions.TransactionRequest transaction)

Screenshots/Video Screenshot 2024-05-15 at 12 18 31 PM

Desktop (please complete the following information):

  • Chainsafe SDK version: [dev]
  • Platform: [WebGL]
  • Unity Version: [2021.1]
  • Operating System: [Mac]

Additional context

  • This is working in the editor
  • Sepolia was working very bad today, can be that the issue?

juans-chainsafe avatar May 15 '24 15:05 juans-chainsafe

reopening the issue because InProcessTransactionExecutor and NEthereum itself have to create their own things on the thread that's not the main unity one, which causes the libc issue on webGL, but works fine everywhere else.

kantagara avatar Jun 03 '24 18:06 kantagara

@juans-chainsafe this is already fixed, right?

rob1997 avatar Jun 26 '24 16:06 rob1997