ReflectionException trying to delete legacy FW rules using migration assistant

Started by ltcptgeneral, Today at 09:23:23 AM

Previous topic - Next topic
I've managed to successfully migrate the FW rules to the new interface, but Opnsense throws the following error if I try to do step 5 (deleting the legacy rules):

[28-Feb-2026 00:05:49 America/Los_Angeles] ReflectionException: Class "OPNsense\" does not exist in /usr/local/opnsense/mvc/app/library/OPNsense/Core/ConfigMaintenance.php:62
Stack trace:
#0 /usr/local/opnsense/mvc/app/library/OPNsense/Core/ConfigMaintenance.php(62): ReflectionClass->__construct('OPNsense\\')
#1 /usr/local/opnsense/mvc/app/library/OPNsense/Core/ConfigMaintenance.php(42): OPNsense\Core\ConfigMaintenance->loadModels()
#2 /usr/local/opnsense/mvc/app/controllers/OPNsense/Firewall/Api/MigrationController.php(48): OPNsense\Core\ConfigMaintenance->__construct()
#3 /usr/local/opnsense/mvc/app/library/OPNsense/Mvc/Dispatcher.php(166): OPNsense\Firewall\Api\MigrationController->flushAction()
#4 /usr/local/opnsense/mvc/app/library/OPNsense/Mvc/Router.php(156): OPNsense\Mvc\Dispatcher->dispatch(Object(OPNsense\Mvc\Request), Object(OPNsense\Mvc\Response), Object(OPNsense\Mvc\Session))
#5 /usr/local/opnsense/mvc/app/library/OPNsense/Mvc/Router.php(139): OPNsense\Mvc\Router->performRequest(Object(OPNsense\Mvc\Dispatcher))
#6 /usr/local/opnsense/www/api.php(36): OPNsense\Mvc\Router->routeRequest('/api/firewall/m...', Array)
#7 {main}

This happens with or without legacy rules. There also seems to be ghost floating rules (which don't actually exist in the legacy floating rules list).