sidetree.js icon indicating copy to clipboard operation
sidetree.js copied to clipboard

WARNING: The MNEMONIC variable is not set. Defaulting to a blank string.

Open devrajsinghrawat opened this issue 3 years ago • 6 comments

When I am starting the docker-compose then the mnemonic does not picked from .env file as mentioned in comment in docker compose file.

  # This env variable comes from the .env file in the directory in which the
  # docker-compose command is run. Here it will be ./packages/sidetree-ledger-ethereum
Screenshot 2021-08-10 at 13 30 18

and due to that every time, when the container is being restarted a new set of keys are being assigned.

I am starting the container, just by right click on the docker-compose in vscode by selecting "Compose up" option.

devrajsinghrawat avatar Aug 10 '21 11:08 devrajsinghrawat

I would like to add here that this only occuers when I start the container directly using docker-compose file .. But when these containers are started using PreTest that time it picks the env variables correctly.

i.e. if I run

npm run test:only @sidetree/element

then it ll internally call pretest "pretest": "docker-compose up -d mongo ganache ipfs",

and picks up correct mnemonics.

devrajsinghrawat avatar Aug 11 '21 09:08 devrajsinghrawat

hmm, seems like we probably need to separate the docker compose files so that running a local node is easier.

OR13 avatar Sep 07 '21 22:09 OR13

I ll let it open so that you can close it, when it done in future releases

devrajsinghrawat avatar Sep 28 '21 09:09 devrajsinghrawat

I think I've seen this when starting up a server. Want to see if it's happening, and why it's happening, because the seed should be defined in the configuration file.

BenjaminMoe avatar Dec 23 '21 16:12 BenjaminMoe

Taking some notes, it looks like this error can be reproduced by running the test for the cas-ipfs module.

> @sidetree/[email protected] pretest ~/Github/sidetree.js/packages/cas-ipfs
> docker-compose up -d ipfs mongo

WARNING: The MNEMONIC variable is not set. Defaulting to a blank string.
sidetreejs_ipfs_1 is up-to-date
sidetreejs_mongo_1 is up-to-date

> @sidetree/[email protected] test ~/Github/sidetree.js/packages/cas-ipfs
> tsdx test --passWithNoTests

So we need to track down where that warning is coming from, and if it's needed or not.

BenjaminMoe avatar Dec 24 '21 12:12 BenjaminMoe

This should be defaulted to an example.

OR13 avatar Jan 19 '22 19:01 OR13