Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while running npm test #5

Closed
relaxbao opened this issue Apr 16, 2020 · 1 comment
Closed

Error while running npm test #5

relaxbao opened this issue Apr 16, 2020 · 1 comment

Comments

@relaxbao
Copy link

Hello, first of all thank you for providing such a good tool so that I don't have to know too much about the principles of MPC and can try to use it。

but when I run it, I find that there is an error, after searching no problem, hope to get your help, thanks

➜  jigg npm test

> jigg@1.0.0 test ~/workspace/jigg
> mocha test/test.js --timeout 120000



  Exhaustive regular server: logic-and-4-bit.txt
    ✓ Inputs 00 00 (1337ms)
    ✓ Inputs 00 01 (327ms)
    ✓ Inputs 00 10 (326ms)
    ✓ Inputs 00 11 (333ms)
    ✓ Inputs 01 00 (335ms)
    ✓ Inputs 01 01 (325ms)
    ✓ Inputs 01 10 (326ms)
    ✓ Inputs 01 11 (324ms)
    ✓ Inputs 10 00 (332ms)
    ✓ Inputs 10 01 (333ms)
    ✓ Inputs 10 10 (359ms)
    ✓ Inputs 10 11 (340ms)
    ✓ Inputs 11 00 (341ms)
    ✓ Inputs 11 01 (342ms)
    ✓ Inputs 11 10 (343ms)
    ✓ Inputs 11 11 (342ms)

  SHA256 Garbling Server
    1) Input 0
stderr in node [ 'demo/server.js',
  '3001',
  'Garbler',
  '000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F',
  'hex',
  'sha-256-reverse.txt',
  'false' ]
events.js:167
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE :::3001
    at Server.setupListenHandle [as _listen2] (net.js:1286:14)
    at listenInCluster (net.js:1334:12)
    at Server.listen (net.js:1421:7)
    at Object.<anonymous> (/Users/linfang/workspace/prove/jigg-master/demo/server.js:21:12)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
Emitted 'error' event at:
    at emitErrorNT (net.js:1313:8)
    at process._tickCallback (internal/process/next_tick.js:63:19)
    at Function.Module.runMain (internal/modules/cjs/loader.js:744:11)
    at startup (internal/bootstrap/node.js:285:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)

stderr in node [ 'demo/server.js',
  '3001',
  'Garbler',
  '0000000000000000000000000000000000000000000000000000000000000000',
  'hex',
  'sha-256-reverse.txt',
  'false' ]
events.js:173
    throw err; // Unhandled 'error' event
    ^

Error [ERR_UNHANDLED_ERROR]: Unhandled error. (Role already taken!)
    at Socket.emit (events.js:171:17)
    at Socket.emit (~/workspace/jigg/node_modules/socket.io/lib/socket.js:142:10)
    at Server.join (~/workspace/jigg/src/jiggServer.js:52:12)
    at Socket.emit (events.js:182:13)
    at~/workspace/jigg/node_modules/socket.io/lib/socket.js:528:12
    at process._tickCallback (internal/process/next_tick.js:61:11)
@wyatt-howe
Copy link
Member

For reference, the tests communicate over port 3001, and the default client-server communications are on port 3000. It looks like an old instance of mocha (jigg server + two jigg clients) was still left running and caused those two errors. If this is not the case, please follow up on this in a new issue.

Thanks for trying out JIGG!

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

No branches or pull requests

2 participants