Closed PaulRBerg closed 4 years ago
I built the web3-wrappers package locally and added a check if transactionReceiptRpc
is a string, retrieve it a second time.
{ transactionReceiptRpc:
'0xbdf9fbe740c493d862c16683c505b376d53930a92fd105eac096d1fb286efae3' }
typeof transactionReceiptRpc string
{ secondTransactionReceiptRpc:
{ transactionHash:
'0x4279df2873a38b2f723b673ab718b54fd89a9370ee776c43506b3e71497a6fc0',
transactionIndex: '0x0',
blockHash:
'0x78ba41aac17910efadbc348ab4cc3c4f09552957ee4b92024870305304760123',
blockNumber: '0x383',
from: '0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1',
to: null,
gasUsed: '0x2c3d8b',
cumulativeGasUsed: '0x2c3d8b',
contractAddress: '0x2eade8baa5dfb5415ae4dbc203ea77ad22851133',
logs: [ [Object] ],
status: '0x1',
logsBloom:
'0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000080200000000000000000000000000000000000000000001000000000000000000000000000000005000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000800000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000',
v: '0x1b',
r:
'0xfb0aa428a9d3a69643ba57528c5cfac0072cd87025712239a13530d3c90fbb2b',
s:
'0x68892ae01cbfe4624844b77d398b50b4cd67760cf43e65dc631e327d8146a924' } }
typeof secondTransactionReceiptRpc object
It seems the value is correct then. I am not sure if this is an issue with ganache or web3-wrappers though.
I've checked ganache-cli's behavior here by running your reproduction steps and an eth_getTransactionReceipt
request for the failing hash is never received, so I don't think it's a ganache problem (could still be wrong). Please do @ me if this does end up being traced back to ganache somehow.
Many thanks @davidmurdoch! So you got a warning similar to this one:
TypeError: Cannot create property 'status' on string '0x2891e5d00a386caeafe4a35f269e2e76bc93436228cb97b06b5b6918dc31d350'
at Web3Wrapper.<anonymous> (/Users/paulrberg/Documents/Pad/0x-monorepo/packages/web3-wrapper/src/web3_wrapper.ts:237:41)
at step (/Users/paulrberg/Documents/Pad/0x-monorepo/packages/web3-wrapper/lib/src/web3_wrapper.js:43:23)
at Object.next (/Users/paulrberg/Documents/Pad/0x-monorepo/packages/web3-wrapper/lib/src/web3_wrapper.js:24:53)
at fulfilled (/Users/paulrberg/Documents/Pad/0x-monorepo/packages/web3-wrapper/lib/src/web3_wrapper.js:15:58)
at process._tickCallback (internal/process/next_tick.js:68:7)
?
Yes, I get the same error.
If you modify the test script (or start ganache-cli
on port 8545
yourself) you can pass --seed deterministic
as a start up parameter and you'll get the same transaction hash every time, which might make it a little easier to debug.
I've always been using ganache-cli
with the deterministic seed, but the hash is different. It seems I'm facing a Heisenbug.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because no activity occured in 7 days after being marked as stale. If it's still relevant - feel free to reopen. Thank you for your contributions.
Expected Behavior
Coverage should work fine in a truffle project configured by following the dev-tools-truffle-example.
Current Behavior
Getting this error:
As per https://github.com/trufflesuite/truffle/issues/2355, I'm also getting these warnings:
But I suspect they shouldn't have anything to do with this issue.
Possible Solution
Figure out what's wrong with the
transactionReceiptRpc
object in the web3_wrapper package.Steps to Reproduce (for bugs)
Your Environment