lightninglabs / lightning-terminal

Lightning Terminal: Your Home for Lightning Liquidity
MIT License
488 stars 82 forks source link

CORS error for terminal.lightning.engineering site #737

Closed cj-chua closed 3 months ago

cj-chua commented 3 months ago

Describe the issue

On terminal.lightning.engineering, "Spent" section of the dasboard is not showing. There is a bunch of CORS errors in console. Here is an example

GET https://mempool.staging.lightningcluster.com/api/tx/<redacted txid> net::ERR_FAILED 200 (OK)

Access to fetch at 'https://mempool.staging.lightningcluster.com/api/tx/<redacted txid>' from origin 'https://terminal.lightning.engineering/' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

What behavior did you expect?

"Spent" section used to display data correctly

What was the actual behavior (provide screenshots if the issue is UI related)?

"Spent" section to display data correctly

How reliably can you reproduce the issue, what are the steps to do so?

The CORS issue seems to be always there

System information

Are you using Lightning Terminal as a standalone application or as part of Umbrel?

standalone

What mode are you running Lightning Terminal in? Specifically of interest are the values of 'lnd-mode', 'faraday-mode', 'loop-mode' and 'pool-mode'.

lnd-mode

What version of Lightning Terminal are you using, where did you get it (website, self-compiled, etc)?

github binary

What type of machine are you observing the error on (OS/CPU and disk type)?

ubuntu ARM

bitromortac commented 3 months ago

I see those errors as well, thanks for reporting!

levmi commented 3 months ago

Is this consistently reproducible on your end? We're having mixed luck reproing on our side.

cj-chua commented 3 months ago

More context: It used to work about 2 months ago. The "spents" that were captured then persisted while new "spents" failed to be captured. Yesterday I decided to generate a new session and let it sync again. This time none of the "spents" were captured

Could it be geographical reasons? I did move to another place recently

bitromortac commented 3 months ago

Maybe this gives another hint, I had to delete cookies/site data to reproduce it one more time. Initiator is shown as _app-b85bfb709425f8bc.js:10.

levmi commented 3 months ago

Also, what browser are you using?

cj-chua commented 3 months ago

Chrome. Just tried Safari, same problem

levmi commented 3 months ago

Thanks! Think we have identified the issue. Working on a fix!

levmi commented 3 months ago

Hiya - this should be resolved now. Can you give it a test and make sure you're not seeing it on your end?

cj-chua commented 3 months ago

Worked like a charm after creating and connecting to a new session. Thanks!