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
530 stars 193 forks source link

Problems with the extension in Librewolf #378

Closed ghost closed 2 years ago

ghost commented 2 years ago

I am experiencing some problems with the Alby Wallet in the Librewolf browser, there are errors when working with payments.

When I try to create an invoice, I get a error: can't access property "length", this.data is undefined:

Screenshot_4

When I try to pay a payment invoice, I get an error: Error: JSON.parse: unexpected character at line 1 column 1 of the JSON data:

Screenshot_6

The same problems are completely absent in Chrome on my device

bumi commented 2 years ago

thanks for reporting this! what connection (LND, Bluewallet, etc.) do you use? who are you trying to pay? could also be that it is an invalid LNURL server response. we do not validate those responses very will so far.

ghost commented 2 years ago

I use LNBits to connect to a wallet. I tried to pay several invoices created in SimpleBitcoinWallet, BlueWallet and another LNBits account, but there is an error everywhere.

bumi commented 2 years ago

OK, I think I was able to debug this, sorry for the delay.

What Lnbits host do you use? Are you running your own LNbits or do you use the public one? They changed the domain and this is a problem for the API (the responses are no longer the same using the old domain). I think the new domain is: https://legend.lnbits.com

can this be the reason?

ghost commented 2 years ago

I use public lnbits with the domain legend.lnbits.com, I think this can't be the reason

bumi commented 2 years ago

We have a new release out. Can you check it with that version again. The new version includes some lnbits API updates.

ghost commented 2 years ago

The problems remain

bumi commented 2 years ago

ok, thanks for the report. sadly I can not reproduce it... :( Could it be that you used the INVOICE/READ key not the ADMIN key to connect Alby? The admin key is needed to be able to send payments. Sadly LNBits seems to not return a proper error but just fails when a wrong key is used, so we do not get a proper error message there.

image
ghost commented 2 years ago

Yes, this method really works and the errors disappear in this case

bumi commented 2 years ago

oh nice. great. thanks.