embark: `embark blockchain` crashes on a new installation (Cannot read property '1' of null)

OS: Win10 Embark version: 2.4.2

Just installed embark and ran embark blockchain

Got

===============================================================================
===============================================================================
Embark Blockchain Using: Go-Ethereum (https://github.com/ethereum/go-ethereum)
===============================================================================
===============================================================================
running: geth --networkid 12301 --datadir=".embark/development/datadir" --password config/development/password account list
WARN [05-24|13:54:45] No etherbase set and no accounts found as default
already initialized
C:\Users\User\AppData\Roaming\nvm\v7.5.0\node_modules\embark\lib\cmds\blockchain\blockchain.js:79
    address = result.output.match(/{(\w+)}/)[1];
                                            ^

TypeError: Cannot read property '1' of null
    at Blockchain.initChainAndGetAddress (C:\Users\User\AppData\Roaming\nvm\v7.5.0\node_modules\embark\lib\cmds\blockchain\blockchain.js:79:45)
    at Blockchain.run (C:\Users\User\AppData\Roaming\nvm\v7.5.0\node_modules\embark\lib\cmds\blockchain\blockchain.js:50:22)
    at Object.blockchain (C:\Users\User\AppData\Roaming\nvm\v7.5.0\node_modules\embark\lib\index.js:46:16)
    at Command.<anonymous> (C:\Users\User\AppData\Roaming\nvm\v7.5.0\node_modules\embark\lib\cmd.js:97:17)
    at Command.listener (C:\Users\User\AppData\Roaming\nvm\v7.5.0\node_modules\embark\node_modules\commander\index.js:301:8)
    at emitTwo (events.js:106:13)
    at Command.emit (events.js:192:7)
    at Command.parseArgs (C:\Users\User\AppData\Roaming\nvm\v7.5.0\node_modules\embark\node_modules\commander\index.js:615:12)
    at Command.parse (C:\Users\User\AppData\Roaming\nvm\v7.5.0\node_modules\embark\node_modules\commander\index.js:458:21)
    at Cmd.process (C:\Users\User\AppData\Roaming\nvm\v7.5.0\node_modules\embark\lib\cmd.js:26:11)

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 17

Most upvoted comments

Similar to @TortuePatate, I solved it by running: geth --datadir=".embark/development/datadir" --password config/development/password account new Embark should probably run this before account list

Hi there, I’ve got exactly the same problem but I’m running on Mac OS X. I tried to tweak the config/blockchain.json file on lines 13, 24 and 35 (“account”) but to no avail.

I’ve got an account properly set up on geth but it is not recognised when using embark.

Oh lol, try sudo npm i -g embark