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

    Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, bool given in /usr/local/www/head.inc:535

    Scheduled Pinned Locked Moved webGUI
    4 Posts 2 Posters 253 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
      mbarlow
      last edited by

      Hi

      i have a Netgate 1100 running for many years. I dont really touch it except it occasionally upgrade OS. Its running the latest stable pfsense+ afaik.

      Out of nowhere it started becoming unresponsive a couple of weeks ago. About once a day. Does not recover till i power cycle it. I was trying to figure out what was wrong with device without luck. The logs dont show anything interesting going on when it powers off.

      Today, now the GUI is totally broken after a power cycle. Under the menus it as the exception:

      Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, bool given in /usr/local/www/head.inc:535 Stack trace: #0 /usr/local/www/system_user_settings.php(157): include() #1 {main} thrown in /usr/local/www/head.inc on line 535 PHP ERROR: Type: 1, File: /usr/local/www/head.inc, Line: 535, Message: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, bool given in /usr/local/www/head.inc:535 Stack trace: #0 /usr/local/www/system_user_settings.php(157): include() #1 {main} thrown
      

      The menus are broken and navigating to any page shows same thing. I dont have physical access to device, and i dont have ssh access enabled.

      I dont know if this is recoverable. Any tips for how to recover would be appreciated.

      Mainly I am referring to how to restore the GUI (or get ssh access). Without that, i cant continue to figure out why its becoming unresponsive. Perhaps they are related.

      Marty

      GertjanG 1 Reply Last reply Reply Quote 0
      • GertjanG
        Gertjan @mbarlow
        last edited by

        @mbarlow said in Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, bool given in /usr/local/www/head.inc:535:

        Its running the latest stable pfsense+ afaik.

        Looking at the file /usr/local/www/head.inc, line 535 makes me think it isn't 24.11.
        Upgrade 'asap'.

        @mbarlow said in Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, bool given in /usr/local/www/head.inc:535:

        Does not recover till i power cycle it.

        Power cycles (it like a head shot) is never a good thing.
        But I get it, sometimes the only solution. Just be aware that thing won't get any better when cycling.
        Added to that, I'm not sure, but the 1100 has the ZFS filesystem ? The one used before is way more sensible for file system errors, introduced when power cycling.

        @mbarlow said in Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, bool given in /usr/local/www/head.inc:535:

        The menus are broken and navigating to any page shows same thing

        Ok, you're heading towards a " bad file system system".

        @mbarlow said in Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, bool given in /usr/local/www/head.inc:535:

        I dont know if this is recoverable. Any tips for how to recover would be appreciated.

        If the drive itself isn't bad, it is.
        No need to use SSH this time, on-site presence and the console access is needed now.
        Request a firmware (24.11) from Netgate TAC.
        Go to to the pfSense Documentation pages (online) and see how you use Etcher to create a USB boot drive.
        Then re install pfSense from scratch.

        Power loss can happen. Just remember to execute a How to Run a pfSense Software File System Check (5/2020) when you power it up back again.

        No "help me" PM's please. Use the forum, the community will thank you.
        Edit : and where are the logs ??

        M 1 Reply Last reply Reply Quote 0
        • M
          mbarlow @Gertjan
          last edited by

          @Gertjan

          yes its running zfs. i had to actually completely rebuild it some time ago to get to next major version, as on this model the partition sizes were inadequate and one had to reimage it completely and not upgrade.

          and yeah, being remote rebooting it brought it back to life for a while. so i could access it and try to figure out what was wrong. after a few reboots it got in this state sadly.

          will spend time to digest rest of your suggestions. thanks.

          GertjanG 1 Reply Last reply Reply Quote 0
          • GertjanG
            Gertjan @mbarlow
            last edited by

            @mbarlow

            So you use 24.11 ?

            The thing is, this file /usr/local/www/head.inc and line :

            76180f08-ef13-4e57-aade-40f47834143c-image.png

            doesn't seem to match with what you have.
            There is no PHP on line 535.
            Ok, true, you use a 1100 so it's not 'amd/intel" based, you have an arm version.
            I'm presuming the GUI is still the same ...

            The fact that you use ZFS will protect you from file system issues.
            Just for the fun, when you have time, do the file check as explained in the video. It can't hurt ^^

            No "help me" PM's please. Use the forum, the community will thank you.
            Edit : and where are the logs ??

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