Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.NullPointerException errors connecting to custom node (BTCPay) #2895

Closed
britttttk opened this issue Jun 18, 2019 · 3 comments
Closed

Comments

@britttttk
Copy link

ERROR o.b.w.Wallet: Failed whilst saving wallet java.lang.NullPointerException: null
ERROR b.c.t.Task: An error occurred at task: CreateTakerFeeTx
Exception: java.lang.NullPointerException
ERROR b.c.t.Task: An error occurred at task: BuyerProcessPayoutTxPublishedMessage
Exception: java.lang.NullPointerException 

Restart solves the issues and the payout tx was in bisq wallet after closing the error below.
Screen Shot 2019-06-16 at 10 09 02 PM

Actually the transactions were able to be completed when I was connected to a custom node (btcpay node) but it seems #2873 needs to be fixed for security. So I returned the setting to Use provided Bitcoin Core nodes and there were no errors in a new tx. In case anyone else has this question/errors.

Hope it can be fixed soon :)

@devinbileck
Copy link
Member

The issue appears to originate from bitcoinj failing to save the wallet, which likely then causes the subsequent tasks to throw a null pointer exception.
See below for the full stack trace.

Jun-16 20:14:56.684 [JavaFX Application Thread] ERROR o.b.w.Wallet: Failed whilst saving wallet java.lang.NullPointerException: null
	at org.bitcoinj.wallet.WalletProtobufSerializer.writeConfidence(WalletProtobufSerializer.java:363)
	at org.bitcoinj.wallet.WalletProtobufSerializer.makeTxProto(WalletProtobufSerializer.java:291)
	at org.bitcoinj.wallet.WalletProtobufSerializer.walletToProto(WalletProtobufSerializer.java:151)
	at org.bitcoinj.wallet.WalletProtobufSerializer.writeWallet(WalletProtobufSerializer.java:123)
	at org.bitcoinj.wallet.Wallet.saveToFileStream(Wallet.java:1480)
	at org.bitcoinj.wallet.Wallet.saveToFile(Wallet.java:1294)
	at org.bitcoinj.wallet.WalletFiles.saveNowInternal(WalletFiles.java:137)
	at org.bitcoinj.wallet.WalletFiles.saveNow(WalletFiles.java:127)
	at org.bitcoinj.wallet.Wallet.saveNow(Wallet.java:1462)
	at org.bitcoinj.wallet.Wallet.maybeCommitTx(Wallet.java:2476)
	at org.bitcoinj.wallet.Wallet.commitTx(Wallet.java:2495)
	at org.bitcoinj.wallet.Wallet.receivePending(Wallet.java:1707)
	at bisq.core.btc.wallet.TradeWalletService.addTxToWallet(TradeWalletService.java:1084)
	at bisq.core.trade.protocol.tasks.buyer.BuyerProcessPayoutTxPublishedMessage.run(BuyerProcessPayoutTxPublishedMessage.java:57)
	at bisq.common.taskrunner.TaskRunner.next(TaskRunner.java:69)
	at bisq.common.taskrunner.TaskRunner.run(TaskRunner.java:60)
	at bisq.core.trade.protocol.BuyerAsTakerProtocol.handle(BuyerAsTakerProtocol.java:212)
	at bisq.core.trade.protocol.BuyerAsTakerProtocol.doHandleDecryptedMessage(BuyerAsTakerProtocol.java:227)
	at bisq.core.trade.protocol.TradeProtocol.lambda$new$0(TradeProtocol.java:76)
	at bisq.network.p2p.P2PService.lambda$onMessage$8(P2PService.java:410)
	at java.base/java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:804)
	at java.base/java.util.concurrent.CopyOnWriteArraySet.forEach(CopyOnWriteArraySet.java:425)
	at bisq.network.p2p.P2PService.onMessage(P2PService.java:409)
	at bisq.network.p2p.network.NetworkNode.lambda$onMessage$4(NetworkNode.java:344)
	at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
	at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658)
	at bisq.network.p2p.network.NetworkNode.onMessage(NetworkNode.java:344)
	at bisq.network.p2p.network.Connection.lambda$onMessage$3(Connection.java:390)
	at java.base/java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:804)
	at java.base/java.util.concurrent.CopyOnWriteArraySet.forEach(CopyOnWriteArraySet.java:425)
	at bisq.network.p2p.network.Connection.lambda$onMessage$4(Connection.java:390)
	at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$9(PlatformImpl.java:418)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:417)
	at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)

Jun-16 20:14:56.684 [JavaFX Application Thread] WARN  o.b.w.Wallet: Temp file still exists after failed save. 
Jun-16 20:14:56.685 [JavaFX Application Thread] ERROR b.c.t.Task: An error occurred at task: BuyerProcessPayoutTxPublishedMessage
Exception: java.lang.NullPointerException 
Jun-16 20:14:56.685 [JavaFX Application Thread] ERROR b.c.t.TaskRunner: Task failed: BuyerProcessPayoutTxPublishedMessage / errorMessage: An error occurred at task: BuyerProcessPayoutTxPublishedMessage
Exception: java.lang.NullPointerException 
Jun-16 20:14:56.685 [JavaFX Application Thread] ERROR b.c.t.p.TradeProtocol: An error occurred at task: BuyerProcessPayoutTxPublishedMessage
Exception: java.lang.NullPointerException 

@stale
Copy link

stale bot commented Sep 16, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the was:dropped label Sep 16, 2019
@britttttk
Copy link
Author

Closing this issue because Bisq was removed from the BTCPay Services, related to this issue #2873

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants