Forum Replies Created
-
AuthorPosts
-
October 14, 2022 at 7:45 am in reply to: Plugin could not be activated because it triggered a fatal error. #12199
alexg
KeymasterAh yes, thank you very much for reporting this.
It is partly my fault, and partly the fault of another plugin that you are using. Both plugins attempt to load the Parsedown library, and both plugins don’t check if the library is already loaded.
The issue is here: https://github.com/dashed-slug/wallets/blob/6.0.0-RC4/admin/documentation.php#L15-L16
I will correct this in the next release. In the meantime, you can delete these lines, then, further down in the file, where the library is being used, you can add the following:
if ( ! class_exists( 'Parsedown' ) ) { require_once DSWALLETS_PATH . '/third-party/Parsedown.php'; } if ( ! class_exists( 'ParsedownExtra' ) ) { require_once DSWALLETS_PATH . '/third-party/ParsedownExtra.php'; }
right above the following code:
// render markdown $pd = new \ParsedownExtra; $html = $pd->text( $markdown );
Thank you for noticing and reporting this issue. I will apply the patch on the next version.
with regards
alexg
KeymasterOK this is now fixed in version 6.0.0-RC4.
Again, a big thank you for reporting this! Please report any other issues if you see any.
alexg
KeymasterThank you very much for providing this information. I had not tested deposits with a non-zero deposit fee (oops!)
I will be uploading a version
6.0.0-RC4
today on this website. It resolves this issue, as well as some more that I have identified in the meantime.alexg
KeymasterThank you for providing screenshots. Unfortunately I was not able to determine what the issue is.
Just to make sure that we are on the same page, I will summarise the issue so far. Please check that I have understood you correctly.
The plugin is not being notified immediately about incoming deposits.
You have added the following lines to your config file:
walletnotify=curl -s 'https://exchange.napocoin.net/wp-json/dswallets/v1/walletnotify/25335/%s' >/dev/null
blocknotify=curl -s 'https://exchange.napocoin.net/wp-json/dswallets/v1/blocknotify/25335/%s' >/dev/null
Where 25335 is the post_id of your Napocoin Currency entry.
When you logged in to your wallet server, you have attempted the following command:
curl ‘https://exchange.napocoin.net/wp-json/dswallets/v1/walletnotify/25335/ABCD’
and you get as result:
{"message":"The plugin is being notified about this TXID. If a user is associated with one of its output addresses, a deposit will be registered for this user.","status":"success"}
The above is to be expected when the TXID is invalid.
But if you try the same command with a correct TXID that corresponds to your deposit, then you see on the screen the message:
There has been a critical error on this website.
This may be due to a difference between napocoin and bitcoin JSON-RPC APIs. The difference could be something trivial.
The only way to be sure is to see the PHP error that occurs at the time when you run the curl command with the correct TXID.
Can you please find this error message? The error will be in your PHP error log, and also in
wp-content/debug.log
if logging is enabled.Let me know if you can find the error.
with regards
alexg
KeymasterHello,
Thank you for providing screenshots regarding the above.
I am assuming you are using version
6.0.0-RC3
.The screenshots you provided are not from the plugin’s own editors. Can you please use the plugin’s built in editors?
Based on the trace you provided, the plugin is trying to load a wallet by its string name, rather than a post ID:
DSWallets\Wallet::load('bitcoin')
I am not sure how that can happen. The argument passed to
Wallet::load()
must be an integer, and the plugin’s editor does not allow you to associate a currency with anything other than awallets_wallet
post ID.I am guessing based on the screenshots you provided, that maybe you used another post meta editor to modify the currency post type? If so, please use the plugin’s own editor.
I am planning to upload a version RC4 with some bug fixes, and this should be the last RC before the final release. But I don’t think that any of the unreleased fixes apply to your particular bug.
(I am taking things slow because I lost a loved one this week and it’s still hard to concentrate on work. Sorry about that. As soon as possible, I plan to continue with the release plan and other planned improvements to the products and website.)
TL;DR The plugin should not ever be calling
Wallet::load('bitcoin')
. From the stack trace, it looks like you tried to save a currency with a wallet stringbitcoin
, which is incorrect. I think this is an issue related to you using another post meta editor.Please let me know if this makes any sense?
with regards
P.S. I use this email for work, not the one at gmail.
alexg
KeymasterCan you please email me screenshots of the currency editor screen and the wallet editor screen?
You can hide any sensitive information in the screenshot if you like.
alexg
KeymasterHmm…
I will look at this issue. The plugin should not be crashing like this.
But in the meantime, can you check that you have associated your coin/currency to the wallet?
I will let you know what I find after investigating.
with regards
alexg
KeymasterHello,
Check your walletnotify and blocknotify lines in the config. The plugin recommends the correct config to you when connection is not possible.
The curl commands specified in these lines should be executable.
There are many reasons why the commands may not be executing. For example, maybe curl is not installed.
Remove the
-s
argument (silent) and the redirect to/dev/null
, and run a command from the shell to see if it hits the wallet api.For example, if the plugin recommends that you add to your config:
walletnotify=curl -sk https://example.com/wallets/api3/notify/BTC/wallet/TXID >/dev/null
then login to your wallet server, and run the following command in the shell:
curl -k https://example.com/wallets/api3/notify/BTC/wallet/TXID
where TXID should be replaced with a TXID that you wish to notify for.
Let me know if you have any questions about this.
with regards
alexg
KeymasterHello,
The outgoing TC connection to your wallet server fails with a timeout after 10 seconds.
Timeouts are usually due to firewalls.
You should check what firewalls protect the server where the wallet is running. You should allow incoming TCP connections on port 8711.
If you are on a hosting provider, you should contact them and let them know that you want them to add this rule to their firewalls.
If you are managing the server yourself, you should also check any software firewalls on the server (e.g.
ufw
,iptables
, etc).Hope this helps. Please let me know if you have any more questions.
with regards
alexg
KeymasterNot yet unfortunately.
alexg
KeymasterHello,
You are using a version of Bitcoin and Altcoin Wallets before 6.0.0 (which is still in RC status).
Could it be that you have installed the adapter version 2.x? Please note the version requirements at the download page. You should be using version
1.2.1
with your version of the plugin.Apologies for the confusion. This will be resolved when I finally push 6.0.0 to wordpress.org.
with regards
alexg
KeymasterUnfortunately no, there is no support for assets on the Ravencoin blockchain.
alexg
KeymasterHello,
The Exchange and all the other available app-extensions are agnostic as to the technologies for various coins/tokens. This means that it will work for all currencies, as long as there are wallet adapters that can support the wallets.
If you are trying to connect to a RavenCoin full node wallet:
I have not tested the RavenCoin wallet, but I know it’s a Bitcoin core fork, from a quick look at its github, it looks as if its JSON-RPC API should be identical to that of Bitcoin.
If this is the case, then the instructions for installing the wallet are the same as those for Bitcoin. See steps 6 to 52.
If you are trying to connect to a CoinPayments account:
There should be no issues with using RavenCoin via CoinPayments. Just enable the coin in the CoinPayments account.Once the Currency appears in the plugin, you will be able to use it to create markets. The exchange doesn’t know or care how the currencies work behind the scene.
Hope this helps.
Let me know if you have any more questions.
with regards
alexg
KeymasterOK,
2.0.2
is up, please follow the same three steps as discussed above.alexg
KeymasterThank you for the very detailed response.
I will have to upload another patch with the full fix. It will be version
2.0.2
.Sorry about all the trouble. I guess I will have to catch up on my sleep, so I don’t do silly mistakes like this one 🙂
-
AuthorPosts