Hi all!
I downloaded the DVD image, performed the basic net configuration, and then in the GUI ran the full firmware update. Now every time I try to install a plugin, I get the following error:
/usr/local/opnsense/mvc/app/library/OPNsense/Core/Backend.php:169: stream_get_contents(): Argument #1 ($stream) must be of type resource, null given
Any ideas as to how to resolve this? It seems there's a regression in the update process from base to current. The version I updated to is: 23.7.12-amd64
PHP Trace:
[30-Jan-2024 05:40:41 Etc/UTC] PHP Fatal error: Uncaught TypeError: stream_get_contents(): Argument #1 ($stream) must be of type resource, null given in /usr/local/opnsense/mvc/app/library/OPNsense/Core/Backend.php:169
Stack trace:
#0 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Backend.php(169): stream_get_contents(NULL)
#1 /usr/local/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/JsonKeyValueStoreField.php(139): OPNsense\Core\Backend->configdRun('interface gatew...', false, 20)
#2 /usr/local/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/BaseField.php(193): OPNsense\Base\FieldTypes\JsonKeyValueStoreField->actionPostLoadingEvent()
#3 /usr/local/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/BaseField.php(191): OPNsense\Base\FieldTypes\BaseField->eventPostLoading()
#4 /usr/local/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/BaseField.php(191): OPNsense\Base\FieldTypes\BaseField->eventPostLoading()
#5 /usr/local/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/BaseField.php(191): OPNsense\Base\FieldTypes\BaseField->eventPostLoading()
#6 /usr/local/opnsense/mvc/app/models/OPNsense/Base/BaseModel.php(365): OPNsense\Base\FieldTypes\BaseField->eventPostLoading()
#7 [internal function]: OPNsense\Base\BaseModel->__construct()
#8 /usr/local/opnsense/mvc/script/run_migrations.php(52): ReflectionClass->newInstance()
#9 {main}
thrown in /usr/local/opnsense/mvc/app/library/OPNsense/Core/Backend.php on line 169
[29-Jan-2024 21:58:56 America/Los_Angeles] TypeError: stream_get_contents(): Argument #1 ($stream) must be of type resource, null given in /usr/local/opnsense/mvc/app/library/OPNsense/Core/Backend.php:169
Stack trace:
#0 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Backend.php(169): stream_get_contents(NULL)
#1 /usr/local/opnsense/mvc/app/controllers/OPNsense/Core/Api/FirmwareController.php(810): OPNsense\Core\Backend->configdRun('firmware status')
#2 [internal function]: OPNsense\Core\Api\FirmwareController->upgradestatusAction()
#3 [internal function]: Phalcon\Dispatcher\AbstractDispatcher->callActionMethod(Object(OPNsense\Core\Api\FirmwareController), 'upgradestatusAc...', Array)
#4 [internal function]: Phalcon\Dispatcher\AbstractDispatcher->dispatch()
#5 /usr/local/opnsense/www/api.php(24): Phalcon\Mvc\Application->handle('/api/core/firmw...')
#6 {main}
[29-Jan-2024 21:59:02 America/Los_Angeles] PHP Fatal error: Uncaught TypeError: stream_get_contents(): Argument #1 ($stream) must be of type resource, null given in /usr/local/opnsense/mvc/app/library/OPNsense/Core/Backend.php:169
Stack trace:
#0 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Backend.php(169): stream_get_contents(NULL)
#1 /usr/local/etc/inc/legacy_bindings.inc(41): OPNsense\Core\Backend->configdRun('template reload...', false)
#2 /usr/local/etc/inc/system.inc(794): configd_run('template reload...')
#3 /usr/local/etc/rc.configure_plugins(49): system_syslog_start(true)
#4 {main}
thrown in /usr/local/opnsense/mvc/app/library/OPNsense/Core/Backend.php on line 169
[29-Jan-2024 21:59:08 America/Los_Angeles] TypeError: stream_get_contents(): Argument #1 ($stream) must be of type resource, null given in /usr/local/opnsense/mvc/app/library/OPNsense/Core/Backend.php:169
Stack trace:
#0 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Backend.php(169): stream_get_contents(NULL)
#1 /usr/local/opnsense/mvc/app/controllers/OPNsense/Core/Api/FirmwareController.php(810): OPNsense\Core\Backend->configdRun('firmware status')
#2 [internal function]: OPNsense\Core\Api\FirmwareController->upgradestatusAction()
#3 [internal function]: Phalcon\Dispatcher\AbstractDispatcher->callActionMethod(Object(OPNsense\Core\Api\FirmwareController), 'upgradestatusAc...', Array)
#4 [internal function]: Phalcon\Dispatcher\AbstractDispatcher->dispatch()
#5 /usr/local/opnsense/www/api.php(24): Phalcon\Mvc\Application->handle('/api/core/firmw...')
#6 {main}
Thanks!
This patch may help. Apply it and then wait or 24.1 which is hours away
https://github.com/opnsense/core/commit/9da29cfb9f9801e755e2bfe76e0934a40f3758aa (https://github.com/opnsense/core/commit/9da29cfb9f9801e755e2bfe76e0934a40f3758aa)
opnsense-patch 9da29cf
I just upgraded to 24 rc1, didn't fix the issue. Can I still apply the patch?
Yes, the patch was committed after 24.1.r1 and with the last minute cancellation of r2 last week it means it will officially land on 24.1 today.
Great, thanks!