Printing events of a failing test returns an error, probably due to a known issue with [email protected]: https://github.com/ethereum/web3.js/issues/1916
Run truffle test with a failing test.
Emitted events to be printed.
2) Contract: DxMarketMaker
"after each" hook: after test:
Uncaught Error: Returned values aren't valid, did it run Out of Gas?
at ABICoder.decodeParameters (/usr/local/lib/node_modules/truffle/build/webpack:/~/web3-eth-abi/src/index.js:226:1)
at ABICoder.decodeLog (/usr/local/lib/node_modules/truffle/build/webpack:/~/web3-eth-abi/src/index.js:283:1)
at /usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-core/lib/testing/testrunner.js:178:1
at Array.forEach (<anonymous>)
at /usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-core/lib/testing/testrunner.js:165:1
at intermediary (/usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-core/lib/testing/testrunner.js:235:1)
at Object.1543831939525 (/usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-provider/wrapper.js:112:1)
at /usr/local/lib/node_modules/truffle/build/webpack:/~/web3-providers-ws/src/index.js:121:1
at Array.forEach (<anonymous>)
at W3CWebSocket.WebsocketProvider.connection.onmessage (/usr/local/lib/node_modules/truffle/build/webpack:/~/web3-providers-ws/src/index.js:98:1)
at W3CWebSocket._dispatchEvent [as dispatchEvent] (/usr/local/lib/node_modules/truffle/build/webpack:/~/yaeti/lib/EventTarget.js:107:1)
at W3CWebSocket.onMessage (/usr/local/lib/node_modules/truffle/build/webpack:/~/websocket/lib/W3CWebSocket.js:234:1)
at WebSocketConnection.<anonymous> (/usr/local/lib/node_modules/truffle/build/webpack:/~/websocket/lib/W3CWebSocket.js:205:1)
at WebSocketConnection.processFrame (/usr/local/lib/node_modules/truffle/build/webpack:/~/websocket/lib/WebSocketConnection.js:552:1)
at /usr/local/lib/node_modules/truffle/build/webpack:/~/websocket/lib/WebSocketConnection.js:321:34
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
truffle version): Truffle v5.0.0-beta.2 (core: 5.0.0-beta.2)node --version): v8.11.3npm --version): 6.4.1@amitkot can you install truffle@next and try this again?
npm uninstall -g truffle
npm install -g truffle@next
Published fixes today that should address the problem, please let us know! Thanks!
This is fixed in [email protected]. Thanks!
I am having Truffle v5.0.3 which has web3.version as '1.0.0-beta.37' but still getting the below error :
roiDevice:Faucet roi$ truffle migrate
Error: Returned values aren't valid, did it run Out of Gas?
at ABICoder.decodeParameters (/Users/roi/.nvm/versions/node/v10.15.1/lib/node_modules/truffle/build/webpack:/~/web3-eth-abi/src/index.js:226:1)
Can someone please help ??
I am on truffle v5.0.14 and still having this issue. Perhaps due to the fact that is still on an older web3 1.0.0-beta.37? @gnidan can we reopen please?
Will look into this! Can anyone provide reproduction steps? Thanks!
I have the same issue (Truffle v5.0.22), using Azure blockchain service.. Steps to create
Contract name (Sybr)
deployed (migrate) to blockchain
exit develop console, close terminal and reopen a new terminal
start truffle again, refer the previously deployed contract at the address.
truffle develop
Sybr.deployed('0x31728CcB2fcC6dA6527c48e2efF35AF464FA638E').then(function(instance){return instance.getName()});
returns this error
Thrown:
Error: Returned values aren't valid, did it run Out of Gas?e\build\webpack:\packages\truffle-provider\wrapper.js:112:1
Appreciate some help.
@pkankipati i believe you will have to re-migrate. IIRC, truffle develop starts a temporary chain w/o persistence. Error: Returned values aren't valid, did it run Out of Gas? typically gets thrown by web3 when an empty value is detected where _some_ value should be returned.
It’s not a temporary chain, linked to the azure blockchain service,
connected to the node.
On Tue, Jun 18, 2019 at 12:14 PM Cruz Molina notifications@github.com
wrote:
@pkankipati https://github.com/pkankipati i believe you will have to
re-migrate. IIRC, truffle develop starts a temporary chain w/o
persistence. Error: Returned values aren't valid, did it run Out of Gas?
typically gets thrown by web3 when an empty value is detected.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/trufflesuite/truffle/issues/1487?email_source=notifications&email_token=AA32WCBIBX2XJMTSPNC2YEDP3ECVDA5CNFSM4GHZG4H2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX7FBUA#issuecomment-503206096,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA32WCF7LBJO4KM5QBBH3XTP3ECVDANCNFSM4GHZG4HQ
.
@pkankipati truffle develop is specifically meant to spin up a local development chain. It _can_ connect to another chain but since it's not designed for that purpose, I imagine there's something not working right under the hood. The command you probably want that should work is truffle console.
I did use truffle console first had issues and moved to develop. As develop
can do both local and remote.
console gave the error to even connect to azure..
Anyway will try again..
On Tue, Jun 18, 2019 at 1:23 PM Cruz Molina notifications@github.com
wrote:
@pkankipati https://github.com/pkankipati truffle develop is
specifically meant to spin up a local development chain. It can connect
to another chain but since it's not designed for that purpose, I imagine
there's something not working right under the hood. The command you
probably want that should work is truffle console.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/trufflesuite/truffle/issues/1487?email_source=notifications&email_token=AA32WCEGKSXWL633B4JAJHTP3EK25A5CNFSM4GHZG4H2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX7LKCY#issuecomment-503231755,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA32WCBQA2M3FGVR3DATN5LP3EK25ANCNFSM4GHZG4HQ
.
Did truffle console output the same error? If you can, please share a project repo link for reproduction/debugging purposes.
@CruzMolina https://github.com/truffle-box/metacoin-box
and following https://www.trufflesuite.com/docs/truffle/getting-started/interacting-with-your-contracts
I got an error at let balance = await instance.getBalance(accounts[0])
truffle(development)> let balance = await instance.getBalance(accounts[0])
Thrown:
Error: Returned values aren't valid, did it run Out of Gas?
at XMLHttpRequest._onHttpResponseEnd (/usr/local/Cellar/node/12.4.0/lib/node_modules/truffle/build/webpack:/~/xhr2-cookies/dist/xml-http-request.js:318:1)
at XMLHttpRequest._setReadyState (/usr/local/Cellar/node/12.4.0/lib/node_modules/truffle/build/webpack:/~/xhr2-cookies/dist/xml-http-request.js:208:1)
at XMLHttpRequestEventTarget.dispatchEvent (/usr/local/Cellar/node/12.4.0/lib/node_modules/truffle/build/webpack:/~/xhr2-cookies/dist/xml-http-request-event-target.js:34:1)
at XMLHttpRequest.request.onreadystatechange (/usr/local/Cellar/node/12.4.0/lib/node_modules/truffle/build/webpack:/~/web3-providers-http/src/index.js:96:1)
at /usr/local/Cellar/node/12.4.0/lib/node_modules/truffle/build/webpack:/packages/truffle-provider/wrapper.js:112:1
at /usr/local/Cellar/node/12.4.0/lib/node_modules/truffle/build/webpack:/~/web3-core-requestmanager/src/index.js:147:1
at sendTxCallback (/usr/local/Cellar/node/12.4.0/lib/node_modules/truffle/build/webpack:/~/web3-eth-contract/~/web3-core-method/src/index.js:473:1)
at Method.formatOutput (/usr/local/Cellar/node/12.4.0/lib/node_modules/truffle/build/webpack:/~/web3-eth-contract/~/web3-core-method/src/index.js:163:1)
at Method.outputFormatter (/usr/local/Cellar/node/12.4.0/lib/node_modules/truffle/build/webpack:/~/web3-eth-contract/src/index.js:818:1)
at Contract._decodeMethodReturn (/usr/local/Cellar/node/12.4.0/lib/node_modules/truffle/build/webpack:/~/web3-eth-contract/src/index.js:465:1)
at ABICoder.decodeParameters (/usr/local/Cellar/node/12.4.0/lib/node_modules/truffle/build/webpack:/~/web3-eth-abi/src/index.js:226:1)
@FX-HAO This looks like a separate issue. What version of truffle are you using? Make sure to follow the steps to grab the deployed instance, grab the available accounts, and send coins before attempting to get the token balance.
With truffle console I get this error.. Even though the truffle-config.js
is good and truffle develop is able to look into it..
I'm using Azure Blockchain service..
Also, when I use truffle console with network specified, it just doesn't do
anything, just comes out without going into the console.
-- output with truffle console --network --
C:\projects\truffledemo>truffle console --network defaultnode
C:\projects\truffledemo>
--- output with truffle console ---
truffle console
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)
Truffle v5.0.22 (core: 5.0.22)
Node v12.4.0
truffle-config.js and the links are correct
var defaultnode = "https://
var alpha = "https://
var beta = "https://
var myAccount = "
var myPassword = "
NOTE: masked the private info.
module.exports = {
networks: {
defaultnode: {
provider:(() => {
const AzureBlockchainProvider = new Web3.providers.HttpProvider(defaultnode
);
const web3 = new Web3(AzureBlockchainProvider);
web3.eth.personal.unlockAccount(myAccount, myPassword,0);
return AzureBlockchainProvider;
})(),
// provider: new Web3.providers.HttpProvider(defaultnode),
network_id: "",
gas: 0,
gasPrice: 0,
from: myAccount
},
alpha: {
provider: new Web3.providers.HttpProvider(alpha),
network_id: "",
gas: 0,
gasPrice: 0
},
beta: {
provider: new Web3.providers.HttpProvider(beta),
network_id: "*",
gas: 0,
gasPrice: 0
}
}
}
On Wed, Jun 19, 2019 at 9:55 AM Cruz Molina notifications@github.com
wrote:
@FX-HAO https://github.com/FX-HAO This looks like a separate issue.
What version of truffle are you using? Make sure to follow the steps to
grab the deployed instance, grab the available accounts, and send coins
before attempting to get the token balance.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/trufflesuite/truffle/issues/1487?email_source=notifications&email_token=AA32WCH4SBMAL3RBZVI4ONLP3I3F7A5CNFSM4GHZG4H2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYB6HRQ#issuecomment-503571398,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA32WCGS5FDOPSOHAEGC4Z3P3I3F7ANCNFSM4GHZG4HQ
.
@pkankipati have you been able to complete this tutorial successfully? https://docs.microsoft.com/en-us/azure/blockchain/service/send-transaction
Hehe.. I ended up using truffle develop instead of truffle console..
Of course, it’s the basis for all Azure Blockchain Service stuff..
On Wed, Jun 19, 2019 at 10:46 AM Cruz Molina notifications@github.com
wrote:
@pkankipati https://github.com/pkankipati have you been able to
complete this tutorial successfully?
https://docs.microsoft.com/en-us/azure/blockchain/service/send-transaction—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/trufflesuite/truffle/issues/1487?email_source=notifications&email_token=AA32WCFT2WCXPHF4VNFXXZDP3JBDBA5CNFSM4GHZG4H2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYCDK4I#issuecomment-503592305,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA32WCCHBGK3JIAMX45RB3DP3JBDBANCNFSM4GHZG4HQ
.
interesting that ABS uses develop instead of console! I have yet to demo ABS w/ truffle myself, adding that to my TODO list.
I have the same issue, I my case, the reason of the error is the events with all indexed parameters, in example:
event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId);
In the ERC721 the events Transfer and Approval have all indexed parameters
Truffle actually not support this events...
You can see the error in this branch rcn-network/fixes_erc721 and here
As of 5.1.0 this problem should be fixed. If anyone is still experiencing an issue, please let us know and we'll be happy to re-open!
Most helpful comment
I am on
truffle v5.0.14and still having this issue. Perhaps due to the fact that is still on an olderweb3 1.0.0-beta.37? @gnidan can we reopen please?