MyService.deployed().then(function(instance) { meta = instance; meta.allocate.sendTransacti
on("0xf17f52151ebef6c7334fad080c5704d77216b732",20,{from: "0x627306090abab3a6e1400e9345bc60c78a8bef57"});})
throws below error
TypeError: Cannot read property 'match' of undefined
at parse (C:UsersjambugAppDataRoamingnpmnode_modulestrufflebuildwebpack:~yargs~yargs-parserindex.js:125:
1)
at Function.Parser.detailed (C:UsersjambugAppDataRoamingnpmnode_modulestrufflebuildwebpack:~yargs~yargs-p
arserindex.js:761:1)
at Object.Yargs.self._parseArgs (C:UsersjambugAppDataRoamingnpmnode_modulestrufflebuildwebpack:~yargsyargs
.js:938:1)
at Object.Yargs.self.parse (C:UsersjambugAppDataRoamingnpmnode_modulestrufflebuildwebpack:~yargsyargs.js:5
32:1)
But, the same is executed successfully from test.js file
truffle version): Truffle v4.1.11 (core: 4.1.11)node --version): v7.4.0npm --version): 5.5.1@gunvant I wasn't able to reproduce this on my own and your example is specific to your project. It's hard to tell what's causing the error.
If you have a chance could you provide reproduction steps - e.g. a simple example of a call sequence that succeeds in a test but triggers this error in the console?
Could you also specify whether you're running truffle console or truffle develop?
Das liegt wahrscheinlich das ich Clone Repo habe Datei Crash wie korrigiere
ich das Beispiel auf der haubt Seite habe ich 2 mal web3 angezeigt einmal
mit mein Profil und Original aber wenn ich drauf gehe zeigt mir eine und
die selbe Seite gipst da ein Plan?
Am 17.06.2018 04:22 schrieb "c-g-e-w-e-k-e->" notifications@github.com:
@gunvant https://github.com/gunvant I wasn't able to reproduce this on my
own and your example is specific to your project. It's hard to tell what's
causing the error.
If you have a chance could you provide reproduction steps - e.g. a simple
example of a call sequence that succeeds in a test but triggers this error
in the console?
Could you also specify whether you're running truffle console or truffle
develop?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/trufflesuite/truffle/issues/1005#issuecomment-397850080,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AmQoEGm2xlae-x1aU8hHgUqLwieb6URjks5t9b1wgaJpZM4UmN3B
.
Closing for house-keeping, please ping if you continue to see this. A reproduction case would be really helpful here as well.
There definitely is an issue with the way Truffle console parses contract function calls.
Here is a simple project (https://d.pr/f/AwkhIa) that you can migrate to Ganache with:
truffle migrate --compile-all --reset --network ganache
Then:
$ truffle console
truffle(ganache)> ChainList.deployed().then(function(instance){app = instance;})
truffle(ganache)> app.sellArticle("iPhone 7", "Selling in order to buy iPhone 8", web3.toWei(3, "ether"),{from: web3.eth.accounts[1]})
TypeError: Cannot read property 'match' of undefined
at TTY.onread (net.js:597:20)
at ReadStream.Readable.push (_stream_readable.js:208:10)
at readableAddChunk (_stream_readable.js:250:11)
at addChunk (_stream_readable.js:263:12)
at ReadStream.emit (events.js:211:7)
at emitOne (events.js:116:13)
at ReadStream.onData (readline.js:1010:36)
at emitKeys.next (<anonymous>)
at emitKeys (internal/readline.js:420:14)
at ReadStream.emit (events.js:214:7)
at emitTwo (events.js:126:13)
at ReadStream.onkeypress (readline.js:158:10)
at REPLServer.self._ttyWrite (repl.js:537:7)
at REPLServer.Interface._ttyWrite (readline.js:910:14)
at REPLServer.Interface._line (readline.js:629:8)
at REPLServer.Interface._onLine (readline.js:280:10)
at REPLServer.emit (events.js:211:7)
at emitOne (events.js:116:13)
at REPLServer.onLine (repl.js:468:10)
at REPLServer.runBound [as eval] (domain.js:314:12)
at bound (domain.js:301:14)
at ReplManager.interpret (/usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-core/lib/repl.js:119:1)
at Console.interpret (/usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-core/lib/console.js:140:1)
at Command.getCommand (/usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-core/lib/command.js:18:1)
at Object.Yargs.self.parse (/usr/local/lib/node_modules/truffle/build/webpack:/~/yargs/yargs.js:532:1)
at Object.Yargs.self._parseArgs (/usr/local/lib/node_modules/truffle/build/webpack:/~/yargs/yargs.js:938:1)
at Function.Parser.detailed (/usr/local/lib/node_modules/truffle/build/webpack:/~/yargs-parser/index.js:761:1)
at parse (/usr/local/lib/node_modules/truffle/build/webpack:/~/yargs-parser/index.js:125:1)
truffle(ganache)> app.sellArticle("iPhone 7", "Selling in order to buy iPhone 8", web3.toWei(3, "ether"),{from: web3.eth.accounts[1]})
{ tx: '0xf6544b02f37541f991b9d42e715d2c5cd76a6da94cf3e6a1856e52c5dc53e4d0',
receipt:
{ transactionHash: '0xf6544b02f37541f991b9d42e715d2c5cd76a6da94cf3e6a1856e52c5dc53e4d0',
transactionIndex: 0,
blockHash: '0xc98649f0c70842aefa74d62815d5df45d7b49ba2ee54ded27b3713132db4c45c',
blockNumber: 45,
gasUsed: 127451,
cumulativeGasUsed: 127451,
contractAddress: null,
logs: [],
status: '0x1',
logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' },
logs: [] }
Notice how, in the first attempt, there are 2 spaces after each parameter passed to the function. And in the second call, there is only one space. That's the only difference, and it seems to me like it should not be a meaningful one. The workaround is easy, but still, I think a little more permissiveness can't hurt here.
By the way, I reproduced that with Truffle 4.1.14, but my students seem to have that issue with Truffle 4.0.4 and 4.0.7 too.
Have the same.
same here with:
Truffle v5.0.19 (core: 5.0.19)
Solidity - 0.5.8 (solc-js)
Node v8.10.0
Web3.js v1.0.0-beta.37
fail with:
let token = await TestToken.at('0xeFF9429FD58883F168C48Bd9c5Af6f0d79411D20')
TypeError: Cannot read property 'match' of undefined
at ReadStream.onData (readline.js:1011:36)
at emitKeys.next (<anonymous>)
at emitKeys (internal/readline.js:420:14)
at ReadStream.emit (events.js:214:7)
at emitTwo (events.js:126:13)
at ReadStream.onkeypress (readline.js:160:10)
at REPLServer.self._ttyWrite (repl.js:537:7)
at REPLServer.Interface._ttyWrite (readline.js:911:14)
at REPLServer.Interface._line (readline.js:631:8)
at REPLServer.Interface._onLine (readline.js:282:10)
at REPLServer.emit (events.js:211:7)
at emitOne (events.js:116:13)
at REPLServer.onLine (repl.js:468:10)
at REPLServer.runBound [as eval] (domain.js:314:12)
at bound (domain.js:301:14)
...
ok with:
let token = await TestToken.at('0xeFF9429FD58883F168C48Bd9c5Af6f0d79411D20')
the only difference is the whitespace between token and =:
let token =
Same issue here for:
Ganache CLI v6.5.0 (ganache-core: 2.6.0)
Truffle v5.0.28 (core: 5.0.28)
Solidity - 0.5.8 (solc-js)
Node v8.11.1
Web3.js v1.0.0-beta.37
Most helpful comment
There definitely is an issue with the way Truffle console parses contract function calls.
Here is a simple project (https://d.pr/f/AwkhIa) that you can migrate to Ganache with:
truffle migrate --compile-all --reset --network ganacheThen:
Notice how, in the first attempt, there are 2 spaces after each parameter passed to the function. And in the second call, there is only one space. That's the only difference, and it seems to me like it should not be a meaningful one. The workaround is easy, but still, I think a little more permissiveness can't hurt here.
By the way, I reproduced that with Truffle 4.1.14, but my students seem to have that issue with Truffle 4.0.4 and 4.0.7 too.