lightning-browser-extension icon indicating copy to clipboard operation
lightning-browser-extension copied to clipboard

[BUG] Can't connect to LNDHub in Firefox; works fine in Chrome

Open dienummer opened this issue 1 year ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Describe the bug

In Firefox, when setting up Alby anew, it reports it cannot connect to local LAN instance of LNDHub (details below). I get one of two error messages. First, most common is Connection failed. Is your LNDHub URI correct? API error (http://lndhub.local:3000): . Secondarily I have seen : Error: API error (http://lndhub.local:3000): (yes, there is a blank space after the final colon in both cases)

However, it works fine in Chrome using the same connection string.

lndhub://<useridpart>:<token/pass-part>@http://lndhub.local:3000

Logs (bland):

Jan 30 05:00:19 lndhub node[597371]: 2024-01-30T05:00:19.301Z : info: [/auth] : ["cba21908-a33b-4c0f-9ac4-cbea8b5d65fd"]
Jan 30 05:00:19 lndhub node[597371]: cba21908-a33b-4c0f-9ac4-cbea8b5d65fd 192.168.1.240 - - [30/Jan/2024:05:00:19 +0000] "POST /auth?type=auth HTTP/1.1" 200 118 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:122.0) Gecko/20100101 Firefox/122.0"
Jan 30 05:00:19 lndhub node[597371]: 2024-01-30T05:00:19.312Z : info: [/getinfo] : ["0ae0fa88-bf4e-432c-a6fc-2892844a5733"]
Jan 30 05:00:19 lndhub node[597371]: 0ae0fa88-bf4e-432c-a6fc-2892844a5733 192.168.1.240 - - [30/Jan/2024:05:00:19 +0000] "GET /getinfo HTTP/1.1" 200 1833 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:122.0) Gecko/20100101 Firefox/122.0"

Screenshots [optional]

connection failed

Screenshot 2024-01-29

Screenshot 2024-01-29 console

Steps To Reproduce

Run LNDHub on LAN; hostname lndhub.local served by mDNS. serve directly on port 3000; no TLS

Set up new wallet in BlueWallet. Copy connection string (lndhub://...)

Load fresh instance of Alby in Firefox Set password to get through Select LNDHub Paste connection string. Fails with above error(s) in Firefox; Works fine in Chrome

Expected behavior

I expect it to connect correctly; or report an actionable error (rather than a blank string)

Alby information

  • Alby 3.6.0

Device information

  • OS: MacOS M1 Sonoma
  • Firefox (latest)

Additional context

No response

Are you working on this?

No

dienummer avatar Jan 30 '24 05:01 dienummer

@dienummer Can you verify that you can open http://lndhub.local:3000 in Firefox?

Since it's exactly the same codebase for the firefox / chrome extension there could potentially also be a problem with resolving this local domain?

Can you maybe follow the steps described in here and try to see if you find the root cause of this problem?

https://guides.getalby.com/user-guide/v/alby-account-and-browser-extension/alby-browser-extension/debugging/mozilla-firefox

Would be interesting to inspect both the network and console tab.

reneaaron avatar Jan 30 '24 13:01 reneaaron