0

I'm running Geth in dev mode locally, like this:

geth --ipcpath test-chain-directory/geth.ipc --datadir test-chain-directory --dev --rpc --rpccorsdomain "*" console

I can send a transaction from the console, and it works, but when I connect MetaMask to http://localhost:8545, sending a transaction from one account to another fails.

I've made sure to run miner.start() before sending the transaction, but it fails in MetaMask with the following error:

Error: [ethjs-rpc] rpc error with payload {"id":3105471441522,"jsonrpc":"2.0","params":["0x...."],"method":"eth_sendRawTransaction"} Error: invalid sender

The account I'm sending from was one I created via the console, and funded with Eth, before importing into MetaMask, and MetaMask show's balance correctly.

What am I missing?

0

This comment by skozin and the files in the repo he provided help me to fix the problem:

https://github.com/MetaMask/metamask-extension/issues/2015#issuecomment-345405915

Basically, make sure to set in the genesis.conf :

eip155Block:0 and chainId equals to the networkId (used with geth)

  • That seems to work - I was using Geth with the 'dev' flag to avoid needing a genesis block and a DAG etc. – simbro Feb 9 '18 at 13:11
1
  • Step First: This comment by skozin and the files in the repo he provided help me to fix the problem:

    https://github.com/MetaMask/metamask-extension/issues/2015#issuecomment-345405915

    Basically, make sure to set in the genesis.conf :

    eip155Block:0 and chainId equals to the networkId (used with geth)

  • Step Second: if you had fixed the problem mentioned above (the problem mentioned in Step First), then it Most likely is you start local network in a wrong way like:

geth --ipcpath test-chain-directory/geth.ipc --datadir test-chain-directory --dev --rpc --rpccorsdomain "*" console

you should cut the --dev off! Because using Geth with the 'dev' flag to avoid needing a genesis block and a DAG, you should start your local network Like below:

geth --ipcpath test-chain-directory/geth.ipc --datadir test-chain-directory --rpc --rpccorsdomain "*" 

Good luck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.