-
Notifications
You must be signed in to change notification settings - Fork 807
System Error when running Ganache + Drizzle: TypeError: Cannot read property 'connection' of undefined #930
Comments
As a note, when starting ganache-cli -h 0.0.0.0 -b -3 there is a different error: TypeError: Cannot read property 'connection' of undefined |
Hi there, I started seeing same error since evening. Did you find any solution? |
I had the same problem. The way I solved it was by manually installing an older version of MetaMask (4.11.1). I'm not sure why, but using 4.12.0 causes ganache to crash or stall for me, with similar errors to those posting above. You can grab the older release here: https://github.com/MetaMask/metamask-extension/releases You'll have to load the unpacked CX into Chrome and use the older MetaMask until this is figured out. |
CC @danfinlay / @kumavis |
@dternyak Thanks for the info and you are right , it has something to do with latest release of metamask. In my other computer which has older metamask, same application code is working fine. I will give it a try to install older version as you suggested. |
UPDATE: As @dternyak suggested, I installed 4.11.1 and everything is back to normal. |
Glad to hear that switching MetaMask releases fixed it, but it sounds like our error handling & messages aren't up to snuff here. |
Looks like trufflesuite/ganache#186 is the same issue. Let's track this there. |
On using a vanilla install of the Truffle Drizzle truffle box, Ganache borks on any contract call from the demo application inside the truffle box. With the error below.
TypeError: Cannot read property 'connection' of undefined
at ConnectionManager._updateSubscriptions (/node_modules/ganache-core/lib/webSocketServer.js:126:69)
at Provider. (/node_modules/ganache-core/lib/webSocketServer.js:32:31)
at emitTwo (events.js:125:13)
at Provider.emit (events.js:213:7)
at SubscriptionSubprovider. (/node_modules/ganache-core/lib/provider.js:48:10)
at emitTwo (events.js:125:13)
at SubscriptionSubprovider.emit (events.js:213:7)
at SubscriptionSubprovider._notificationHandler (/node_modules/ganache-core/node_modules/web3-provider-engine/subproviders/subscriptions.js:96:8)
at Array.forEach ()
at LogFilter. (/node_modules/ganache-core/node_modules/web3-provider-engine/subproviders/subscriptions.js:62:15)
at emitOne (events.js:115:13)
at LogFilter.emit (events.js:210:7)
at LogFilter.update (/node_modules/ganache-core/node_modules/web3-provider-engine/subproviders/filters.js:407:10)
at /node_modules/ganache-core/node_modules/web3-provider-engine/subproviders/filters.js:130:9
at /node_modules/ganache-core/node_modules/web3-provider-engine/subproviders/filters.js:278:5
at /node_modules/ganache-core/node_modules/web3-provider-engine/index.js:152: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 end (/node_modules/ganache-core/node_modules/web3-provider-engine/index.js:127:5)
Expected Behavior
I would expect the transaction would be mined without incident. This bug crashes ganache and thus makes it impossible to use.
Current Behavior
Upon making any transaction from the front end of the Truffle Drizzle trufflebox sample app, Ganache crashes.
Possible Solution
Not sure, but the typeError seems to be pretty clear.
Steps to Reproduce (for bugs)
Context
It doesn't work. Unsure if Ganache is broken or if Drizzle is broken. Ganache seems to work for my personal projects but I have trouble understanding how Drizzle calls could break Ganache.
Your Environment
OSX 10.13.6
Node: v9.7.1
Drizzle Truffle box current as of today: Sept 29, 2018
Ganache UI: v1.2.2, but problem exists also on Ganache CLI v6.1.6 (ganache-core: 2.1.5) and on version that runs on truffle develop (it does not expose version number)
The text was updated successfully, but these errors were encountered: