You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
I've asked for help in the Truffle Gitter before filing this issue.
Issue
If you try to use the Ganache UI (not ganache-cli) on its default port of 7545, and truffle develop at the same time, develop indicates that it is connected to a ganache instance at port 9545, even though there is no instance of ganache running at that port. Then when you run test, Truffle throws a Provider Error because it can't connect.
Steps to Reproduce
Start Ganache UI, note the port by default is 7545
Run truffle develop in a Truffle project, observe it says that develop is connected to port 9545
Run test
Observe error
Expected Behavior
For truffle develop to spin up a new ganache instance at 9545, the default develop port, and run tests against that instance. Or, in the alternative, for develop to connect to the ganache ui running at port 7545, and indicate that this is the case.
Actual Results
run truffle develop, then run test.
The error:
ProviderError:
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)
at /usr/local/lib/node_modules/truffle/build/webpack:/packages/provider/wrapper.js:73:1
at /usr/local/lib/node_modules/truffle/build/webpack:/packages/provider/wrapper.js:102:1
at XMLHttpRequest.request.onreadystatechange (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/web3/node_modules/web3-providers-http/lib/index.js:98:1)
at XMLHttpRequestEventTarget.dispatchEvent (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/xhr2-cookies/dist/xml-http-request-event-target.js:34:1)
at XMLHttpRequest.exports.modules.996763.XMLHttpRequest._setReadyState (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/xhr2-cookies/dist/xml-http-request.js:208:1)
at XMLHttpRequest.exports.modules.996763.XMLHttpRequest._onHttpRequestError (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/xhr2-cookies/dist/xml-http-request.js:349:1)
at ClientRequest.<anonymous> (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/xhr2-cookies/dist/xml-http-request.js:252:47)
at Socket.socketOnEnd (_http_client.js:458:9)
at endReadableNT (_stream_readable.js:1241:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Environment
Operating System: macOS Big Sur v11.4
Truffle v5.4.0 (core: 5.4.0)
Solidity - ^0.6.2 (solc-js)
Node v12.22.1
Web3.js v1.4.0
The text was updated successfully, but these errors were encountered:
Hey @Aragar199! When you use truffle develop, Truffle internally spins up its own version of Ganache and uses that. If you want to connect to Ganache UI you should use truffle console --network <networkName> where <networkName> is the name of a network you have configured in your truffle-config.js.
Incidentally, I don't get an error when I follow your steps above. Maybe you have some other things running at those ports somehow? If you restart your computer and try again, do you still get the error?
Issue
If you try to use the Ganache UI (not ganache-cli) on its default port of 7545, and
truffle develop
at the same time, develop indicates that it is connected to a ganache instance at port 9545, even though there is no instance of ganache running at that port. Then when you runtest
, Truffle throws a Provider Error because it can't connect.Steps to Reproduce
truffle develop
in a Truffle project, observe it says that develop is connected to port 9545test
Expected Behavior
For truffle develop to spin up a new ganache instance at 9545, the default develop port, and run tests against that instance. Or, in the alternative, for develop to connect to the ganache ui running at port 7545, and indicate that this is the case.
Actual Results
run
truffle develop
, then runtest
.The error:
Environment
The text was updated successfully, but these errors were encountered: