Fatal error: Uncaught TypeError: Cannot access offset of type string ...
-
After posting this I found another post with exact same thing so marking mine as duplicate of this one.
Hi,
Upgraded my Netgate 2100 today to pfSense Plus 23.01 and while looking through menus I found this error under "Status / Interfaces";
Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/status_interfaces.php:137 Stack trace: #0 {main} thrown in /usr/local/www/status_interfaces.php on line 137 PHP ERROR: Type: 1, File: /usr/local/www/status_interfaces.php, Line: 137, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/status_interfaces.php:137 Stack trace: #0 {main} thrown
I get it is probably nothing more than the status of the interfaces that fails, but still... If this fails, could more be failing under the hood?
Is this a known one? I only see my WAN and LAN here, all else is eaten by the error... :) I got some banner I have not seen before;
Netgate pfSense Plus has detected a crash report or programming bug. Click here for more information.
Is this banner local or some central announcement?
Thanks
-
-
@furom Crash reports are on the device.
https://docs.netgate.com/pfsense/en/latest/development/panic-information.html?highlight=crash%20report -
@steveits I have the same issue by just hitting apply under Services/DHCP Server.
-
@mrsunfire I actually reverted back to 22.05 just in case. A few too many random events with PHP for me this time. Not knowing if any of them are severe or not... I love pfSense, but will stay on what I have until this has been explained/fixed.
-
@furom I'm doing a second clean install now. Confused because 23.01-RC didn't had that issue for me.
-
@mrsunfire said in Fatal error: Uncaught TypeError: Cannot access offset of type string ...:
@furom I'm doing a second clean install now. Confused because 23.01-RC didn't had that issue for me.
It seems many succeed too. If you can report success I might give it a go too later then. Good luck!
-
@furom After clean install and reverting my config I'm seeing another crash.
[18-Feb-2023 14:12:14 Europe/Berlin] PHP Fatal error: Uncaught TypeError: sort(): Argument #1 ($array) must be of type array, null given in /usr/local/www/pfblockerng/pfblockerng.php:1980 Stack trace: #0 /usr/local/www/pfblockerng/pfblockerng.php(1980): sort(NULL, 2) #1 /usr/local/pkg/pfblockerng/pfblockerng_install.inc(40): pfblockerng_get_countries() #2 /etc/inc/pkg-utils.inc(781) : eval()'d code(1): include_once('/usr/local/pkg/...') #3 /etc/inc/pkg-utils.inc(781): eval() #4 /etc/inc/pkg-utils.inc(899): eval_once('include_once('/...') #5 /etc/rc.packages(76): install_package_xml('pfBlockerNG') #6 {main} thrown in /usr/local/www/pfblockerng/pfblockerng.php on line 1980
-
@mrsunfire said in Fatal error: Uncaught TypeError: Cannot access offset of type string ...:
@furom After clean install and reverting my config I'm seeing another crash.
[18-Feb-2023 14:12:14 Europe/Berlin] PHP Fatal error: Uncaught TypeError: sort(): Argument #1 ($array) must be of type array, null given in /usr/local/www/pfblockerng/pfblockerng.php:1980 Stack trace: #0 /usr/local/www/pfblockerng/pfblockerng.php(1980): sort(NULL, 2) #1 /usr/local/pkg/pfblockerng/pfblockerng_install.inc(40): pfblockerng_get_countries() #2 /etc/inc/pkg-utils.inc(781) : eval()'d code(1): include_once('/usr/local/pkg/...') #3 /etc/inc/pkg-utils.inc(781): eval() #4 /etc/inc/pkg-utils.inc(899): eval_once('include_once('/...') #5 /etc/rc.packages(76): install_package_xml('pfBlockerNG') #6 {main} thrown in /usr/local/www/pfblockerng/pfblockerng.php on line 1980
Sorry to hear that. I did open a ticket to TAC support who also recommended me to reflash my unit. I also sent them my upgrade log, which looks horrible to say the least. I hope it helps them understand whats going on. I will tell them it is unlikely going to fix my issue then. Thanks for letting me know :)
-
@furom I did also open a support ticket. Will keep you up to date aswell.
-
@furom OK got a workaround for my problem that the crash happens when hitting "save" on DHCP Server tab. Using the console to edit the interface IP address (for any interface DHCP Server is running on, in my case I did chose LAN) and entering the same settings, saving it and restart webconfigurator. After that I can use the WebGUI and save the DHCP Server without any crash.
-
@mrsunfire Good one! Apparently PHP 8.1 is a lot stricter than v 7.x that was before. I'll still waiting for support to come back with some suggestion. It'll sort itself I suppose. Have a good one! :)
-
-
Nice. If you can check the config history after doing that to see what is added. It will almost certainly be populating or creating some tags that are otherwise missing from your config for some reason.
-
@stephenw10 said in Fatal error: Uncaught TypeError: Cannot access offset of type string ...:
Nice. If you can check the config history after doing that to see what is added. It will almost certainly be populating or creating some tags that are otherwise missing from your config for some reason.
It did populate. But this was on 22.05 prior to my last upgrade attempt
-
@mrsunfire said in Fatal error: Uncaught TypeError: Cannot access offset of type string ...:
@furom After clean install and reverting my config I'm seeing another crash.
[18-Feb-2023 14:12:14 Europe/Berlin] PHP Fatal error: Uncaught TypeError: sort(): Argument #1 ($array) must be of type array, null given in /usr/local/www/pfblockerng/pfblockerng.php:1980 Stack trace: #0 /usr/local/www/pfblockerng/pfblockerng.php(1980): sort(NULL, 2) #1 /usr/local/pkg/pfblockerng/pfblockerng_install.inc(40): pfblockerng_get_countries() #2 /etc/inc/pkg-utils.inc(781) : eval()'d code(1): include_once('/usr/local/pkg/...') #3 /etc/inc/pkg-utils.inc(781): eval() #4 /etc/inc/pkg-utils.inc(899): eval_once('include_once('/...') #5 /etc/rc.packages(76): install_package_xml('pfBlockerNG') #6 {main} thrown in /usr/local/www/pfblockerng/pfblockerng.php on line 1980
That’s on the package install? I got that too, at least it looks the same without walking upstairs:) but no issues after that I’ve found yet.
-
That should be fixed in the currently available package:
https://redmine.pfsense.org/issues/13950[23.01-RELEASE][admin@4100.stevew.lan]/root: pkg search pfBlocker pfSense-pkg-pfBlockerNG-3.2.0_2 pfSense package pfBlockerNG pfSense-pkg-pfBlockerNG-devel-3.2.0_2 pfSense package pfBlockerNG
-
@stephenw10 said in Fatal error: Uncaught TypeError: Cannot access offset of type string ...:
fixed in the currently available package
Good to know, but 3.2.0_2 is not available yet, even though it was "announced" three days ago. :)
Edit:
Shell Output - pkg search pfBlocker
pfSense-pkg-pfBlockerNG-3.2.0_1 pfSense package pfBlockerNG
pfSense-pkg-pfBlockerNG-devel-3.2.0_1 pfSense package pfBlockerNGAnother edit: Redmine shows "Waiting on Merge"
-
Yup, sorry, I tested from a box that is using our internal repo. Since it has been built and is there now it's probably only a matter of syncing them.