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

Sending FIL via FEVM on Metamask Mobile fails with Internal JSON RPC Error #1538

Closed
scotthconner opened this issue Jan 24, 2023 · 8 comments
Closed

Comments

@scotthconner
Copy link

Adding Hyperspace configuration (https://api.hyperspace.node.glif.io/rpc/v0 or v1) to MetaMask on Android successfully reads contract state from dApps deployed on Hyperspace. tFIL balance shows up in-wallet.

However, sending raw tFIL on the MM mobile app results in "Transaction Error: Internal JSON-RPC error."

My only guess is that Metamask Mobile does some level of validation not done in the browser extension. There might still be lingering CBOR encoding values leaking through that is causing problems, but I can't be sure because debugging the mobile app is significantly more limited.

The current impact seems low as it only happens on mobile, but its an indicator that something about how the EVM is interacting with clients is still causing JSON RPC issues.

@maciejwitowski maciejwitowski added this to the Post Carbonado.3 milestone Jan 25, 2023
@maciejwitowski
Copy link
Contributor

Thanks @scotthconner for exploring unchartered territories. As you said impact is low for now, but we'll keep it in mind.

@maciejwitowski maciejwitowski removed this from the Post Carbonado.3 milestone Jan 25, 2023
@raulk
Copy link
Member

raulk commented Jan 25, 2023

Possibly a usage of batched JSON-RPC calls, since mobile applications tend to be built to reduce latencies. #1047.

@maciejwitowski
Copy link
Contributor

Good point, batching is usually the way of sending requests on mobile (both for latency and battery)

@raulk
Copy link
Member

raulk commented Feb 19, 2023

We have found that the MetaMask Mobile apps use the ConsenSys Codefi APIs. The Filecoin chains have not yet been onboarded onto them:

export const TOKEN_END_POINT_API = 'https://token-api.metaswap.codefi.network';

This issue is visible when dealing with assets (e.g. tokens and NFTs). We are dealing with that on the FVM Product side of things.

However, what @scotthconner reports here is a native token send, which may or may not be related.

@raulk
Copy link
Member

raulk commented Feb 19, 2023

@scotthconner I successfully tested native coin transfers in MetaMask Mobile for iOS. Could you please retest on Android? We are aware of the above issue for tokens, but native coin transfers should not be affected.

image

@scotthconner
Copy link
Author

scotthconner commented Feb 19, 2023

Native gas sends now work on Android with v1 endpoint. I noticed a considerable lag between the transactions complete notification and the balance update, but a few more blocks and everything looked right.

@raulk
Copy link
Member

raulk commented Feb 19, 2023

Yea, I noticed the same. We should review if we're applying our deferred execution rules correctly on eth_getBalance in the JSON-RPC. It might just be a MetaMask lag. Perhaps try on Goerli?

@raulk
Copy link
Member

raulk commented Mar 6, 2023

I was able to send and receive FIL via MetaMask, as well as custom ERC-20 tokens. May have been fixed by the recent addition of Filecoin to Codefi oracles.

@raulk raulk closed this as completed Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants