raineorshine / solidity-repl

Ethereum Solidity REPL
ISC License
398 stars 31 forks source link

TypeError: Invalid entropy #8

Closed davux closed 7 years ago

davux commented 7 years ago

Hello, I just installed solidity-solr but I can't run it, I keep getting this message:

$ solr
C:\Users\davux\AppData\Roaming\npm\node_modules\solidity-repl\node_modules\solc\soljson.js:1
(function (exports, require, module, __filename, __dirname) { var Module;if(!Module)Module=(typeof Module!=="undefined"?Module:null)||{};var moduleOverrides={};for(var key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var ENVIRONMENT_IS_WEB=typeof window==="object";var ENVIRONMENT_IS_WORKER=typeof importScripts==="function";var ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;var ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){if(!Module["print"])Module["print"]=function print(x){process["stdout"].write(x+"\n")};if(!Module["printErr"])Module["printErr"]=function printErr(x){process["stderr"].write(x+"\n")};var nodeFS=require("fs");var nodePath=require("path");Module["read"]=function read(filename,binary){filename=nodePath["normalize"](filename);var ret

TypeError: Invalid entropy
    at Object.entropyToMnemonic (C:\Users\davux\AppData\Roaming\npm\node_modules\solidity-repl\node_modules\bip39\index.js:94:37)
    at new StateManager (C:\Users\davux\AppData\Roaming\npm\node_modules\solidity-repl\node_modules\ethereumjs-testrpc\lib\statemanager.js:45:45)
    at new GethApiDouble (C:\Users\davux\AppData\Roaming\npm\node_modules\solidity-repl\node_modules\ethereumjs-testrpc\lib\subproviders\geth_api_double.js:17:33)
    at Object.provider (C:\Users\davux\AppData\Roaming\npm\node_modules\solidity-repl\node_modules\ethereumjs-testrpc\lib\interface.js:161:25)
    at Object.provider (C:\Users\davux\AppData\Roaming\npm\node_modules\solidity-repl\node_modules\ethereumjs-testrpc\index.js:9:22)
    at Object.<anonymous> (C:\Users\davux\AppData\Roaming\npm\node_modules\solidity-repl\index.js:26:31)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Users\davux\AppData\Roaming\npm\node_modules\solidity-repl\bin.js:4:14)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
$ node --version
v6.10.2

FWIW, I'm running Windows 7.

cbruguera commented 7 years ago

Same problem here, running node v7.10.0 on Linux Ubuntu 16.04.

findcoo commented 7 years ago

ethereumjs-testrpc conflict wtih bip39. please fix correct library version.

Netherdrake commented 7 years ago

Same issue here, Arch Linux

stanishev commented 7 years ago

@findcoo thanks for the pointer.

one way to work around the error (after installing solr): npm install -g ethereumjs-testrpc get the latest ethereumjs-testrpc cp -r /usr/local/lib/node_modules/ethereumjs-testrpc /usr/local/lib/node_modules/solidity-repl/node_modules/ copy the directory over to where solr looks for it.

bonedaddy commented 7 years ago

Issue still persists however stanishev's comment worked

maooricio commented 7 years ago

Solution here: https://github.com/ethereumjs/testrpc/issues/313

rojotek commented 7 years ago

I can confirm that the workaround from @stanishev works on MacOS as well. It would be great to see the PR merged in. @raineorshine is there anything we can do to help?

raineorshine commented 7 years ago

Thanks @rojotek! I must have missed the previous message. Published in v0.3.0.