Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

System Error when running Ganache 1.0.2 on linux #682

Closed
s2-t2 opened this issue May 29, 2018 · 1 comment
Closed

System Error when running Ganache 1.0.2 on linux #682

s2-t2 opened this issue May 29, 2018 · 1 comment

Comments

@s2-t2
Copy link

s2-t2 commented May 29, 2018

Deployed a react app on rinkeby using infura url works just fine.
But replacing the provider to use localhost on 7545 running on ganache, the browser loads the first time but then crashes and ganache prompts to relaunch with the error below:

Here's the deploy script :
const HDWalletProvider = require('truffle-hdwallet-provider');
const Web3 = require('web3');
const compiledEds = require('./build/Endorsement.json');

const provider = new HDWalletProvider(
mnemonic,
'http://localhost:7545'
);
const web3 = new Web3(provider);

const deploy = async (accountNumber = 0) => {
const accounts = await web3.eth.getAccounts();
const deployAccount = accounts[accountNumber];
const data ='0x' + compiledEds.bytecode;
const gas = 4000000;
const gasPrice = web3.utils.toWei('2','gwei');

console.log('Attempting to deploy from account', deployAccount);

const result = await new web3.eth.Contract(JSON.parse(compiledEds.interface) )
.deploy({
	data 
})
.send({
	gas, 
	gasPrice, 
	from: deployAccount 
});

console.log('Contract deployed to', result.options.address);

};
deploy();

PLATFORM: linux
GANACHE VERSION: 1.0.2

EXCEPTION:

Blockchain process exited prematurely with code '7', due to signal 'null'.

APPLICATION LOG:

T+21548283ms: eth_getBalance
T+21548285ms: eth_getBalance
T+21548287ms: eth_getBalance
T+21548289ms: eth_getBalance
T+21548289ms: eth_getBalance
T+21548291ms: eth_getBalance
T+21548293ms: eth_getBalance
T+21548295ms: eth_getBalance
T+21548302ms: eth_getLogs
T+21548304ms: eth_getLogs
T+21548307ms: eth_getLogs
T+21548310ms: eth_getLogs
T+21548311ms: eth_getLogs
T+21548311ms: eth_getLogs
T+21548313ms: eth_getLogs
T+21548316ms: eth_getLogs
T+21548318ms: eth_getLogs
T+21548319ms: eth_getLogs
T+21548322ms: eth_getLogs
T+21548324ms: eth_getLogs
T+21548326ms: eth_getLogs
T+21548923ms: eth_getBlockByNumber
T+21548935ms: eth_getBlockByNumber
T+21548953ms: eth_getBlockByNumber
T+21548961ms: eth_getBalance
T+21548969ms: eth_getBalance
T+21548974ms: eth_getBalance
T+21548977ms: eth_getBalance
T+21548981ms: eth_getBalance
T+21548984ms: eth_getBalance
T+21548986ms: eth_getBalance
T+21548988ms: eth_getBalance
T+21548990ms: eth_getBalance
T+21548991ms: eth_getBalance
T+21548993ms: eth_getBalance
T+21548995ms: eth_getBalance
T+21548996ms: eth_getBalance
T+21554151ms: eth_gasPrice
T+21554165ms: eth_getBlockByNumber
T+21554182ms: eth_estimateGas
T+21556301ms: eth_getBlockByNumber
T+21556985ms: eth_getBlockByNumber
T+21556998ms: eth_getTransactionCount
T+21557035ms: eth_sendRawTransaction
T+21557104ms:   Transaction: 0xd5515891b1342075d812fb41004f18ab727f1a4ceb0e3f56c74093d3936f3302
T+21557104ms:   Gas usage: 142607
T+21557104ms:   Block Number: 65
T+21557104ms:   Block Time: Tue May 29 2018 21:57:33 GMT+0200 (CEST)
T+21557152ms: eth_getTransactionReceipt
T+21557191ms: eth_call
T+21564321ms: eth_getBlockByNumber
T+21564342ms: eth_getBlockByNumber
T+21564355ms: eth_getBalance
T+21564359ms: eth_getBalance
T+21564362ms: eth_getBalance
T+21564365ms: eth_getBalance
T+21564365ms: eth_getBalance
T+21564368ms: eth_getBalance
T+21564370ms: eth_getBalance
T+21564373ms: eth_getBalance
T+21564373ms: eth_getBalance
T+21564376ms: eth_getBalance
T+21564378ms: eth_getBalance
T+21564380ms: eth_getBalance
T+21564386ms: eth_getLogs
T+21564388ms: eth_getLogs
T+21564392ms: eth_getLogs
T+21564395ms: eth_getLogs
T+21564397ms: eth_getLogs
T+21564399ms: eth_getLogs
T+21564401ms: eth_getLogs
T+21564401ms: eth_getLogs
T+21564403ms: eth_getLogs
T+21564405ms: eth_getLogs
T+21564423ms: eth_getLogs
T+21564425ms: eth_getLogs
T+21564427ms: eth_getLogs
T+21565001ms: eth_getBlockByNumber
T+21565017ms: eth_getBlockByNumber
T+21565024ms: eth_getBalance
T+21565034ms: eth_getBalance
T+21565040ms: eth_getBalance
T+21565044ms: eth_getBalance
T+21565047ms: eth_getBalance
T+21565050ms: eth_getBalance
T+21565053ms: eth_getBalance
T+21565055ms: eth_getBalance
T+21565058ms: eth_getBalance
T+21565060ms: eth_getBalance
T+21565062ms: eth_getBalance
T+21565062ms: eth_getBalance
T+21565064ms: eth_getBalance
T+21572382ms: eth_getBlockByNumber
T+21573041ms: eth_getBlockByNumber
T+21580398ms: eth_getBlockByNumber
T+21581054ms: eth_getBlockByNumber
T+21582776ms: eth_gasPrice
T+21582789ms: eth_getBlockByNumber
T+21582806ms: eth_estimateGas
T+21584635ms: eth_getTransactionCount
T+21584661ms: eth_sendRawTransaction
T+21584736ms:   Transaction: 0x08884078df1cd608f083ca9fa258daaa968e3dbf9e04bfe9c7a9e5c2086b934b
T+21584736ms:   Gas usage: 142863
T+21584736ms:   Block Number: 66
T+21584736ms:   Block Time: Tue May 29 2018 21:58:01 GMT+0200 (CEST)
T+21584818ms: eth_getTransactionReceipt
T+21584875ms: eth_call
T+21584889ms: /node_modules/ganache-cli/build/lib.node.js:63898
T+21584889ms: 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=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;if(Module["ENVIRONMENT"]){if(Module["ENVIRONMENT"]==="WEB"){ENVIRONMENT_IS_WEB=true}else if(Module["ENVIRONMENT"]==="WORKER"){ENVIRONMENT_IS_WORKER=true}else if(Module["ENVIRONMENT"]==="NODE"){ENVIRONMENT_IS_NODE=true}else if(Module["ENVIRONMENT"]==="SHELL"){ENVIRONMENT_IS_SHELL=true}else{throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.")}}else{ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="function";ENVIRONMENT_IS_NODE=typeof process==="object"&&"function"==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_W
T+21584889ms: 
T+21584889ms: TypeError: Cannot read property 'get' of undefined
T+21584889ms:     at dbGet (/node_modules/ganache-cli/build/lib.node.js:56029:7)
T+21584889ms:     at /node_modules/ganache-cli/build/lib.node.js:17614:5
T+21584889ms:     at /node_modules/ganache-cli/build/lib.node.js:23091:20
T+21584889ms:     at iterate (/node_modules/ganache-cli/build/lib.node.js:23172:13)
T+21584889ms:     at /node_modules/ganache-cli/build/lib.node.js:23184:29
T+21584889ms:     at /node_modules/ganache-cli/build/lib.node.js:22954:16
T+21584889ms:     at /node_modules/ganache-cli/build/lib.node.js:17619:7
T+21584889ms:     at /node_modules/ganache-cli/build/lib.node.js:56034:9
T+21584889ms:     at dispatchError (/node_modules/ganache-cli/build/lib.node.js:36358:36)
T+21584889ms:     at /node_modules/ganache-cli/build/lib.node.js:22744:14
@mikeseese
Copy link
Contributor

Thanks for the thorough info! It helps out! (especially the contract code!)

We're tracking this in #667; we'll be referencing your notes however while addressing it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants