Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Impossible to debug transaction due to Connector.format string length #4405

@bropoCorpd

Description

@bropoCorpd

i connect remix to my ganache instance with these parameters :
package.json

{
  "dependencies": {
    "@truffle/hdwallet-provider": "^2.1.11",
    "dotenv": "^16.0.3",
    "ganache": "^7.8.0",
    "truffle-hdwallet-provider": "^1.0.17"
  },
	  "scripts": {
	  "ganache": "ganache --wallet.seed ganacheSeed --chain.allowUnlimitedInitCodeSize true --chain.allowUnlimitedContractSize true --chain.vmErrorsOnRPCResponse true --logging.debug true --chain.networkId 11199111  --chain.vmErrorsOnRPCResponse true --chain.hardfork istanbul --miner.blockGasLimit 0x3938700 --miner.defaultGasPrice 0x0 --database.dbPath /home/xxx/Documents/ganacheDb --logging.verbose false"
  }
}

then i connect remix to ganache, and when i try to debug a transaction created in my migrations file, i get this error:

processing response error (body="{\"id\":65,\"jsonrpc\":\"2.0\",\"error\":{\"message\":\"Invalid string length\",\"stack\":\"RangeError: Invalid string length\\n at JSON.stringify (<anonymous>)\\n at Connector.format
 (/home/xxx/IdeaProjects/xxx/xxx/xxx/xxx/xxx/xxx/node_modules/ganache/dist/node/1.js:2:89623)\\n at 
/home/xxx/IdeaProjects/xxx/xxx/xxx/xxx/xxx/xxx/node_modules/ganache/dist/node/1.js:2:252565\",\"code\":
-32700}}", error={"code":-32700}, requestBody="{\"method\":\"debug_traceTransaction\",\"params\":
[\"0x1854e0c32a07ca85a15cbb6576e22c244da4b9d8131b81dc082442b0181db4de\",
{\"disableStorage\":true,\"enableMemory\":true,\"disableStack\":false,\"fullStorage\":false}],\"id\":65,\"jsonrpc\":\"2.0\"}", 
requestMethod="POST", url="http://127.0.0.1:8545", code=SERVER_ERROR, version=web/5.7.1)


if i run truffle debug 0x1854e0c32a07ca85a15cbb6576e22c244da4b9d8131b81dc082442b0181db4de i get this instead :

truffle debug 0x4f5467f156419cd83813554afa19930e6ab5af3281ac7da1318bd40f75decd5e
Starting Truffle Debugger...
✓ Compiling your contracts...
✖ Gathering information about your project and the transaction...
SError: Invalid string length
    at $t.getTrace (/home/sniffnoy/truffle/truffle/packages/debugger/lib/web3/adapter.js:55:13)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

i tried upping my node heap size limit by putting into my bashrc export NODE_OPTIONS=--max-old-space-size=4096, but i cannot debug my transaction at all.
if anyone has an idea on how to fix this, it would be really appreciated, thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions