thunderhub icon indicating copy to clipboard operation
thunderhub copied to clipboard

Thunderhub crashes after login if channel tab is selected "too quickly"

Open davotoula opened this issue 3 years ago • 3 comments

Describe the problem/bug Thunderhub crashes after login if channel tab is selected "too quickly"

Nothing in the logs. Just a client connect and client disconnect.

If I wait for the below lnd error to appear in the logs then it works to select channels tab.

Your environment

  • Version of ThunderHub:0.13.16
  • Deployment method: docker
  • Other relevant environment details: umbrel

To Reproduce Log in and go straight to channels tab.

Expected behavior Channels tab loads

Actual behavior Channels tab appears but then there are two UI errors that are too quick to take note of. Then thunderhub tab crashes. It takes a few seconds before I can refresh. Goes to login screen.

Logs have only two entries: client connected, client disconnected

Screenshots/Links If applicable, add screenshots or links to help explain your problem.

Additional context { context: 'ExceptionsHandler', stack: [ 'Error: FullChannelDetailsNotFound\n' + ' at /app/dist/modules/node/lnd/lnd.helpers.js:8:15\n' + ' at runMicrotasks ()\n' + ' at processTicksAndRejections (node:internal/process/task_queues:96:5)\n' + ' at async ChannelsResolver.getChannel (/app/dist/modules/api/channels/channels.resolver.js:107:25)\n' + ' at async target (/app/node_modules/@nestjs/core/helpers/external-context-creator.js:77:28)\n' + ' at async Object.getChannel (/app/node_modules/@nestjs/core/helpers/external-proxy.js:9:24)' ], level: 'error', message: 'FullChannelDetailsNotFound', timestamp: '2022-10-15T17:42:20.689Z' }

davotoula avatar Oct 15 '22 17:10 davotoula

I can confirm that I could reproduce this.

  • There's no error log on the browser console.
  • The connection between the Thunderhub backend and LND is broken
  • It could be because the LND is not synced

@davotoula was your LND synced before you attempted opening thunderhub?

abhiShandy avatar Dec 03 '22 10:12 abhiShandy

One solution is to disable login till the LND wallet is synced.

  • add getWalletStatus and subscribeWalletStatus to "node" module
  • add support for unauthenticated gRPC to accounts module
  • use the above endpoints to show appropriate view on the login page

Any thoughts? @apotdevin

abhiShandy avatar Dec 03 '22 11:12 abhiShandy

Issue is gone... Possibly by an update to TH?

I noticed a change in UI behaviour.

Previously when selecting Channels it went straight to channel screen and the error was shown.

Now it waits around 10 seconds before showing channel page and error is gone.

davotoula avatar Dec 06 '22 19:12 davotoula