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

Issue using debug in truffle develop #3205

Closed
eggplantzzz opened this issue Jul 28, 2020 · 8 comments
Closed

Issue using debug in truffle develop #3205

eggplantzzz opened this issue Jul 28, 2020 · 8 comments

Comments

@eggplantzzz
Copy link
Contributor

eggplantzzz commented Jul 28, 2020

Issue

There is a problem trying to debug a transaction while using truffle develop

Steps to Reproduce

  1. truffle unbox metacoin
  2. truffle develop
  3. At the prompt, run migrate
  4. Run the following
const instance = await MetaCoin.deployed();
const result = await instance.sendCoin(accounts[0], 10);
  1. Get the transaction hash from result and use it as an argument to debug

Expected Behavior

I expect the debugger to load the transaction for sendCoin

Actual Results

I receive a connection error.

> Something went wrong while attempting to connect to the network. Check your network configuration.

Could not connect to your Ethereum client with the following parameters:
    - host       > 127.0.0.1
    - port       > 7545
    - network_id > 5777
Please check that your Ethereum client:
    - is running
    - is accepting RPC connections (i.e., "--rpc" option is used in geth)
    - is accessible over the network
    - is properly configured in your Truffle configuration file (truffle-config.js)

Environment

  • Operating System: mac
  • Truffle v5.1.36 (core: 5.1.36)
  • Solidity v0.5.16 (solc-js)
  • Node v10.20.1
  • Web3.js v1.2.1
@haltman-at
Copy link
Contributor

Hm, I wonder if this is due to what @gnidan, @fainashalts, and @cds-amal are working on. Like, I wonder if it's trying to connect to the wrong network due to not inheriting the config properly?

@gnidan
Copy link
Contributor

gnidan commented Jul 28, 2020

Hm, very strange. I don't think it's related to that work @haltman-at, but it's definitely something with the debugger not getting the correct config - since develop runs on port 9545, that error's a clear giveaway that something's wrong.

I don't suppose this is related to that change you made to the debugger's --network flag default, @haltman-at?

@haltman-at
Copy link
Contributor

I mean, I got rid of the default. It now uses whatever means Truffle normally uses to determine the default network.

@fainashalts
Copy link
Contributor

Interesting! I don't believe the issue I'm dealing with is related, but I'll keep my eyes peeled in case it is!

@gnidan
Copy link
Contributor

gnidan commented Jul 28, 2020

Hm well this used to work, since I used this exact process to test the debugger all the time. Might be worth figuring out the first version it was broken, to check the changelog.

@eggplantzzz
Copy link
Contributor Author

When no network config is provided, Environment.detect sets the default port to 7545 here. I'm going to say the solution is to set this to 9545.

@haltman-at
Copy link
Contributor

So, did #3319 fix this? I don't know whether to close this or not.

@eggplantzzz
Copy link
Contributor Author

Looks like this is good on Truffle 5.1.44

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants