connext / indra

[LEGACY] Monorepo containing everything related to the core Connext protocols and network.
MIT License
84 stars 38 forks source link

Property in store undefined on create channel #242

Closed LayneHaber closed 5 years ago

LayneHaber commented 5 years ago

Gazecoin is having issues trying to create channels, there is an undefined property in the store. Stack trace from original issue:

at new StateChannel (index.js:1209)
    at Function.fromJson (index.js:1516)
    at Store.getStateChannel (index.js:5456)
    at async getOrCreateStateChannelBetweenVirtualAppParticipants (index.js:1635)
    at async createProposedVirtualAppInstance (index.js:1603)
    at async ProposeInstallVirtualController.executeMethodImplementation (index.js:6025)
StateChannel @ index.js:1209
fromJson @ index.js:1516
getStateChannel @ index.js:5456

And:

TypeError: Cannot read property 'forEach' of undefined at new StateChannel (index.js:1349) at Function.fromJson (index.js:1622) at Store.getStateChannel (index.js:5878) at async GetFreeBalanceController.executeMethodImplementation (index.js:6150) console.<computed> @ index.js:1375

From DalaiLlama:

I have traced it to a call to getCreate2MultisigAddress(...) in InstallVirtualController, that returns an address I don't recognise, and which returns nothing in the later call to store.getStateChannel

Using client: @connext/client 0.0.19 Network: Rinkeby

LayneHaber commented 5 years ago

If theres any information you can give on how to reproduce this, that would be helpful.

We had some issues on Wednesday with channels being created properly, and had to redeploy the contracts and node. You're using the latest client version it appears, but it looks like there's some conflicting stack traces.

In the top, I see a call to createProposedVirtualAppInstance, which I don't believe is hit during the original createChannel call

ArjunBhuptani commented 5 years ago

Tagging in @cf19drofxots and @snario too

bohendo commented 5 years ago

I think this is a bug in the store. I was getting this error in the daicard before I added special-case handling for a couple keys.

Can anyone from Gazecoin link the repo where this issue is popping up? I suspect it'll go away if the store you pass into our client implements the same logic as what we have in the daicard: https://github.com/ConnextProject/indra/blob/master/modules/daicard/src/utils/store.js

snario commented 5 years ago

This may have something to do with it: https://github.com/counterfactual/monorepo/pull/2316

bohendo commented 5 years ago

Closing due to lack of additional info. If this issue pops up again we can open a new issue w relevant info.