-
Notifications
You must be signed in to change notification settings - Fork 6
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
PHP Fatal error: Uncaught Error: Call to a member function error() on null in wp-content/plugins/crowdsec/inc/Bounce.php:339 #91
Comments
Update, i noticed that if I use another plugin "Advanced CRON Manager" and issue "Execute now" for the task, it gets executed without error, and in crowdsec_api.log i get the expected result.
For the scheduled task the error still persists. Wordpress is 5.9.3, timezone is UTC+3, Crowdsec plugin is 1.4.1, PHP 7.4.29, MariaDB 10.3.34
|
Thanks for reporting this. As for the issue #90 , it seems that something does not work as expected for some cron process. |
Hi @cRUSHr2012, I tried by installing different plugins that run different cron, but with no luck. By reading your logs, it seems that:
Could you tell me if you are using the native In any case, I will try to publish a next release in order to log the root cause error even if something goes wrong before the logger initialization. |
Hi. Other info : I'm using a custom port for the API, because 8080 is used by another app. It's set also in the plugin. I have tested the plugin without any CDN IP's but it's the same. Another custom option that i have is in NGINX logging, replacing $remote_addr with $http_cf_connecting_ip, but this should't influence the cron jobs. Also the two CRON plugins that i've tested do not change the way WP cron runs (this is what I think). They just show what's in the DB in wp_options / cron row. If you need more info, just let me know. |
Another update : I've installed crowdsec plugin on a WP site that's on cPANEL (different server) with PHP 8.0 / Apache 2.4 / WP 5.9.3 The api log shows only the initial connection when I activate "STREAM" mode.
|
Hi @cRUSHr2012 , Those messages should begin with Could you please use the |
Hi, after the update I see this in debug.log :
But, it works ! crowdsec_api.log
I've tested it also on the WP site running on cPANEL, and it works. The log for this one is the same:
|
Thanks for the update. Well, the initial error is now well logged without throwing the fatal error. So, I guess it should not break any other processes anymore. But, the initial error is still there, and I will work on it. As far as I understand, headers are already sent when we are trying to start the session. I guess some other process is sending the header before the crowdsec plugin loading. I will see what we can do to handle this in a better way. |
Hi @cRUSHr2012, Could you please try it ? The |
All good now ! Tested on both sites. |
I have this issue : in STREAM mode, wordpress cron task does not work for updates from the local API.
In /wp-content/debug.log
[11-May-2022 09:17:14 UTC] PHP Fatal error: Uncaught Error: Call to a member function error() on null in /var/www/clients/client0/web5/web/wp-content/plugins/crowdsec/inc/Bounce.php:339 Stack trace: #0 /var/www/clients/client0/web5/web/wp-content/plugins/crowdsec/inc/bounce-current-ip.php(27): Bounce->safelyBounce() #1 /var/www/clients/client0/web5/web/wp-includes/class-wp-hook.php(307): safelyBounceCurrentIp() #2 /var/www/clients/client0/web5/web/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters() #3 /var/www/clients/client0/web5/web/wp-includes/plugin.php(474): WP_Hook->do_action() #4 /var/www/clients/client0/web5/web/wp-settings.php(450): do_action() #5 /var/www/clients/client0/web5/web/wp-config.php(106): require_once('/var/www/client...') #6 /var/www/clients/client0/web5/web/wp-load.php(50): require_once('/var/www/client...') #7 /var/www/clients/client0/web5/web/wp-cron.php(44): require_once('/var/www/client...') #8 {main} thrown in /var/www/clients/client0/web5/web/wp-content/plugins/crowdsec/inc/Bounce.php on line 339
I'm testing this on 4 WP sites (different themes / plugins / WP versions) on the same ISPConfig Debian 11 server with NGINX & PHP 7.4.
Crowdsec plugin version is 1.4.1
I have crowdsec installed locally. In the LIVE mode, i see events in /var/log/crowdsec_api.log.
In STREAM mode i only see expected events when activating the plugin or manually clicking on "Refresh the cache now"
This also blocks all other Wordpress cron jobs. I can see this with Wordpress plugin "WP Crontrol". Manually executing the task from "WP Crontrol" trows the same error.
The text was updated successfully, but these errors were encountered: