BlueWallet / LndHub

Wrapper for Lightning Network Daemon. It provides separate accounts for end-users
http://LndHub.io
MIT License
765 stars 191 forks source link

"Receive" on new Lightning account when using custom URL doesn't update account Balance #100

Open jaro2k opened 3 years ago

jaro2k commented 3 years ago

Hi there!

I have setup LndHub locally with LND lightning node v0.11 connected. I have changed the Network settings on BlueWallet (BW) app to use my local LndHub instance using custom URL: Http://ip-addr:3000/ . I have created a new Lightning account in BW-app and I have clicked on "Receive" to generate invoice. I payed invoice from a different lightning account to transfer the funds. I see the funds were received on LND node but my Lightning account balance in Bluewallet app is still showing me 0-sat. Anyway, the invoice transaction was marked as completed. There are some errors thrown on LndHub console like:

(But I'm not sure whether they are related)

at IncomingMessage.<anonymous> (/Users/xxx/Documents/LndHub/node_modules/jayson/lib/client/http.js:74:21)
at IncomingMessage.emit (events.js:317:22)
at endReadableNT (_stream_readable.js:1215:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)

(node:25933) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 57) (node:25933) UnhandledPromiseRejectionWarning: Error: {"result":null,"error":{"code":-32601,"message":"Method not found"},"id":"b45e8747-2a91-4332-b4a7-f5f12d7a163d"}

Anybody is able to direct me what could I do wrong?

I also tried to clink on "Manage Funds" to choose "Refill with External wallet" but I'm not really sure where this generated BTC address is going to send funds to. Is it going to come to LND lightning node bitcoin wallet where LndHub is connected to?

Thanks for help.

Overtorment commented 3 years ago

first, what bitcoin core version are you using? this error: Method not found is very weird. can you dig into that direction? probably provide more logs? and what you did exactly to get this error thrown?

second, can you post screenshots of your ln wallet in bw? if incoming lightning payment is marked as paid but total balance is zero - that might just be a caching issue, and cache usually expires in 1 hr (but at the same time balance is usable, so you can try to spend it). try doing pull-to-refresh.

third, "Refill with External wallet" pulls address directly from your LND, so when you deposit to it - you are depositing directly to LND onchain

jaro2k commented 3 years ago
Overtorment commented 3 years ago

can you also post a screenshot of opened ln wallet?

I looked at logs, and I could only understand that Method not found is thrown at getBalance call. looks like some RPC method is not working or removed either from bitcoind or from lnd..? but which one is hard to tell. is there a way for you to open access to your bitcoind/lnd/lndhub so I could mess with it?

Overtorment commented 3 years ago

also, is your bitcoin node prunned?

jaro2k commented 3 years ago

I run full node. I could give you access to my setup but I have to think how to do it first. I will try to send you private message ones I have it ready. Thanks.

BishopPeter1 commented 3 years ago

Same here. Just my errors in LOG is different:

Feb 07 15:19:33 mynode lndhub[14904]: 2021-02-07T14:19:33.921Z : info: [/auth] : ["8466461d-53ba-4a7c-a448-0ba67fa83212"] Feb 07 15:19:34 mynode lndhub[14904]: 8466461d-53ba-4a7c-a448-0ba67fa83212 ::ffff:10.100.0.31 - - [07/Feb/2021:14:19:34 +0000] "POST /auth?type=refresh_token HTTP/1.1" 200 118 "-" "Blu Feb 07 15:19:34 mynode lndhub[14904]: 2021-02-07T14:19:34.950Z : info: [/balance] : ["caa4bf74-c262-4c44-9fb3-25908600ae56"] Feb 07 15:19:34 mynode lndhub[14904]: 2021-02-07T14:19:34.954Z : info: [/balance] : ["caa4bf74-c262-4c44-9fb3-25908600ae56","userid: 6454f6d9980057d24241005cce922c42e9fe7c32460acd60"] Feb 07 15:19:35 mynode lndhub[14904]: (node:14927) UnhandledPromiseRejectionWarning: ReferenceError: u is not defined Feb 07 15:19:35 mynode lndhub[14904]: at /opt/mynode/LndHub/controllers/api.js:291:81 Feb 07 15:19:35 mynode lndhub[14904]: at processTicksAndRejections (internal/process/task_queues.js:86:5) Feb 07 15:19:35 mynode lndhub[14904]: (node:14927) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function w Feb 07 15:19:35 mynode lndhub[14904]: 2021-02-07T14:19:35.183Z : info: [/balance] : ["81796aef-0192-40aa-821b-8713e542bb64"] Feb 07 15:19:35 mynode lndhub[14904]: 2021-02-07T14:19:35.187Z : info: [/balance] : ["81796aef-0192-40aa-821b-8713e542bb64","userid: 6454f6d9980057d24241005cce922c42e9fe7c32460acd60"] Feb 07 15:19:35 mynode lndhub[14904]: (node:14927) UnhandledPromiseRejectionWarning: ReferenceError: u is not defined Feb 07 15:19:35 mynode lndhub[14904]: at /opt/mynode/LndHub/controllers/api.js:291:81 Feb 07 15:19:35 mynode lndhub[14904]: at processTicksAndRejections (internal/process/task_queues.js:86:5) Feb 07 15:19:35 mynode lndhub[14904]: (node:14927) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function w Feb 07 15:19:39 mynode lndhub[14904]: 81796aef-0192-40aa-821b-8713e542bb64 ::ffff:10.100.0.31 - - [07/Feb/2021:14:19:39 +0000] "GET /balance HTTP/1.1" - - "-" "BlueWallet/1610750144 CF Feb 07 15:19:39 mynode lndhub[14904]: caa4bf74-c262-4c44-9fb3-25908600ae56 ::ffff:10.100.0.31 - - [07/Feb/2021:14:19:39 +0000] "GET /balance HTTP/1.1" - - "-" "BlueWallet/1610750144 CF

Overtorment commented 3 years ago

u is not defined - i think I fixed it months ago. are you on latest version..?

BishopPeter1 commented 3 years ago

u is not defined - i think I fixed it months ago. are you on latest version..? v1.2.0 from mynode(bitcoin) v0.2.25 - so I think this is latest version

Overtorment commented 3 years ago

latest is 1.2.2

thinkmassive commented 3 years ago

It would be great if releases were all tagged. Even better if they were indicated on the release page, because that makes it easy to get notifications. I looked around closed PRs, issues, and lndhub.io before thinking to check package.json in the master branch.

Thanks and keep up the great work!

BishopPeter1 commented 3 years ago

latest is 1.2.2

I will try 1.2.2 thank you wery much.

Overtorment commented 3 years ago

yes ill probably start tagging & signing releases