• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Fatal error: Uncaught TypeError: Cannot access offset of type string ...

General pfSense Questions
4
17
4.0k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F
    furom
    last edited by furom Feb 18, 2023, 6:16 AM Feb 17, 2023, 8:52 PM

    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

    S 1 Reply Last reply Feb 18, 2023, 6:30 AM Reply Quote 0
    • F furom referenced this topic on Feb 18, 2023, 6:11 AM
    • S
      SteveITS Galactic Empire @furom
      last edited by Feb 18, 2023, 6:30 AM

      @furom Crash reports are on the device.
      https://docs.netgate.com/pfsense/en/latest/development/panic-information.html?highlight=crash%20report

      Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
      When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
      Upvote ๐Ÿ‘ helpful posts!

      M 1 Reply Last reply Feb 18, 2023, 11:49 AM Reply Quote 1
      • M
        mrsunfire @SteveITS
        last edited by Feb 18, 2023, 11:49 AM

        @steveits I have the same issue by just hitting apply under Services/DHCP Server.

        Netgate 6100 MAX

        F 1 Reply Last reply Feb 18, 2023, 12:12 PM Reply Quote 0
        • F
          furom @mrsunfire
          last edited by Feb 18, 2023, 12:12 PM

          @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.

          M 1 Reply Last reply Feb 18, 2023, 12:19 PM Reply Quote 1
          • M
            mrsunfire @furom
            last edited by mrsunfire Feb 18, 2023, 12:19 PM Feb 18, 2023, 12:19 PM

            @furom I'm doing a second clean install now. Confused because 23.01-RC didn't had that issue for me.

            Netgate 6100 MAX

            F 1 Reply Last reply Feb 18, 2023, 12:25 PM Reply Quote 0
            • F
              furom @mrsunfire
              last edited by Feb 18, 2023, 12:25 PM

              @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!

              M 1 Reply Last reply Feb 18, 2023, 1:15 PM Reply Quote 0
              • M
                mrsunfire @furom
                last edited by Feb 18, 2023, 1:15 PM

                @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
                
                

                Netgate 6100 MAX

                F S 2 Replies Last reply Feb 18, 2023, 1:30 PM Reply Quote 0
                • F
                  furom @mrsunfire
                  last edited by Feb 18, 2023, 1:30 PM

                  @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 :)

                  M 2 Replies Last reply Feb 18, 2023, 1:34 PM Reply Quote 0
                  • M
                    mrsunfire @furom
                    last edited by Feb 18, 2023, 1:34 PM

                    @furom I did also open a support ticket. Will keep you up to date aswell.

                    Netgate 6100 MAX

                    1 Reply Last reply Reply Quote 1
                    • M
                      mrsunfire @furom
                      last edited by Feb 18, 2023, 1:42 PM

                      @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.

                      Netgate 6100 MAX

                      F 1 Reply Last reply Feb 18, 2023, 3:53 PM Reply Quote 1
                      • F
                        furom @mrsunfire
                        last edited by Feb 18, 2023, 3:53 PM

                        @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! :)

                        1 Reply Last reply Reply Quote 1
                        • J jimp moved this topic from Problems Installing or Upgrading pfSense Software on Feb 19, 2023, 4:34 PM
                        • S
                          stephenw10 Netgate Administrator
                          last edited by Feb 19, 2023, 7:29 PM

                          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.

                          F 1 Reply Last reply Feb 19, 2023, 9:57 PM Reply Quote 1
                          • F
                            furom @stephenw10
                            last edited by Feb 19, 2023, 9:57 PM

                            @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

                            1 Reply Last reply Reply Quote 0
                            • S
                              SteveITS Galactic Empire @mrsunfire
                              last edited by Feb 19, 2023, 10:13 PM

                              @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.

                              Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
                              When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
                              Upvote ๐Ÿ‘ helpful posts!

                              1 Reply Last reply Reply Quote 0
                              • S
                                stephenw10 Netgate Administrator
                                last edited by Feb 19, 2023, 10:17 PM

                                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
                                
                                S 1 Reply Last reply Feb 19, 2023, 10:51 PM Reply Quote 0
                                • S
                                  SteveITS Galactic Empire @stephenw10
                                  last edited by SteveITS Feb 19, 2023, 10:54 PM Feb 19, 2023, 10:51 PM

                                  @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 pfBlockerNG

                                  Another edit: Redmine shows "Waiting on Merge"

                                  Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
                                  When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
                                  Upvote ๐Ÿ‘ helpful posts!

                                  1 Reply Last reply Reply Quote 0
                                  • S
                                    stephenw10 Netgate Administrator
                                    last edited by Feb 20, 2023, 12:41 AM

                                    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.

                                    1 Reply Last reply Reply Quote 0
                                    9 out of 17
                                    • First post
                                      9/17
                                      Last post
                                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.