Skip to content
This repository has been archived by the owner on Nov 15, 2021. It is now read-only.

Node 14 - ganache-core - Error: Callback was already called. #123

Open
abcoathup opened this issue Jun 11, 2020 · 2 comments
Open

Node 14 - ganache-core - Error: Callback was already called. #123

abcoathup opened this issue Jun 11, 2020 · 2 comments

Comments

@abcoathup
Copy link
Contributor

abcoathup commented Jun 11, 2020

OpenZeppelin Test Environment fails on node 14 with ganache-core error: Error: Callback was already called

node --version v14.4.0
npm --version 6.14.5
npx oz --version 2.8.2

To reproduce follow Learn guides tutorial using node 14 (https://docs.openzeppelin.com/learn/writing-automated-tests#writing-unit-tests)

$ npm test

> [email protected] test /home/abcoathup/projects/forum/testenv
> mocha --exit --recursive test



  Box

/home/abcoathup/projects/forum/testenv/node_modules/ganache-core/node_modules/merkle-patricia-tree/node_modules/async/lib/async.js:358
                callback(err);
                ^
Error: Callback was already called.
    at /home/abcoathup/projects/forum/testenv/node_modules/ganache-core/node_modules/merkle-patricia-tree/node_modules/async/lib/async.js:43:36
    at WriteStream.<anonymous> (/home/abcoathup/projects/forum/testenv/node_modules/ganache-core/node_modules/merkle-patricia-tree/node_modules/async/lib/async.js:358:17)
    at WriteStream.emit (events.js:315:20)
    at WriteStream.destroy (/home/abcoathup/projects/forum/testenv/node_modules/ganache-core/node_modules/level-ws/level-ws.js:140:8)
    at finish (_stream_writable.js:658:14)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)

Reported in the community forum: https://forum.openzeppelin.com/t/testing-with-node-14-ganache-core-errors-with-callback-was-already-called/3068

Workaround is to use an earlier version of node such as node 10 or node 12.

@abcoathup
Copy link
Contributor Author

Open issue: trufflesuite/ganache#568

@sc0Vu
Copy link

sc0Vu commented Oct 31, 2021

Install the beta version of ganache-core works for me (from the issue trufflesuite/ganache#568).

npm install ganache-core@beta -E

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants