trufflesuite / ganache-ui

Personal blockchain for Ethereum development
https://www.trufflesuite.com/ganache
MIT License
4.65k stars 797 forks source link

System Error when running Ganache 1.2.2 on darwin #1001

Closed poserr closed 5 years ago

poserr commented 5 years ago

For some reason ganache crashes on start up

PLATFORM: darwin GANACHE VERSION: 1.2.2

EXCEPTION:

TypeError: Cannot read property 'error' of undefined
    at Provider.cleanUpErrorObject (/node_modules/ganache-core/lib/provider.js:167:24)
    at Provider.reportErrorInResponse (/node_modules/ganache-core/lib/provider.js:242:15)
    at Object.intermediary [as callback] (/node_modules/ganache-core/lib/provider.js:94:28)
    at self.engine.sendAsync (/node_modules/ganache-core/lib/provider.js:150:12)
    at /node_modules/ganache-core/node_modules/async/internal/map.js:32:9
    at /node_modules/ganache-core/node_modules/async/internal/once.js:12:16
    at iteratorCallback (/node_modules/ganache-core/node_modules/async/eachOf.js:58:13)
    at /node_modules/ganache-core/node_modules/async/internal/onlyOnce.js:12:16
    at /node_modules/ganache-core/node_modules/async/internal/map.js:29:13
    at /node_modules/ganache-core/node_modules/web3-provider-engine/index.js:150:9
    at /node_modules/ganache-core/node_modules/async/internal/once.js:12:16
    at replenish (/node_modules/ganache-core/node_modules/async/internal/eachOfLimit.js:61:25)
    at /node_modules/ganache-core/node_modules/async/internal/eachOfLimit.js:71:9
    at eachLimit (/node_modules/ganache-core/node_modules/async/eachLimit.js:43:36)
    at /node_modules/ganache-core/node_modules/async/internal/doLimit.js:9:16
    at Object.end [as callback] (/node_modules/ganache-core/node_modules/web3-provider-engine/index.js:127:5)
    at intermediary (/node_modules/ganache-core/lib/statemanager.js:425:12)
    at /node_modules/ganache-core/lib/statemanager.js:613:21
    at /node_modules/ganache-core/lib/statemanager.js:887:11
    at /node_modules/ganache-core/lib/statemanager.js:255:5
    at /node_modules/ganache-core/lib/blockchain_double.js:1012:9
    at module.exports.Account.getCode (/node_modules/ganache-core/node_modules/ethereumjs-account/index.js:36:5)

APPLICATION LOG:

T+0ms: eth_unsubscribe
T+0ms: Starting server (version 1.2.2) with initial configuration: {"hostname":"127.0.0.1","port":8545,"network_id":5777,"default_balance_ether":100,"total_accounts":10,"unlocked_accounts":[],"locked":false,"vmErrorsOnRPCResponse":false,"verbose":false}
T+36ms: Ganache started successfully!
T+36ms: Waiting for requests...
T+1180ms: eth_getBalance
T+1180ms: eth_call
T+1180ms: eth_call
T+1180ms: eth_call
T+1180ms: eth_call
T+1180ms: eth_getBalance
T+1180ms: eth_call
T+1181ms: eth_call
T+1181ms: eth_call
T+1181ms: eth_call
T+1182ms: eth_accounts
T+1184ms: eth_getBlockByNumber
T+1192ms: eth_unsubscribe
mikeseese commented 5 years ago

This is likely related to https://github.com/trufflesuite/ganache-core/issues/252

nicholasjpaterno commented 5 years ago

@poserr From the looks of the log, you likely have something like MetaMask running in the background and it appears to send 2 eth_unsubscribe calls (one before ganache has even initialized) without subscribing first.

I'm going to close this for now as we have a fix for closely related issues that will more than likely solve this issue as well. Can you try testing on the latest ganache-cli@latest (v6.2.4)? Please feel free to reopen if you're still experiencing this issue.