Unable to Start Discovery

(node:6639) UnhandledPromiseRejectionWarning: #
(node:6639) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:6639) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I get this error, after I install discovery and I run discovery start

Please check the following and paste the output;

  1. Check if docker runs without sudo
    docker ps

  2. check node version, I use nvm to use 11.15.0
    node --version

I fixed the issue, it wasn’t with node or docker, I was following the steps given in installation of discovery-cli where you have to install rust, there is an issue with their command, the rust command they have given is wrong, discovery doesn’t start without rustup.

https://github.com/lauraweindorf/enigma-millionaires-problem I am trying this example, all the steps worked except for npm start where I get an error.
Failed to compile, module not found error.

Good stuff, should have mentioned to check rust installation too.

What’s the rest of the error?

I figured it out the hard way, I have made a pull request to the docs, so that other’s don’t have the same issue

Failed to compile.

Module not found: Can’t resolve ‘…/build/enigma_contracts/EnigmaSimulation.json’ in ‘/home/amod/enigma-millionaires-problem/client/src/utils’

This is the error I got

If the install step worked, truffle should be installed too, please confirm with truffle version

When truffle compiles the contracts, it will output to the configured BUILD_CONTRACTS_PATH, which in your case perhaps wrongly starts with “…” so check if that’s correct too. It’s configured in the .env file.

You can also type discovery compile and check if the contracts are compiled and output there as expected.

discovery compile worked fine with no errors, I typed truffle version and I got
Truffle v5.1.26 (core: 5.1.26)
Solidity v0.5.16 (solc-js)
Node v10.20.1
Web3.js v1.2.1
This as my output.

Looks good, did you check BUILD_CONTRACTS_PATH is correct and has some .json files?

I can’t find any folder of that name

Very strange I just did the whole thing again after deleting the folder and it worked, I still don’t know how I managed to get it working, are you a core Enigma developer?

Glad you got it working! I think it’s because you ran with a faulty installation to start with, that can result in some files not being generated.

No I’m not on the team, I just try to help out here and there as part of the Enigma Collective.
The team is working heads down to bring secret contracts to the new Enigma blockchain, for now you can run smart contracts.

So in the meantime we’ve started this contracts guide to get ready for secret contracts, which won’t be radically different.
If you’re keen, please check it out and let us know what you think.

1 Like