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

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

    Scheduled Pinned Locked Moved General pfSense Questions
    17 Posts 4 Posters 4.8k Views
    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.
    • M
      mrsunfire @furom
      last edited by

      @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 Reply Quote 0
      • F
        furom @mrsunfire
        last edited by

        @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 Reply Quote 0
        • M
          mrsunfire @furom
          last edited by

          @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

            @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 Reply Quote 1
            • F
              furom @mrsunfire
              last edited by

              @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
              • jimpJ jimp moved this topic from Problems Installing or Upgrading pfSense Software on
              • stephenw10S
                stephenw10 Netgate Administrator
                last edited by

                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 Reply Quote 1
                • F
                  furom @stephenw10
                  last edited by

                  @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

                    @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
                    • stephenw10S
                      stephenw10 Netgate Administrator
                      last edited by

                      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 Reply Quote 0
                      • S
                        SteveITS Galactic Empire @stephenw10
                        last edited by SteveITS

                        @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
                        • stephenw10S
                          stephenw10 Netgate Administrator
                          last edited by

                          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
                          • First post
                            Last post
                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.