ACINQ / phoenix

Phoenix is a self-custodial Bitcoin wallet using Lightning to send/receive payments.
https://phoenix.acinq.co
Apache License 2.0
644 stars 97 forks source link

Wallet offline #350

Closed robbiehanson closed 3 months ago

robbiehanson commented 1 year ago

We've had several reports of wallets stuck in Offline mode:

We've gathered the following information from the reports:

robbiehanson commented 1 year ago

Theory 1: Maybe the wallet isn't unlocked because:

Tests performed:

if the read-from-keychain request never returns, the UI is stuck in this state:

if keychain request is dropped

if the loadWallet function returns early, then the app crashes because of various assumptions, such as this one within the AppStatusButton:

let syncTxManager = Biz.syncManager!.syncTxManager
robbiehanson commented 1 year ago

Theory 2: Maybe the database is corrupt

Test performed:

I tried purposefully corrupting the database file by overwriting it with random data. Result: the app crashed on launch

dpad85 commented 1 year ago

Another theory: an issue when serialising and/or uploading a payment to iCloud would deadlock the node bootstrap, leading to a responsive UI but a frozen node.

tschweg commented 1 year ago

Another theory: an issue when serialising and/or uploading a payment to iCloud would deadlock the node bootstrap, leading to a responsive UI but a frozen node.

Maybe this helps: I've had connectivity issues with the lightning node today after a prolonged period of not using the app (about a month or so).

Setup:

Ive tried the following to get it to connect:

After successful connect, I've re-enabled iCloud backup again, quit the app and relaunched. It now connects to LN properly again. 🤷