OPNsense Forum

English Forums => 19.1 Legacy Series => Topic started by: opnsenseuser on April 05, 2019, 05:27:50 pm

Title: Wol widget error after Update to 19.1.5
Post by: opnsenseuser on April 05, 2019, 05:27:50 pm
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
Title: Re: Wol widget error after Update to 19.1.5
Post by: franco on April 05, 2019, 06:15:37 pm
PHP 7.2 runtime error I guess. Hard to catch.

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

# opnsense-patch -c plugins 588ceb595


Thanks,
Franco
Title: Re: Wol widget error after Update to 19.1.5
Post by: opnsenseuser on April 05, 2019, 07:31:28 pm
this works for me:
Code: [Select]
opnsense-patch -c plugins 588ceb595
Title: Re: Wol widget error after Update to 19.1.5
Post by: franco on April 05, 2019, 08:00:57 pm
Yes, nice catch. Fixed the original post.
Title: Re: Wol widget error after Update to 19.1.5
Post by: DanMc85 on April 06, 2019, 01:13:36 am
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
Title: Re: Wol widget error after Update to 19.1.5
Post by: AhnHEL on April 07, 2019, 06:26:34 am
I use Namecheap for my DynDNS and I'm not seeing a widget error like yours @DanMc85
Title: Re: Wol widget error after Update to 19.1.5
Post by: franco on April 07, 2019, 10:24:08 am
@DanMc85

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

# opnsense-patch -c plugins 993562ab19

Looks like this is only for Cloudflare.


Cheers,
Franco
Title: Re: Wol widget error after Update to 19.1.5
Post by: qinohe on April 10, 2019, 08:15:24 pm
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
Title: Re: Wol widget error after Update to 19.1.5
Post by: 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
Title: Re: Wol widget error after Update to 19.1.5
Post by: DanMc85 on April 13, 2019, 04:28:27 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.
Title: Re: Wol widget error after Update to 19.1.5
Post by: franco on April 14, 2019, 10:10:02 am
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
Title: Re: Wol widget error after Update to 19.1.5
Post by: 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
Title: Re: Wol widget error after Update to 19.1.5
Post by: DanMc85 on April 14, 2019, 07:54:42 pm
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
Title: Re: Wol widget error after Update to 19.1.5
Post by: fjtrooper on May 04, 2019, 10:57:30 am
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!