getAlby / lightning-browser-extension

The Bitcoin Lightning Browser extension that connects to different wallet interfaces and brings deep lightning integration to the web
https://getalby.com
MIT License
523 stars 193 forks source link

Error: e.payment_hash is null #2929

Open KainerW opened 7 months ago

KainerW commented 7 months ago

Is there an existing issue for this?

Describe the bug

Opened up my browser extension today and it shows "Error: e.payment_hash is null" at the bottom.

What could have happenend?

Screenshots [optional]

Screenshot at Dec 12 11-07-20

Steps To Reproduce

Just look into your browser extension and see it at the bottom.

Expected behavior

I expect that mesage to just not be there and my recent transaction loading and showing.

Alby information

3.4.1

Installed to browser via extensions mozilla/firefox.

Device information

firefox 120.0.1

Additional context

No response

Are you working on this?

No

reneaaron commented 7 months ago

@KainerW Thanks for reporting. Could you share which connector you are using?

dienummer commented 5 months ago

Happens to me with LNDHub

I had to nuke my entire LNDHub redis database to make it stop. Probably relates to expired unpaid invoices.

I just wanted to use nostr TBH

reneaaron commented 5 months ago

@dienummer Can you share some details about what LNDHub you are running? lndhub.go?

dienummer commented 4 months ago

@dienummer Can you share some details about what LNDHub you are running? lndhub.go?

https://github.com/BlueWallet/LndHub

Not gonna lie, I didn't know about lndhub.go (or maybe vaguely think I remember hearing about it, but forgot).

reneaaron commented 4 months ago

@pavanjoshi914 Can you maybe look into this? Could we keep the field paymentHash optional for the LNDHub connector?

pavanjoshi914 commented 4 months ago

as far as i understand this error shall be thrown by getTransactions action.

null values are returned when payment_hash field is not present in the object itself. but we create responses returned from the connector manually. so payment_hash is always there to be consumed by getTransactions action

i also tried assigning null value to payment_hash and try but still worked for me. no error. still here is the fix https://github.com/getAlby/lightning-browser-extension/pull/3074

reneaaron commented 4 months ago

Well then let's first try to understand the underlying problem. I don't think we just want to throw code on unclear problems.

According to the docs this field should always be there, too: https://github.com/BlueWallet/LndHub/blob/master/doc/Send-requirements.md#get-getuserinvoices

@dienummer Does this problem still persist for you after nuking your redis? How do you come to the conclusion it's about expired unpaid invoices? Any info would be really helpful to reproduce this problem.