ethereum / mist

[DEPRECATED] Mist. Browse and use Ðapps on the Ethereum network.
http://ethereum.org
GNU General Public License v3.0
7.44k stars 2.12k forks source link

Testrpc issue with Mist #2131

Closed mariam-crissi closed 6 years ago

mariam-crissi commented 7 years ago

I have developed a dapp.I am trying to run the dapp using Mist and testrpc.

Steps to Reproduce

  1. Start testrpc
  2. Start mist with --rpc localhost:8545
  3. Select any account and try to send ether

Current Behavior

I have opened the dapp using localhost:8080..It shows the dapp home page...But while I am trying to send a transaction it returns out of gas exception...

It seems this transaction will fail. If you submit it, it may consume all the gas you send.

and

Estimated fee consumption: We couldn't estimate the gas.

In the console it prints the following.

[2017-04-11 15:27:27.948] [INFO] (ui: browser) - Connect to node...
[2017-04-11 15:43:21.082] [INFO] (ui: browser) - Trivandrum
[2017-04-11 15:43:21.087] [INFO] (ui: browser) - Chennai
[2017-04-11 15:43:21.088] [INFO] (ui: browser) - 2
[2017-04-11 15:43:21.092] [INFO] (ui: browser) - 2017-04-13
[2017-04-11 15:43:21.093] [INFO] (ui: browser) - 12:00
[2017-04-11 15:43:21.093] [INFO] (ui: browser) - Function - userValidation
[2017-04-11 15:43:21.094] [INFO] (ui: browser) - Function - userDateTimeCreator
[2017-04-11 15:43:21.094] [INFO] (ui: browser) - DateTime for input 2017-04-13 09:00:00
[2017-04-11 15:43:21.095] [INFO] (ui: browser) - Function-distanceRetrieval
[2017-04-11 15:43:21.095] [INFO] (ui: browser) - Trivandrum|Chennai
[2017-04-11 15:43:21.124] [INFO] (ui: browser) - Initializing distanceRetrieval function
[2017-04-11 15:43:21.154] [INFO] method/eth_sendTransaction - Ask user for password
[2017-04-11 15:43:21.154] [INFO] method/eth_sendTransaction - { from: '0x0d1b50c4cbe8e19ae5f08c04ff36581eb77a31b1',
  gas: '0x2dc6c0',
  value: '0xde0b6b3a7640000',
  to: '0xca10adf31afd5e05d3491ca67f13b9e1d2f5589d',
  data: '0x0f77c48c0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001254726976616e6472756d7c4368656e6e61690000000000000000000000000000' }
[2017-04-11 15:43:21.195] [INFO] Windows - Create popup window: sendTransactionConfirmation
[2017-04-11 15:43:21.196] [INFO] Windows - Create secondary window: sendTransactionConfirmation, owner: notset
[2017-04-11 15:43:21.251] [INFO] (ui: browser) - Initializing weatherconditionRetrieval function
[2017-04-11 15:43:21.280] [INFO] method/eth_sendTransaction - Ask user for password
[2017-04-11 15:43:21.281] [INFO] method/eth_sendTransaction - { from: '0x0d1b50c4cbe8e19ae5f08c04ff36581eb77a31b1',
  gas: '0x2dc6c0',
  value: '0xde0b6b3a7640000',
  to: '0xca10adf31afd5e05d3491ca67f13b9e1d2f5589d',
  data: '0x2bb7205d0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000074368656e6e6169000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013323031372d30342d31332030393a30303a303000000000000000000000000000' }
[2017-04-11 15:43:21.285] [INFO] Windows - Create popup window: sendTransactionConfirmation
[2017-04-11 15:43:22.224] [INFO] Sockets/7 - Connect to {"hostPort":"localhost:8545"}
[2017-04-11 15:43:22.230] [INFO] Sockets/7 - Connected!
[2017-04-11 15:43:23.537] [INFO] (ui: popupWindow) - Web3 already initialized, re-using provider.
[2017-04-11 15:43:23.874] [ERROR] ipcProviderBackend - Send request failed { message: 'Error: tx has a higher gas limit than the block\n    at VM.module.exports [as runTx] (/home/toshiba/.nvm/versions/node/v6.9.1/lib/node_modules/ethereumjs-testrpc/node_modules/ethereumjs-vm/lib/runTx.js:35:8)\n    at VmSubprovider.runVm (/home/toshiba/.nvm/versions/node/v6.9.1/lib/node_modules/ethereumjs-testrpc/node_modules/web3-provider-engine/subproviders/vm.js:106:6)\n    at VmSubprovider.handleRequest (/home/toshiba/.nvm/versions/node/v6.9.1/lib/node_modules/ethereumjs-testrpc/node_modules/web3-provider-engine/subproviders/vm.js:45:8)\n    at next (/home/toshiba/.nvm/versions/node/v6.9.1/lib/node_modules/ethereumjs-testrpc/node_modules/web3-provider-engine/index.js:95:18)\n    at GethDefaults.handleRequest (/home/toshiba/.nvm/versions/node/v6.9.1/lib/node_modules/ethereumjs-testrpc/lib/subproviders/gethdefaults.js:34:5)\n    at next (/home/toshiba/.nvm/versions/node/v6.9.1/lib/node_modules/ethereumjs-testrpc/node_modules/web3-provider-engine/index.js:95:18)\n    at FilterSubprovider.handleRequest (/home/toshiba/.nvm/versions/node/v6.9.1/lib/node_modules/ethereumjs-testrpc/node_modules/web3-provider-engine/subproviders/filters.js:87:7)\n    at next (/home/toshiba/.nvm/versions/node/v6.9.1/lib/node_modules/ethereumjs-testrpc/node_modules/web3-provider-engine/index.js:95:18)\n    at DelayedBlockFilter.handleRequest (/home/toshiba/.nvm/versions/node/v6.9.1/lib/node_modules/ethereumjs-testrpc/lib/subproviders/delayedblockfilter.js:27:3)\n    at next (/home/toshiba/.nvm/versions/node/v6.9.1/lib/node_modules/ethereumjs-testrpc/node_modules/web3-provider-engine/index.js:95:18)',
  code: -32000 }
[2017-04-11 15:43:24.121] [INFO] (ui: popupWindow) - Estimated gas:  null {}
[2017-04-11 15:43:24.172] [ERROR] ipcProviderBackend - Send request failed { message: 'Error: tx has a higher gas limit than the block\n    at VM.module.exports [as runTx] (/home/toshiba/.nvm/versions/node/v6.9.1/lib/node_modules/ethereumjs-testrpc/node_modules/ethereumjs-vm/lib/runTx.js:35:8)\n    at VmSubprovider.runVm (/home/toshiba/.nvm/versions/node/v6.9.1/lib/node_modules/ethereumjs-testrpc/node_modules/web3-provider-engine/subproviders/vm.js:106:6)\n    at VmSubprovider.handleRequest (/home/toshiba/.nvm/versions/node/v6.9.1/lib/node_modules/ethereumjs-testrpc/node_modules/web3-provider-engine/subproviders/vm.js:45:8)\n    at next (/home/toshiba/.nvm/versions/node/v6.9.1/lib/node_modules/ethereumjs-testrpc/node_modules/web3-provider-engine/index.js:95:18)\n    at GethDefaults.handleRequest (/home/toshiba/.nvm/versions/node/v6.9.1/lib/node_modules/ethereumjs-testrpc/lib/subproviders/gethdefaults.js:34:5)\n    at next (/home/toshiba/.nvm/versions/node/v6.9.1/lib/node_modules/ethereumjs-testrpc/node_modules/web3-provider-engine/index.js:95:18)\n    at FilterSubprovider.handleRequest (/home/toshiba/.nvm/versions/node/v6.9.1/lib/node_modules/ethereumjs-testrpc/node_modules/web3-provider-engine/subproviders/filters.js:87:7)\n    at next (/home/toshiba/.nvm/versions/node/v6.9.1/lib/node_modules/ethereumjs-testrpc/node_modules/web3-provider-engine/index.js:95:18)\n    at DelayedBlockFilter.handleRequest (/home/toshiba/.nvm/versions/node/v6.9.1/lib/node_modules/ethereumjs-testrpc/lib/subproviders/delayedblockfilter.js:27:3)\n    at next (/home/toshiba/.nvm/versions/node/v6.9.1/lib/node_modules/ethereumjs-testrpc/node_modules/web3-provider-engine/index.js:95:18)',
  code: -32000 }
[2017-04-11 15:43:24.251] [INFO] (ui: popupWindow) - Estimated gas:  null {}

Any idea

luclu commented 7 years ago

What version of Mist do you use? Also you might need to specify the protocol. Try to use mist --rpc http://localhost:8454 instead of mist --rpc localhost:8454.

mariam-crissi commented 7 years ago

Mist version is 0.8.9 Let me try using this command

mariam-crissi commented 7 years ago

I am running mist with testrpc...Instead of using this command mist --rpc localhost:8454 I have used this command mist --rpc http://localhost:8454...But it generates the following error...

Node type: geth
Network: test
Platform: linux (Architecure x64)

...blockchain.go:219] Last header: #1923 [9caecefb…] TD=1911668707
I0412 10:24:11.901806 core/blockchain.go:220] Last block: #1923 [9caecefb…] TD=1911668707
I0412 10:24:11.901823 core/blockchain.go:221] Fast block: #1923 [9caecefb…] TD=1911668707
I0412 10:24:11.902051 eth/handler.go:119] blockchain not empty, fast sync disabled
I0412 10:24:11.903528 p2p/server.go:340] Starting Server
I0412 10:24:14.418540 p2p/nat/nat.go:111] mapped network port udp:30303 -> 30303 (ethereum discovery) using UPNP IGDv1-IP1
I0412 10:24:14.551491 p2p/discover/udp.go:227] Listening, enode://4a051fed22cf99b581195d5587eded33ceeb1bcdeb038ea5534d14dd1d593ff73e8a5c0e2bdf49e35e903c1afcbb3709f0a921d1c9170851932a2e1d5c8090c5@117.221.189.226:30303
I0412 10:24:14.551971 p2p/server.go:608] Listening on [::]:30303
I0412 10:24:14.556553 node/node.go:341] IPC endpoint opened: /home/toshiba/.ethereum/geth.ipc
I0412 10:24:14.941739 p2p/nat/nat.go:111] mapped network port tcp:30303 -> 30303 (ethereum p2p) using UPNP IGDv1-IP1
mariam-crissi commented 7 years ago

I have also tried the truffle framework's deafult Metacoin dapp...It also have this out of gas issue...

normanargiolas commented 7 years ago

Hi, I'm new with smart contract.

I have the same problem with mist 0.8.9 and testrpc running with intellij from start npm configutration. I have tryed to update the package.json dependencies in testrpc but I obtain the same error. For create and deploy a contract I think that we have to add payable function with the last solidity version but I can't understand why this error happens also with the transaction. This is the mist log:

[2017-04-13 00:30:12.903] [ERROR] ipcProviderBackend - Send request failed { message: 'Error: tx has a higher gas limit than the block\n    at VM.module.exports [as runTx] (/home/norman/blockchain/testrpc/node_modules/ethereumjs-vm/lib/runTx.js:35:8)\n    at VmSubprovider.runVm (/home/norman/blockchain/testrpc/node_modules/web3-provider-engine/subproviders/vm.js:106:6)\n    at VmSubprovider.handleRequest (/home/norman/blockchain/testrpc/node_modules/web3-provider-engine/subproviders/vm.js:45:8)\n    at next (/home/norman/blockchain/testrpc/node_modules/web3-provider-engine/index.js:95:18)\n    at GethDefaults.handleRequest (/home/norman/blockchain/testrpc/lib/subproviders/gethdefaults.js:34:5)\n    at next (/home/norman/blockchain/testrpc/node_modules/web3-provider-engine/index.js:95:18)\n    at FilterSubprovider.handleRequest (/home/norman/blockchain/testrpc/node_modules/web3-provider-engine/subproviders/filters.js:87:7)\n    at next (/home/norman/blockchain/testrpc/node_modules/web3-provider-engine/index.js:95:18)\n    at DelayedBlockFilter.handleRequest (/home/norman/blockchain/testrpc/lib/subproviders/delayedblockfilter.js:27:3)\n    at next (/home/norman/blockchain/testrpc/node_modules/web3-provider-engine/index.js:95:18)',
  code: -32000 }
[2017-04-13 00:30:13.044] [INFO] (ui: popupWindow) - Estimated gas:  null {}

Thanks for any help

szerintedmi commented 7 years ago

I've the same issue with Mist 0.8.10 If I try the same contract using Metamask, it works. It also works with Mist if I try it on Privatenet. Mist log:

[2017-05-22 02:03:41.009] [ERROR] ipcProviderBackend - Send request failed Transaction not confirmed
[2017-05-22 02:03:41.057] [ERROR] (ui: browser) - {}
[2017-05-22 02:03:43.758] [INFO] (ui: mist) - did-navigate 8Htgud5p8W5SnGLS2 http://localhost:8080/
[2017-05-22 02:03:43.774] [INFO] Sockets/2 - Disconnecting...
[2017-05-22 02:03:43.838] [INFO] Sockets/2 - Connect to {"hostPort":"http://localhost:8545"}
[2017-05-22 02:03:43.843] [INFO] Sockets/2 - Connected!
[2017-05-22 02:03:44.351] [INFO] Sockets/4 - Disconnecting...
[2017-05-22 02:03:44.622] [INFO] (ui: mist) - dom-ready 8Htgud5p8W5SnGLS2 http://localhost:8080/
[2017-05-22 02:03:44.633] [WARN] (ui: browser) - Using web3 detected from external source. If you find that your accounts don't appear or you have 0 balance, ensure you've configured that source properly. If using MetaMask, see the following link.  http://truffleframework.com/tutorials/truffle-and-metamask
[2017-05-22 02:03:44.637] [INFO] Sockets/4 - Connect to {"hostPort":"http://localhost:8545"}
[2017-05-22 02:03:44.641] [INFO] Sockets/4 - Connected!
[2017-05-22 02:03:44.688] [INFO] (ui: mist) - did-stop-loading 8Htgud5p8W5SnGLS2 http://localhost:8080/
[2017-05-22 02:03:44.955] [INFO] (ui: browser) - msg sender: 0x76e7a0aec3e43211395bbbb6fa059bd6750f83c3
[2017-05-22 02:03:57.770] [INFO] method/eth_sendTransaction - Ask user for password
[2017-05-22 02:03:57.770] [INFO] method/eth_sendTransaction - { from: '0x76e7a0aec3e43211395bbbb6fa059bd6750f83c3',
  value: '0xde0b6b3a7640000',
  gas: '0x30d40',
  to: '0xd3ef19679c2dbbf3b8e2077c61b88f5e9c6178eb',
  data: '0x0926e6a20000000000000000000000000000000000000000000000000000000000000001' }
[2017-05-22 02:03:57.773] [INFO] Windows - Create popup window: sendTransactionConfirmation
[2017-05-22 02:03:57.773] [INFO] Windows - Create secondary window: sendTransactionConfirmation, owner: notset
[2017-05-22 02:03:58.304] [INFO] Sockets/12 - Connect to {"hostPort":"http://localhost:8545"}
[2017-05-22 02:03:58.309] [INFO] Sockets/12 - Connected!
[2017-05-22 02:03:58.966] [INFO] (ui: popupWindow) - Web3 already initialized, re-using provider.
[2017-05-22 02:03:59.050] [INFO] (ui: popupWindow) - Meteor starting up...
[2017-05-22 02:03:59.177] [ERROR] ipcProviderBackend - Send request failed { message: 'Error: tx has a higher gas limit than the block\n    at VM.module.exports [as runTx] (/usr/local/lib/node_modules/ethereumjs-testrpc/node_modules/ethereumjs-vm/lib/runTx.js:35:8)\n    at VmSubprovider.runVm (/usr/local/lib/node_modules/ethereumjs-testrpc/node_modules/web3-provider-engine/subproviders/vm.js:106:6)\n    at VmSubprovider.handleRequest (/usr/local/lib/node_modules/ethereumjs-testrpc/node_modules/web3-provider-engine/subproviders/vm.js:45:8)\n    at next (/usr/local/lib/node_modules/ethereumjs-testrpc/node_modules/web3-provider-engine/index.js:95:18)\n    at GethDefaults.handleRequest (/usr/local/lib/node_modules/ethereumjs-testrpc/lib/subproviders/gethdefaults.js:34:5)\n    at next (/usr/local/lib/node_modules/ethereumjs-testrpc/node_modules/web3-provider-engine/index.js:95:18)\n    at FilterSubprovider.handleRequest (/usr/local/lib/node_modules/ethereumjs-testrpc/node_modules/web3-provider-engine/subproviders/filters.js:87:7)\n    at next (/usr/local/lib/node_modules/ethereumjs-testrpc/node_modules/web3-provider-engine/index.js:95:18)\n    at DelayedBlockFilter.handleRequest (/usr/local/lib/node_modules/ethereumjs-testrpc/lib/subproviders/delayedblockfilter.js:27:3)\n    at next (/usr/local/lib/node_modules/ethereumjs-testrpc/node_modules/web3-provider-engine/index.js:95:18)',
  code: -32000 }
[2017-05-22 02:03:59.487] [INFO] (ui: popupWindow) - Estimated gas:  null {}
[2017-05-22 02:03:59.567] [ERROR] ipcProviderBackend - Send request failed { message: 'Error: tx has a higher gas limit than the block\n    at VM.module.exports [as runTx] (/usr/local/lib/node_modules/ethereumjs-testrpc/node_modules/ethereumjs-vm/lib/runTx.js:35:8)\n    at VmSubprovider.runVm (/usr/local/lib/node_modules/ethereumjs-testrpc/node_modules/web3-provider-engine/subproviders/vm.js:106:6)\n    at VmSubprovider.handleRequest (/usr/local/lib/node_modules/ethereumjs-testrpc/node_modules/web3-provider-engine/subproviders/vm.js:45:8)\n    at next (/usr/local/lib/node_modules/ethereumjs-testrpc/node_modules/web3-provider-engine/index.js:95:18)\n    at GethDefaults.handleRequest (/usr/local/lib/node_modules/ethereumjs-testrpc/lib/subproviders/gethdefaults.js:34:5)\n    at next (/usr/local/lib/node_modules/ethereumjs-testrpc/node_modules/web3-provider-engine/index.js:95:18)\n    at FilterSubprovider.handleRequest (/usr/local/lib/node_modules/ethereumjs-testrpc/node_modules/web3-provider-engine/subproviders/filters.js:87:7)\n    at next (/usr/local/lib/node_modules/ethereumjs-testrpc/node_modules/web3-provider-engine/index.js:95:18)\n    at DelayedBlockFilter.handleRequest (/usr/local/lib/node_modules/ethereumjs-testrpc/lib/subproviders/delayedblockfilter.js:27:3)\n    at next (/usr/local/lib/node_modules/ethereumjs-testrpc/node_modules/web3-provider-engine/index.js:95:18)',
  code: -32000 }
[2017-05-22 02:03:59.572] [INFO] (ui: popupWindow) - Estimated gas:  null {}
gfriebe commented 7 years ago

I am having the same issue. I just wanted to setup a simple environment and tried mist connecting to localhost via Mist --rpc http://localhost:8545 --swarmurl "null" (without swarmurl "null" it fails to start :( ).

On localhost I tried both geth and testrpc with example accounts. While it is possible to send a transaction from the console (e.g. truffle), in mist I get Send request failed { message: 'Error: tx has a higher gas limit than the block and when hitting 'Submit' anyway I get Send request failed { message: 'Error: Method personal_sendTransaction not supported.

I have no clue how to solve this and am a bit frustrated that I didint even get to test a simple demo contract yet :(.

Help is strongly appreciated. Thanks in advance.

asifmallik commented 6 years ago

Is this an issue with testrpc or mist?

pietrobaricco commented 6 years ago

Same issue here, testrpc running in a linux vm, windows mist connecting to it. Deploying contracts or transferring funds does not work, it asks for passwords and complains about being unable to calculate gas limits. Truffle tests seem to succeed against the same testrpc instance

Swader commented 6 years ago

Did anyone get around this?

JonIsaiah commented 6 years ago

Same issue on Mac OS X when running against truffle testrpc.

latest version of mist, geth, truffle.

evertonfraga commented 6 years ago

Fixed in 0.10.0. Please update to see the changes.

FatCache commented 6 years ago

I'm having this exact same issue on Mist v0.11.1 when connected to Ganache 1.2.1. Returned Error. Method personal_signTransaction not supported

evertonfraga commented 6 years ago

@abdusamed91 the personal_signTransaction RPC method was introduced in Geth 1.8.1 in this pull request: https://github.com/ethereum/go-ethereum/pull/15971

You'd have to check if Ganache has plans to implement that.