Skip to content
This repository has been archived by the owner on Dec 20, 2022. It is now read-only.

Unhandled error in GRPC calls #6

Open
whizz opened this issue Mar 19, 2018 · 2 comments
Open

Unhandled error in GRPC calls #6

whizz opened this issue Mar 19, 2018 · 2 comments
Labels
bug Something isn't working

Comments

@whizz
Copy link
Contributor

whizz commented Mar 19, 2018

It looks like the app does not handle the error event when connection to lnd fails for some reason.

events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: 14 UNAVAILABLE: EOF
    at createStatusError (/opt/lnd-explorer/node_modules/grpc/src/client.js:65:15)
    at ClientReadableStream._emitStatusIfDone (/opt/lnd-explorer/node_modules/grpc/src/client.js:271:19)
    at ClientReadableStream._receiveStatus (/opt/lnd-explorer/node_modules/grpc/src/client.js:249:8)
    at /opt/lnd-explorer/node_modules/grpc/src/client.js:715:12
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! lnd-explorer@1.1.0 start: `NODE_ENV=production node src/server/server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the lnd-explorer@1.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
@bmancini55 bmancini55 added the bug Something isn't working label Mar 24, 2018
@bmancini55
Copy link
Member

Interesting. Any steps to repro this?

If I shut down LND and attempt to access a page I get an error, but not an unhandled event exception.

error:  Error: 14 UNAVAILABLE: Connect Failed
    at new createStatusError (/Users/bmancini/code/go/src/altangent/lnd-explorer/node_modules/grpc/src/client.js:65:15)
    at /Users/bmancini/code/go/src/altangent/lnd-explorer/node_modules/grpc/src/client.js:568:15

@bmancini55
Copy link
Member

bmancini55 commented Mar 24, 2018

Ah, I repro'd it by starting lndexplorer without lnd running.

I also got another error if lnd shuts down and restarts without restarting lndexplorer.

error:  Error: 12 UNIMPLEMENTED: unknown service lnrpc.Lightning
    at new createStatusError (/Users/bmancini/code/go/src/altangent/lnd-explorer/node_modules/grpc/src/client.js:65:15)
    at /Users/bmancini/code/go/src/altangent/lnd-explorer/node_modules/grpc/src/client.js:568:15

I'll put together some code to harden the connection logic for these three scenarios. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants