question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crashing while sending transaction request

See original GitHub issue

Hey I am receiving the following crash while trying to send a transaction request:

com.example.cryptobitcoinkit E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.cryptobitcoinkit, PID: 5600
    java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:523)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055)
     Caused by: java.lang.reflect.InvocationTargetException
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055) 
     Caused by: io.horizontalsystems.bitcoincore.network.peer.PeerGroup$Error: peers not synced
        at io.horizontalsystems.bitcoincore.transactions.TransactionSender.canSendTransaction(TransactionSender.kt:44)
        at io.horizontalsystems.bitcoincore.transactions.TransactionCreator.create(TransactionCreator.kt:31)
        at io.horizontalsystems.bitcoincore.transactions.TransactionCreator.create(TransactionCreator.kt:18)
        at io.horizontalsystems.bitcoincore.BitcoinCore.send(BitcoinCore.kt:457)
        at io.horizontalsystems.bitcoincore.AbstractKit.send(AbstractKit.kt:60)
        at io.horizontalsystems.bitcoincore.AbstractKit.send$default(AbstractKit.kt:59)
        at com.example.cryptobitcoinkit.MainActivity.onCreate$lambda-0(MainActivity.kt:86)
        at com.example.cryptobitcoinkit.MainActivity.$r8$lambda$OxZgY3xITDn8ztSYdEnEMoew3NM(Unknown Source:0)
        at com.example.cryptobitcoinkit.MainActivity$$ExternalSyntheticLambda0.onClick(Unknown Source:2)
        at android.view.View.performClick(View.java:7281)
        at com.google.android.material.button.MaterialButton.performClick(MaterialButton.java:1119)
        at android.view.View.performClickInternal(View.java:7255)
        at android.view.View.access$3600(View.java:828)
        at android.view.View$PerformClick.run(View.java:27925)
        at android.os.Handler.handleCallback(Handler.java:900)
        at android.os.Handler.dispatchMessage(Handler.java:103)
        at android.os.Looper.loop(Looper.java:219)
        at android.app.ActivityThread.main(ActivityThread.java:8393)

However, the setup is done correctly and i am receiving the wallet object correctly like the following: status => {Synced Until=Fri Oct 15 16:40:12 GMT+03:00 2021, Syncing Peer=N/A, Derivation=BIP44, Sync State=Syncing-0.0, Last Block Height=2099200}, balance => BalanceInfo(spendable=157223820, unspendable=0), receiveAddress => mg2Lbzhw7CKeGzaWWioPnDXRtLAXnwkVqK

I am waiting until the sync is done and pressing a button to send a request. I am testing on test-net syncmode and as you can notice the syncing peer is N/A

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
abdrasulovcommented, Oct 19, 2021

Sounds good. I think we can close it for now. If you have any other questions please let us know

0reactions
mahmoudHijaziNcommented, Oct 19, 2021

Hey @abdrasulov, will test it on the Main Net later, since now I am testing sending/receiving transactions through bitcoin test faucets. I tested the testNet on a different network ( a faster one) and the sync was a bit faster so you’re probably right.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Crash when options dictionary is null in ... - GitHub
A crash occurs when the "options" dictionary for a Sign And Send Transaction request is given to the Solana Provider.
Read more >
Ledger crashing when trying to send Cardano from Yoroi
Hey, Trying to send some Cardano from Yoroi to another wallet and every time I try and authorise the transaction Ledger crashes.
Read more >
Yoroi Wallet: Error received from api method call while ...
Yoroi Wallet: Error received from api method call while sending transaction. request failed with status code 500 - object object.
Read more >
App with in-app purchase crashes w… - Apple Developer
The funny thing is that I downloaded it and tried to purchase it for testing purposes and it crashes when the button that...
Read more >
Flutter app crashes on concurrent transactions performed on ...
If you are running on a physical iOS device, the crash is caused by this bug in the FlutterFire binding library. There doesn't...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found