-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Default Truffle project gives 'Expected parameter 'from' not passed to function.' error after 'truffle migrate' command #548
Default Truffle project gives 'Expected parameter 'from' not passed to function.' error after 'truffle migrate' command #548
Comments
I'm receiving the same error. Just trying to follow the truffle token tutorial.
MacOS 10.11.1 |
resolve `parameter 'from' not passed to function` error by adding default `from` parameter to `truffle.js`. fix: trufflesuite/truffle#548
@linkas45 @86me Adding a default |
This usually happens if the running node has no accounts. By default, it seems that truffle will try to deploy the contracts using the first account available, which can be manually forced using the |
@casidiablo Yes, I think you're right. The error |
@casidiablo Adding a 'from' paramater to truffle.js got me past this error. Only to open up another issue
Not sure why it's saying unknown account, because I'm currently running a testnet with a custom genesis block and an open rpc port with the specified account. I know the account exists; this is the output from an attached console:
The unknown account error I'm getting know is odd, because before I created my private network, I was getting an "insufficient gas" error using the same account, on the live network. Here is the output of truffle.js:
I've tried with and without the "0x" in front of the account number. I will keep trying, and open up a different issue if I can't figure this out. |
That sucks. Does it happen if you deploy against an official testnet? Rinkeby for example. |
@casidiablo Yes, it worked when deployed with Thanks for your help. |
@86me Can you post what your I'm trying to use the ropsten testnet:
|
@DeveloperUX This is my current
I would try removing the quotes around |
@DeveloperUX Another technique I've found helpful when getting unexpected "out of gas" error messages is to pass the properties through the constructor in
|
please update error messageVery often there are deprecation warning. A lot of old tutorials are using old syntax.
Google works well, this issue is the first result but still... Updating error message is an easy job that will save some time. |
for googlers: you may also have something else running on 8545 (like an ssh session) that truffle doesn't respond to correctly. this is the error that comes up in that case. |
@shrugs you're right, I had parity running on 8545! |
I still had the same issue despite doing as @86me suggested. It turned out I had previously created an account with
and the account was not found.
|
Thank you for raising this issue! It has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you would like to keep this issue open, please respond with information about the current state of this problem. |
I have the same problem! What is the solution?? |
Thanks for your response! This issue is no longer considered stale and someone from the Truffle team will try to respond as soon as they can. |
Does this problem still exist on Truffle v5? Thanks! |
In
Better usability, user experience, developer experience, pleaseEDIT: I've figured it out, got stuck searching for the error message. All I wanted was to debug individual test in Chrome inspector. New syntax in play:
|
Hey @marsrobertson , if I'm following correctly, you're using a v4 version of Truffle, and locally using an incompatible version of web3? Trying to grok the context of the bug you're seeing. |
Looks like this is not a thing any more. Closing this but please feel free to comment if I made a mistake! Thanks! |
If using
|
Issue
I want to create a default generated project working with Truffle. After running the commands
truffle init
,truffle compile
andtruffle migrate
I got the error:Expected parameter 'from' not passed to function.
The geth rpc is successfully running in the other window of Terminal so it's not a problem.Expected Behavior
I expect Truffle to start deploying migrations for the default Truffle project.
Actual Results
Environment
The text was updated successfully, but these errors were encountered: