OPNsense Forum

English Forums => 26.1, 26,4 Series => Topic started by: RolandR on May 18, 2026, 06:35:54 PM

Title: Fatal error: Uncaught TypeError: OPNsense\Firewall\Util::getRealInterface()
Post by: RolandR on May 18, 2026, 06:35:54 PM
Since the update to OPNsense 26.1.8_5 (amd64) I get the following error, Does anyone now how to fix this?
I just updated to the latest packages/version and since then it stops booting at this point.


Generating /etc/resolv.conf...
Fatal error: Uncaught TypeError: OPNsense\Firewall\Util::getRealInterface():
Argument #1 ($interface) must be of type string, null given, called in /usr/local/opnsense/mvc/app/models/OPNsense/Routing/Gateways.php on line 367 and defined in /usr/local/opnsense/mvc/app/library/OPNsense/Firewall/Util.php:686
Stack trace:
#0 /usr/local/opnsense/mvc/app/models/OPNsense/Routing/Gateways.php(367): OPNsense\Firewall\Util::getRealInterface(NULL, 'inet')
#1 /usr/local/opnsense/mvc/app/models/OPNsense/Routing/Gateways.php(517): OPNsense\Routing\Gateways->getGateways()
#2 /usr/local/etc/inc/plugins.inc.d/dpinger.inc(111): OPNsense\Routing\Gateways->gatewaysIndexedByName()
#3 /usr/local/etc/inc/plugins.inc.d/dpinger.inc(38): dpinger_instances()
#4 /usr/local/etc/inc/plugins.inc(81): dpinger_services()
#5 /usr/local/etc/inc/util.inc(116): plugins_services()
#6 /usr/local/etc/inc/util.inc(111): service_by_name('*', Array)
#7 /usr/local/etc/inc/system.inc(212): service_by_filter(Array)
#8 /usr/local/etc/inc/system.inc(511): system_resolvconf_generate(true)
#9 /usr/local/etc/rc.bootup(85): system_resolver_configure(true)

Thanks for any hints on this.
Roland
Title: Re: Fatal error: Uncaught TypeError: OPNsense\Firewall\Util::getRealInterface()
Post by: franco on May 18, 2026, 07:24:34 PM
Hi Roland,

Thanks for the report.  This should fix your issue:

# opnsense-patch https://github.com/opnsense/core/commit/e80ad1a106


Cheers,
Franco
Title: Re: Fatal error: Uncaught TypeError: OPNsense\Firewall\Util::getRealInterface()
Post by: RolandR on May 18, 2026, 08:09:29 PM
It works, great!

Great support here!
Thank you,
Roland
Title: Re: Fatal error: Uncaught TypeError: OPNsense\Firewall\Util::getRealInterface()
Post by: franco on May 18, 2026, 08:14:10 PM
Thanks for confirming and sorry about the situation.


Cheers,
Franco