lightwalletd icon indicating copy to clipboard operation
lightwalletd copied to clipboard

Missing rpcport in zcash.conf results in "couldn't parse error"

Open garethtdavies opened this issue 6 years ago • 2 comments

When not specifying the rpcport in zcash.conf the following response is given in lightwalletd.

ERROR[2019-05-02T07:55:12-07:00] call failed                                   app=frontend-grpc duration="895.023µs" error="SendTransaction couldn't parse error code"method=/cash.z.wallet.sdk.rpc.CompactTxStreamer/SendTransaction peer_addr="192.168.86.30:43262"

Given a connection error between lightwalletd and zcashd would seem to be a common issue (e.g. missing RPC credentials) it makes sense to improve this error handling to give some useful feedback.

garethtdavies avatar May 03 '19 03:05 garethtdavies

Thanks for reporting this, Gareth! With the latest master (commit 1e40cea877395988847c7c063cd7bf4c4ad888a5), it fails this way for me:

WARNING[2019-09-05T15:51:09-06:00] error with getblock                           app=lightwd error="error requesting block: Post http://127.0.0.1: dial tcp 127.0.0.1:80: connect: connection refused" height=280000

I assume the change in the error message is because the code has changed since May 2. As this log message makes pretty clear, the problem is it's trying to connect to zcashd using port 80, not the default testnet port. I will create a PR to fix this in a moment.

LarryRuane avatar Sep 06 '19 13:09 LarryRuane

Update, sorry, ignore my previous comment (and my PR); I wasn't on master. Is this still a problem for you? If so, which branch are you on (commit hash would help) and what is the exact command line you're running? And what's the content of your ~/.zcash/zcash.conf file?

LarryRuane avatar Sep 06 '19 14:09 LarryRuane