Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

System Error when running Ganache 2.5.4 on win32 #2104

Closed
CryptoEatsTheWorld opened this issue Nov 4, 2020 · 0 comments · Fixed by #5341
Closed

System Error when running Ganache 2.5.4 on win32 #2104

CryptoEatsTheWorld opened this issue Nov 4, 2020 · 0 comments · Fixed by #5341

Comments

@CryptoEatsTheWorld
Copy link

I'm trying to run the folllowing test in truffle:

it("should accept a bet if there is enough in contract to cover it", async function(){ let instance = await CoinFlip.deployed(); await web3.eth.sendTransaction({from: accounts[0], to: "0x842F796082c5E6716B98C0d175F7C2EabE768e9b", value: web3.utils.toWei("15", "ether")}); await truffleAssert.passes(instance.bet(0, {from: accounts[1], value: web3.utils.toWei("2", "ether")}), truffleAssert.ErrorType.REVERT); });

When I do the truffle assert fails as follows:

1) Contract: CoinFlip should accept a bet if there is enough in contract to cover it: AssertionError: revert : Failed with Error: Returned error: VM Exception while processing transaction: revert Sorry, the contract cannot cover this bet. -- Reason given: Sorry, the contract cannot cover this bet.. at passes (node_modules\truffle-assertions\index.js:142:11) at processTicksAndRejections (internal/process/task_queues.js:97:5)

I then go into Ganache and attempt to click on the transaction that sent the 15 ether to the contract. When I click on this, Ganache gives the below error.


PLATFORM: win32
GANACHE VERSION: 2.5.4

EXCEPTION:

TypeError: Cannot read property 'stack' of undefined
    at IpcMainImpl.<anonymous> (C:\Program Files\WindowsApps\GanacheUI_2.5.4.0_x64__5dg5pnz03psnj\app\resources\app.asar\webpack:\src\integrations\ethereum\index.js:96:31)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant