MetaMask / MetaMask/metamask-extension

[Bug]: The method "debug_traceTransaction" does not exist / is not available.

Open
#21,611 2 comments 0 reactions 0 assignees View on GitHub
external-contributor T08-featureRequest team-wallet-api-platform-deprecated type-enhancement
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

### Describe the bug

When using `debug_traceTransaction` method over web3, Metamask returns error `The method \"debug_traceTransaction\" does not exist / is not available.`
When the webpage query the backing RPC server directly, correct response is provided by the server.
When using Metamask as a web3 provider, no request is send to the backing RPC proxy, Metamask rejects to handle the method.

### Expected behavior

The metamask should pass the query through to the RPC server and provide its response.

### Screenshots/Recordings

_No response_

### Steps to reproduce

1. Go to Remix IDE: http://remix.ethereum.org/
2. Deploy a contract / send other tx using "Injected provider - Metamask"
3. Try to debug the deployed tx using "Debug" button in the bottom-right log panel.
4. Remix will fail to debug the tx with following error message:

### Error messages or log output

```shell
Returned error: {"jsonrpc":"2.0","error":"The method \"debug_traceTransaction\" does not exist / is not available.","id":6231645777927278}
```

### Version

11.2.0

### Build type

None

### Browser

Firefox

### Operating system

Linux

### Hardware wallet

_No response_

### Additional context

_No response_

### Severity

- possible workaround - use direct RPC calls to the RPC server instead of the Metamask API (In Remix: switch from "Injected provider - Metamask" to "Custom - External Http Provider" and enter the URL of the RPC server - but you will need to switch back to be able to send new txs and Remix will lost info about deployed contracts while switching and you need to reenter them)

Contributor guide

Open the contributing guide

Research direction

No source file or test is named. Start by tracing the provider handling for the JSON-RPC method debug_traceTransaction and compare it with the direct RPC behavior described; done means the method reaches the backing RPC server and its response is returned while normal transaction submission continues to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.