Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'blockheight' of undefined #1011

Closed
kilrau opened this issue Jun 7, 2019 · 2 comments · Fixed by #1024
Closed

Cannot read property 'blockheight' of undefined #1011

kilrau opened this issue Jun 7, 2019 · 2 comments · Fixed by #1024
Assignees
Labels
bug Something isn't working lightning Lightning network & lnd integration

Comments

@kilrau
Copy link
Contributor

kilrau commented Jun 7, 2019

Branch: origin/listTrades-grpc

With LND and Raiden enabled in config but unavailable, xucli getinfo throws:

~/xud/bin$ ./xucli getinfo
Error: 2 UNKNOWN: Cannot read property 'blockheight' of undefined

Other calls work. Log clearly shows that this is because of raiden with a failed ECONNREFUSED for every getinfo RPC call:

07/06/2019 18:33:33.736 [RPC] debug: received call /xudrpc.Xud/GetInfo
07/06/2019 18:33:33.736 [RAIDEN] error: Error: connect ECONNREFUSED 127.0.0.1:5001
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
07/06/2019 18:33:33.736 [RPC] error: Cannot read property 'blockheight' of undefined
@kilrau kilrau added the bug Something isn't working label Jun 7, 2019
@kilrau kilrau added this to the 1.0.0-beta milestone Jun 7, 2019
@kilrau
Copy link
Contributor Author

kilrau commented Jun 10, 2019

FWIW: I can't reproduce this on master

@sangaman
Copy link
Collaborator

Looks like this would happen when an lnd instance is configured but is disabled due to some reason like no macaroon file found. I'm opening a PR with a fix shortly.

@sangaman sangaman added the lightning Lightning network & lnd integration label Jun 10, 2019
sangaman added a commit that referenced this issue Jun 10, 2019
This fixes a bug where xud tries to read a property of `undefined` when
an instance of `LndClient` is disabled. This refactors the code to use
a `Map` when retrieving a mapping of `LndInfo` objects, and also calls
`GetInfo` in parallel on all `LndClient`s.

Fixes #1011.
@kilrau kilrau removed this from the 1.0.0-beta milestone Jun 11, 2019
sangaman added a commit that referenced this issue Jun 11, 2019
This fixes a bug where xud tries to read a property of `undefined` when
an instance of `LndClient` is disabled. This refactors the code to use
a `Map` when retrieving a mapping of `LndInfo` objects, and also calls
`GetInfo` in parallel on all `LndClient`s.

Fixes #1011.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lightning Lightning network & lnd integration
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants