Wol widget error after Update to 19.1.5

Started by opnsenseuser, April 05, 2019, 05:27:50 PM

Previous topic - Next topic
05-Apr-2019 17:05:18 Europe/Vienna] PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /usr/local/www/widgets/widgets/wake_on_lan.widget.php on line 64

Reinstallation chnged nothing
Supermicro A2SDi-4C-HLN4F
Team Rebellion Member (sidebar / themes: tukan, cicada & vicuna)

April 05, 2019, 06:15:37 PM #1 Last Edit: April 05, 2019, 08:00:43 PM by franco
PHP 7.2 runtime error I guess. Hard to catch.

https://github.com/opnsense/plugins/commit/588ceb595

# opnsense-patch -c plugins 588ceb595


Thanks,
Franco

this works for me:
opnsense-patch -c plugins 588ceb595
Supermicro A2SDi-4C-HLN4F
Team Rebellion Member (sidebar / themes: tukan, cicada & vicuna)

Yes, nice catch. Fixed the original post.

Quote from: franco on April 05, 2019, 08:00:57 PM
Yes, nice catch. Fixed the original post.

Seeing the same with DynDNS:
[05-Apr-2019 19:05:22 America/New_York] PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /usr/local/etc/inc/plugins.inc.d/dyndns/phpDynDNS.inc on line 754

I use Namecheap for my DynDNS and I'm not seeing a widget error like yours @DanMc85
AhnHEL (Angel)

@DanMc85

https://github.com/opnsense/plugins/commit/993562ab19

# opnsense-patch -c plugins 993562ab19

Looks like this is only for Cloudflare.


Cheers,
Franco

Hi there, thanks @opnsenseuser for submitting this & @franco for patching WOL.
However there are more problems as I discovered, Have submitted my crash report.
Goodluck @franco fixing them, I owe you one  8)
Thanks mark

Hi mark,

19.1.6 is out addressing most and disabling warnings for now. Kinda unfortunate, but it is what it is.


Thanks,
Franco

Quote from: franco on April 11, 2019, 04:06:54 PM
Hi mark,

19.1.6 is out addressing most and disabling warnings for now. Kinda unfortunate, but it is what it is.


Thanks,
Franco

Hey Franco, is this related to this?

Error at /usr/local/opnsense/mvc/app/controllers/OPNsense/IDS/Api/SettingsController.php:137 - count(): Parameter must be an array or an object that implements Countable (errno=2)

Error shows up in 19.1.6 when going to Services - > Intrusion Detection -> Administration -> Rules Tab.

It is. There was supposed to be a fix in there, but it doesn't seem complete. The whole handling of count() and its new warning seems a little out of touch since we've had warnings for years (PHP 5.6 to 7.0 to 7.1). I'll take a look.


Cheers,
Franco

No, I can't reproduce this on 19.1.6 -- not with empty rules, not with one, not with many. What am I missing?


Cheers,
Franco

April 14, 2019, 07:54:42 PM #12 Last Edit: April 14, 2019, 08:01:05 PM by DanMc85
Quote from: franco on April 14, 2019, 10:32:20 AM
No, I can't reproduce this on 19.1.6 -- not with empty rules, not with one, not with many. What am I missing?


Cheers,
Franco

I am not sure... I also have the A Problem Has Been Detected pop-up on the dashboard with this:

[13-Apr-2019 10:26:32 America/New_York] Exception: Error at /usr/local/opnsense/mvc/app/controllers/OPNsense/IDS/Api/SettingsController.php:137 - count(): Parameter must be an array or an object that implements Countable (errno=2) in /usr/local/opnsense/mvc/app/controllers/OPNsense/Base/ApiControllerBase.php:85
Stack trace:
#0 [internal function]: OPNsense\Base\ApiControllerBase->APIErrorHandler(2, 'count(): Parame...', '/usr/local/opns...', 137, Array)
#1 /usr/local/opnsense/mvc/app/controllers/OPNsense/IDS/Api/SettingsController.php(137): count(Array)
#2 [internal function]: OPNsense\IDS\Api\SettingsController->searchInstalledRulesAction()
#3 [internal function]: Phalcon\Dispatcher->callActionMethod(Object(OPNsense\IDS\Api\SettingsController), 'searchinstalled...', Array)
#4 [internal function]: Phalcon\Dispatcher->dispatch()
#5 /usr/local/opnsense/www/api.php(26): Phalcon\Mvc\Application->handle()
#6 {main}


Also, I am using these if it makes a difference:

os-etpro-telemetry (installed)   1.3_1   42.5KiB   ET Pro Telemetry Edition

et_telemetry.token:  *******
snort_vrt.oinkcode: *******
snort_vrt.rulesfile: snortrules-snapshot-2990.tar.gz

Hello, I've the same problem.
I have two Opnsense servers, and one of them has the error but the other not.
The only difference is that the one doesn't have the error message was upgraded from 19.1.4 to 19.1.5, and later to 19.1.6.
The server with the error message was upgraded directly from 19.1.4 to 19.1.6.
After upgrading to 19.1.7, the error message continues.

Thanks!