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

Error: Callback was already called. #15

Open
qiluge opened this issue Apr 19, 2021 · 4 comments
Open

Error: Callback was already called. #15

qiluge opened this issue Apr 19, 2021 · 4 comments

Comments

@qiluge
Copy link

qiluge commented Apr 19, 2021

When I run yarn test, the error occured:

yarn run v1.22.10
$ yarn compile
$ yarn clean
$ rimraf ./build/
$ waffle .waffle.json
$ mocha


  PancakeERC20
    1) "before each" hook

  PancakeFactory
    2) "before each" hook

  PancakePair
    3) "before each" hook


  0 passing (360ms)
  3 failing

  1) PancakeERC20
       "before each" hook:
     Uncaught Error: Callback was already called.
      at /mnt/e/workspace/solidity/pancakeswap/pancake-swap-core/node_modules/merkle-patricia-tree/node_modules/async/lib/async.js:43:36
      at WriteStream.<anonymous> (node_modules/merkle-patricia-tree/node_modules/async/lib/async.js:358:17)
      at WriteStream.destroy (node_modules/level-ws/level-ws.js:140:8)
      at finish (internal/streams/writable.js:670:14)
      at processTicksAndRejections (internal/process/task_queues.js:80:21)
      at runNextTicks (internal/process/task_queues.js:62:3)
      at processImmediate (internal/timers.js:434:9)

  2) PancakeFactory
       "before each" hook:
     Uncaught Error: Callback was already called.
      at /mnt/e/workspace/solidity/pancakeswap/pancake-swap-core/node_modules/merkle-patricia-tree/node_modules/async/lib/async.js:43:36
      at WriteStream.<anonymous> (node_modules/merkle-patricia-tree/node_modules/async/lib/async.js:358:17)
      at WriteStream.destroy (node_modules/level-ws/level-ws.js:140:8)
      at finish (internal/streams/writable.js:670:14)
      at processTicksAndRejections (internal/process/task_queues.js:80:21)

  3) PancakePair
       "before each" hook:
     Uncaught Error: Callback was already called.
      at /mnt/e/workspace/solidity/pancakeswap/pancake-swap-core/node_modules/merkle-patricia-tree/node_modules/async/lib/async.js:43:36
      at WriteStream.<anonymous> (node_modules/merkle-patricia-tree/node_modules/async/lib/async.js:358:17)
      at WriteStream.destroy (node_modules/level-ws/level-ws.js:140:8)
      at finish (internal/streams/writable.js:670:14)
      at processTicksAndRejections (internal/process/task_queues.js:80:21)
      at runNextTicks (internal/process/task_queues.js:62:3)
      at processImmediate (internal/timers.js:434:9)




/mnt/e/workspace/solidity/pancakeswap/pancake-swap-core/node_modules/merkle-patricia-tree/node_modules/async/lib/async.js:358
                callback(err);
                ^
Error: Callback was already called.
    at /mnt/e/workspace/solidity/pancakeswap/pancake-swap-core/node_modules/merkle-patricia-tree/node_modules/async/lib/async.js:43:36
    at WriteStream.<anonymous> (/mnt/e/workspace/solidity/pancakeswap/pancake-swap-core/node_modules/merkle-patricia-tree/node_modules/async/lib/async.js:358:17)
    at WriteStream.emit (events.js:315:20)
    at WriteStream.destroy (/mnt/e/workspace/solidity/pancakeswap/pancake-swap-core/node_modules/level-ws/level-ws.js:140:8)
    at finish (internal/streams/writable.js:670:14)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
error Command failed with exit code 3.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

My nodeJS version is: v14.16.0

@Sumair-Aslam
Copy link

I am also facing same issue

@RaRedmer
Copy link

RaRedmer commented Jun 6, 2021

Same here

@RaRedmer
Copy link

RaRedmer commented Jun 9, 2021

So changing nodeJS to version 10.x or 12.x fixes this issue. Seems plausible, since the the CI GitHub-Action pipeline test only for these two versions (see https://github.com/pancakeswap/pancake-swap-core/blob/master/.github/workflows/CI.yml).

@hypermunkee
Copy link

Same issue. I'm running Node v16.2.0. I guess downgrading to 12.x is an option, but this codebase (the tests, not the contracts obviously) should really be updated since this is an active project.

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

4 participants