horizontalsystems / unstoppable-wallet-android

A powerful non-custodial multi-wallet for Bitcoin, Ethereum, Binance Smart Chain, Avalanche, Solana and other blockchains. Non-custodial crypto and NFT storage, onchain decentralized exchange, institutional grade analytics for cryptcurrency and NFT markets, extensive privacy controls and human oriented design. Implemented on Kotlin.
https://unstoppable.money
MIT License
903 stars 370 forks source link

Cannot send bitcoins: .bitcoincore.network.peer.PeerGroup$Error: peers not synced #6318

Closed BananchickPasha closed 1 year ago

BananchickPasha commented 1 year ago

Cannot transfer bitcoins anywhere. Sometimes this error does not appear and UI allows to "make" a transaction, but it ends up as pending, does not appear on the network and becomes failed in 20 minutes. Here is app status log:

App Info:
   - Current Time: Jul 21, 2023, 22:54
   - App Version: 0.33.2
   - Device Model: Google Pixel 6
   - OS Version: Android 13 (33)

App Log:
   - Send-BTC:e906ed8e-6601-4b86-816a-0c6c7833b1e4:
     - 1: 2023-07-21 19:52:19.724 click
     - 2: 2023-07-21 19:52:19.725 call btc-kit.send
     - 3: 2023-07-21 19:52:19.725 failed: java.lang.RuntimeException: io.horizontalsystems.bitcoincore.network.peer.PeerGroup$Error: peers not synced
io.reactivex.internal.util.ExceptionHelper.wrapOrThrow(ExceptionHelper.java:46)
io.reactivex.internal.observers.BlockingMultiObserver.blockingGet(BlockingMultiObserver.java:93)
io.reactivex.Single.blockingGet(Single.java:2870)
io.horizontalsystems.bankwallet.modules.send.bitcoin.SendBitcoinViewModel$send$2.invokeSuspend(SendBitcoinViewModel.kt:234)
kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)

Version History:
   - 0.33.2: Jul 21, 2023, 22:06

Wallets Status:
   - Wallet 1:
     - Origin: Restored
     - Mnemonic: 12

Blockchain Status:
   - Bitcoin-bip49:
     - Synced Until: N/A
     - Syncing Peer: N/A
     - Derivation: bip49
     - Sync State: Syncing-0.0
     - Last Block Height: N/A

Market Last Sync Timestamps:
   - Coins: 1688474855
   - Blockchains: 1688718216
   - Tokens: 1688474855
abdrasulov commented 1 year ago

Hello @BananchickPasha. It seems like the blockchain network issue. Based on the app status, there was no connected peer. But there should be connected peers so the Bitcoin wallet can sync with the network and send transactions. Can you please check the app status once again? If there are connected peers for "Wallet 1"

BananchickPasha commented 1 year ago

I've tried to make a transaction again and it didn't show any errors - transaction just silently failed after 10 minutes. It reproduces on 0.30.0 and even 0.26.0 so probably it's not relevant to recent code changes (i've made sucessfull bitcoin transactions back in october 2022 with this app).

But problem is definitelly in the app itself, as transcations in other wallets (at least in samourai) work fine.

Can you please check the app status once again? If there are connected peers for "Wallet 1"

Sure! As I mentioned, transaction still fail, but without showing any error message:

App Info:
   - Current Time: Jul 24, 2023, 16:50
   - App Version: 0.33.2
   - Device Model: Google Pixel 6
   - OS Version: Android 13 (33)

App Log:
   - Send-BTC:a549a422-beff-4d22-8182-9ce0dbe0e815:
     - 1: 2023-07-22 08:08:51.345 click
     - 2: 2023-07-22 08:08:51.347 call btc-kit.send
     - 3: 2023-07-22 08:08:51.413 success

   - Send-BTC:5492b6ce-b4a0-4bdd-9c40-55205b81a324:
     - 4: 2023-07-24 13:37:07.888 click
     - 5: 2023-07-24 13:37:07.889 call btc-kit.send
     - 6: 2023-07-24 13:37:07.936 success

Version History:
   - 0.33.2: Jul 22, 2023, 10:38

Wallets Status:
   - Wallet 1:
     - Origin: Restored
     - Mnemonic: 12

Blockchain Status:
   - Bitcoin-bip49:
     - Synced Until: Jul 24, 2023, 16:21
     - Syncing Peer: N/A
     - Derivation: bip49
     - Sync State: Synced
     - Last Block Height: 800060
     - Peer 1:
       - Status: Synced
       - Host: 5.144.88.83
       - Best Block: 800060
       - User Agent: /Satoshi:0.13.0/
       - tasks: no tasks
     - Peer 2:
       - Status: Synced
       - Host: 78.40.244.243
       - Best Block: 800060
       - User Agent: /Satoshi:0.13.0/
       - tasks: no tasks
     - Peer 3:
       - Status: Synced
       - Host: 5.144.84.87
       - Best Block: 800060
       - User Agent: /Satoshi:0.13.0/
       - tasks: no tasks

Market Last Sync Timestamps:
   - Coins: 1690189864
   - Blockchains: 1690189864
   - Tokens: 1690189864

So issue exists even with synced peers

abdrasulov commented 1 year ago

Based on the logs, the transaction was successfully sent to the peers. Probably it was rejected on the remote peers side. The bitcoin spv protocol has no ability to check the transaction status. So the app marks it as failed if it doesn't get the same transaction from other peers' mempool or in the blocks.

Please send us the failed transaction raw data to support.unstoppable@protonmail.com. You can find the raw data in the transaction info screen.