ElementsProject / lightning-charge

A simple drop-in solution for accepting lightning payments
MIT License
554 stars 80 forks source link

Weird 'forbidden' error #72

Closed bitcoin-software closed 4 years ago

bitcoin-software commented 4 years ago

Version: 0.4.7 cln version: v0.7.3

my node with charged was working fine for months until today i goto weird 'Forbidden' error:

HTTP server running on lightning.my.domain:9112
POST /invoice 403 476.792 ms - 136
Error: Forbidden
    at Request.callback (/usr/local/lib/node_modules/lightning-charge/node_modules/superagent/lib/node/index.js:706:15)
    at IncomingMessage.parser (/usr/local/lib/node_modules/lightning-charge/node_modules/superagent/lib/node/index.js:916:18)
    at emitNone (events.js:111:20)
    at IncomingMessage.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:139:11)
    at process._tickCallback (internal/process/next_tick.js:181:9)

After few charged and cln restarts it started worrking again as expected. I have no idea what happened

shesek commented 4 years ago

It seems like this might be an error that was triggered while fetching the BTC/USD exchange rate.

A recent lightning-charge update changed the exchange rate source from BitcoinAverage to Bitstamp/CoinGecko, was it possible that you were running on an older version previously?

If this happens again, you can diagnose whether the error is really related to the exchange rate by creating an invoice denominated in BTC. If this doesn't work either, then its caused by something else.

shesek commented 4 years ago

I'm closing for now, please report back if you're still having troubles.