pfBlocker-NG-devel 3.2.0_3 not uninstalling on 23.01
-
Note: this is with all the recommended patches for 23.01 installed.
>>> Removing pfSense-pkg-pfBlockerNG-devel... Checking integrity... done (0 conflicting) Deinstallation has been requested for the following 1 packages (of 0 packages in the universe): Installed packages to be REMOVED: pfSense-pkg-pfBlockerNG-devel: 3.2.0_3 Number of packages to be removed: 1 The operation will free 7 MiB. [1/1] Deinstalling pfSense-pkg-pfBlockerNG-devel-3.2.0_3... Removing pfBlockerNG-devel components... Menu items... done. Services... done. Loading package instructions... Removing pfBlockerNG... Removing all customizations/data... Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/config.lib.inc:928 Stack trace: #0 /etc/inc/config.lib.inc(680): cleanup_backupcache(true) #1 /usr/local/pkg/pfblockerng/pfblockerng.inc(10768): write_config('pfBlockerNG: Re...') #2 /etc/inc/pkg-utils.inc(781) : eval()'d code(1): pfblockerng_php_pre_deinstall_command() #3 /etc/inc/pkg-utils.inc(781): eval() #4 /etc/inc/pkg-utils.inc(1093): eval_once('pfblockerng_php...') #5 /etc/rc.packages(80): delete_package_xml('pfBlockerNG-dev...', 'deinstall') #6 {main} thrown in /etc/inc/config.lib.inc on line 928 PHP ERROR: Type: 1, File: /etc/inc/config.lib.inc, Line: 928, Message: Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/config.lib.inc:928 Stack trace: #0 /etc/inc/config.lib.inc(680): cleanup_backupcache(true) #1 /usr/local/pkg/pfblockerng/pfblockerng.inc(10768): write_config('pfBlockerNG: Re...') #2 /etc/inc/pkg-utils.inc(781) : eval()'d code(1): pfblockerng_php_pre_deinstall_command() #3 /etc/inc/pkg-utils.inc(781): eval() #4 /etc/inc/pkg-utils.inc(1093): eval_once('pfblockerng_php...') #5 /etc/rc.packages(80): delete_package_xml('pfBlockerNG-dev...', 'deinstall') #6 {main} thrownpkg-static: DEINSTALL script failed [1/1] Deleting files for pfSense-pkg-pfBlockerNG-devel-3.2.0_3: .......... done Removing pfBlockerNG-devel components... Configuration... done. >>> Removing stale packages... done. Success
-
I'm having the same problem on 23.01, but I'm using 3.2.0.3 non-DEVEL version (supposedly these are the same?).
It is definitely not deleting the pfblockerng configuration entries in config.xml.
How can I safely remove an old config and start over?
Thanks
-
@hefferbub said in pfBlocker-NG-devel 3.2.0_3 not uninstalling on 23.01:
How can I safely remove an old config and start over?
Have you uncheck this?:
-
@fireodo Thanks for the suggestion.
I did check that, but there seems to be a bug in the code that deletes the old configuration (as shown in the original post of this thread).
So my config entries remain, and get re-used when I reinstall the package.
I did have one idea of how to deal with this—if I do a manual backup and tell it not to back up package configuration, I could probably then restore from that to clean it up.
I have not tried it yet, however.
-
Did you reboot pfSense after you deleted the package including the settings. I seem to recall that you need to do that in order to clear all the old settings in the config file, other files, etc?
-
@jdeloach Yes. Still the error persists.
-
@hefferbub said in pfBlocker-NG-devel 3.2.0_3 not uninstalling on 23.01:
I did check that
You need to UNcheck the "keep settings" box. Otherwise the config is left in the config file, for example to keep settings after a pfSense version upgrade.
re: PHP error, with the migration to PHP 8 there have been quite a lot of PHP errors that were found in rarely used code. If it can be replicated you can look for it and make a report at https://redmine.pfsense.org.
-
@steveits It IS unchecked an the stack trace STILL triggers.
-
I tried uninstalling the devel version today (with Save Config unchecked), and it did not produce any errors.
However, when I download the config.xml, there are still several hundred lines of PFBlocker entries.
-
-
@lohphat Any reason why you cant upgrade to _4 then remove? If there is regression in an old package but not in the new one i dont see the redmine going places.
-
@michmoor Well you mentioned the issue of config crud still in the config file after removal. I included that in the bug description. So even if it doesn't throw a stack trace under _4 the config cleanup is still broken.
-
@lohphat true.
-
I've installed 3.2.0_4 and I'm still getting the stack trace.
>>> Removing pfSense-pkg-pfBlockerNG-devel... Checking integrity... done (0 conflicting) Deinstallation has been requested for the following 1 packages (of 0 packages in the universe): Installed packages to be REMOVED: pfSense-pkg-pfBlockerNG-devel: 3.2.0_4 Number of packages to be removed: 1 The operation will free 7 MiB. [1/1] Deinstalling pfSense-pkg-pfBlockerNG-devel-3.2.0_4... Removing pfBlockerNG-devel components... Menu items... done. Services... done. Loading package instructions... Removing pfBlockerNG... Removing all customizations/data... Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/config.lib.inc:928 Stack trace: #0 /etc/inc/config.lib.inc(680): cleanup_backupcache(true) #1 /usr/local/pkg/pfblockerng/pfblockerng.inc(10768): write_config('pfBlockerNG: Re...') #2 /etc/inc/pkg-utils.inc(781) : eval()'d code(1): pfblockerng_php_pre_deinstall_command() #3 /etc/inc/pkg-utils.inc(781): eval() #4 /etc/inc/pkg-utils.inc(1093): eval_once('pfblockerng_php...') #5 /etc/rc.packages(80): delete_package_xml('pfBlockerNG-dev...', 'deinstall') #6 {main} thrown in /etc/inc/config.lib.inc on line 928 PHP ERROR: Type: 1, File: /etc/inc/config.lib.inc, Line: 928, Message: Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/config.lib.inc:928 Stack trace: #0 /etc/inc/config.lib.inc(680): cleanup_backupcache(true) #1 /usr/local/pkg/pfblockerng/pfblockerng.inc(10768): write_config('pfBlockerNG: Re...') #2 /etc/inc/pkg-utils.inc(781) : eval()'d code(1): pfblockerng_php_pre_deinstall_command() #3 /etc/inc/pkg-utils.inc(781): eval() #4 /etc/inc/pkg-utils.inc(1093): eval_once('pfblockerng_php...') #5 /etc/rc.packages(80): delete_package_xml('pfBlockerNG-dev...', 'deinstall') #6 {main} thrownpkg-static: DEINSTALL script failed [1/1] Deleting files for pfSense-pkg-pfBlockerNG-devel-3.2.0_4: .......... done Removing pfBlockerNG-devel components... Configuration... done. >>> Removing stale packages... done. Success
-
@lohphat darn…I’ve seen this somewhere..Reddit maybe? I hope you get your answer but I would recommend posting on the pfblocker subreddit. The maintainer does chime in.
-
@michmoor He's responding to the Redmine bug.
-
@lohphat Very cool.