Skip to content

Version 2 Installed Failed on pfsense 3100 with PHP Error - Crashed WebUI - Server 500 Error #502

@war59312

Description

@war59312

Describe the bug
Attempted install of v2 on my pfsense 3100. Already had working v1.

To Reproduce
Steps to reproduce the behavior:

  1. pkg-static -C /dev/null add https://github.com/jaredhendrickson13/pfsense-api/releases/download/v2.0.0/pfSense-24.03-pkg-RESTAPI.pkg

pfsense then craashes:

The web server encountered an error processing this request. 50x error

Expected behavior
Install cleanly without crashing

Response

Fetching pfSense-24.03-pkg-RESTAPI.pkg: ....... done
Installing pfSense-pkg-RESTAPI-2.0...
Extracting pfSense-pkg-RESTAPI-2.0: .......... done
Saving updated package information...
done.
Loading package configuration... done.
Configuring package components...
Loading package instructions...
Custom commands...
Menu items... done.
Writing configuration... done.
<pre style="white-space: pre-wrap;">PHP ERROR: Type: 64, File: /usr/local/pkg/RESTAPI/Validators/NumericRangeValidator.inc, Line: 23, Message: Cannot use float as default value for parameter $maximum of type int</pre><pre style="white-space: pre-wrap;">PHP ERROR: Type: 64, File: /usr/local/pkg/RESTAPI/Validators/NumericRangeValidator.inc, Line: 23, Message: Cannot use float as default value for parameter $maximum of type int</pre><pre style="white-space: pre-wrap;">PHP ERROR: Type: 64, File: /usr/local/pkg/RESTAPI/Validators/NumericRangeValidator.inc, Line: 23, Message: Cannot use float as default value for parameter $maximum of type int</pre><pre style="white-space: pre-wrap;">PHP ERROR: Type: 64, File: /usr/local/pkg/RESTAPI/Validators/NumericRangeValidator.inc, Line: 23, Message: Cannot use float as default value for parameter $maximum of type int</pre><pre style="white-space: pre-wrap;">PHP ERROR: Type: 64, File: /usr/local/pkg/RESTAPI/Validators/NumericRangeValidator.inc, Line: 23, Message: Cannot use float as default value for parameter $maximum of type int</pre><pre style="white-space: pre-wrap;">PHP ERROR: Type: 64, File: /usr/local/pkg/RESTAPI/Validators/NumericRangeValidator.inc, Line: 23, Message: Cannot use float as default value for parameter $maximum of type int</pre>pkg-static: POST-INSTALL script failed

pfSense Version & Package Version:

  • pfSense Version: 24.03
  • Package Version 2.0.0

Sadly webui is now hard down.

Tried via SSH:

11 Restart GUI
16 Restart PHP-FPN
15 Restore recent configuration

Sadly GUI is still down with 500 error.

Tried to remove via SSH but stil 500 error and remove failed too:

[24.03-RELEASE][admin@pfSense.localdomain]/root: pfsense-restapi delete
<pre style="white-space: pre-wrap;">PHP ERROR: Type: 64, File: /usr/local/pkg/RESTAPI/Validators/NumericRangeValidator.inc, Line: 23, Message: Cannot use float as default value for parameter $maximum of type int</pre>[24.03-RELEASE][admin@pfSense.localdomain]/root:

Alright managed to get webui back up and removed the package for now. See it removed both v1 and v2.

[24.03-RELEASE][admin@pfSense.localdomain]/root: pfsense-restapi delete
<pre style="white-space: pre-wrap;">PHP ERROR: Type: 64, File: /usr/local/pkg/RESTAPI/Validators/NumericRangeValidator.inc, Line: 23, Message: Cannot use float as default value for parameter $maximum of type int</pre>[24.03-RELEASE][admin@pfSense.localdomain]/root: pfsense-restapi delete
<pre style="white-space: pre-wrap;">PHP ERROR: Type: 64, File: /usr/local/pkg/RESTAPI/Validators/NumericRangeValidator.inc, Line: 23, Message: Cannot use float as default value for parameter $maximum of type int</pre>[24.03-RELEASE][admin@pfSense.localdomain]/root: rm /usr/local/pkg/RESTAPI/Validators/NumericRangeValidator.inc
[24.03-RELEASE][admin@pfSense.localdomain]/root: pfsense-restapi delete
<pre style="white-space: pre-wrap;">PHP ERROR: Type: 64, File: /usr/local/pkg/RESTAPI/Fields/FloatField.inc, Line: 69, Message: Cannot use float as default value for parameter $maximum of type int</pre>[24.03-RELEASE][admin@pfSense.localdomain]/root: rm /usr/local/pkg/RESTAPI/Fields/FloatField.inc
[24.03-RELEASE][admin@pfSense.localdomain]/root: pfsense-restapi delete
<pre style="white-space: pre-wrap;">PHP ERROR: Type: 64, File: /usr/local/pkg/RESTAPI/Fields/IntegerField.inc, Line: 70, Message: Cannot use float as default value for parameter $maximum of type int</pre>[24.03-RELEASE][admin@pfSense.localdomain]/root: rm /usr/local/pkg/RESTAPI/Fields/IntegerField.inc,
rm: /usr/local/pkg/RESTAPI/Fields/IntegerField.inc,: No such file or directory
[24.03-RELEASE][admin@pfSense.localdomain]/root: rm /usr/local/pkg/RESTAPI/Fields/IntegerField.inc
[24.03-RELEASE][admin@pfSense.localdomain]/root: pfsense-restapi delete
<pre style="white-space: pre-wrap;">PHP ERROR: Type: 64, File: /usr/local/pkg/RESTAPI/Fields/UnixTimeField.inc, Line: 74, Message: Cannot use float as default value for parameter $maximum of type int</pre>[24.03-RELEASE][admin@pfSense.localdomain]/root: rm /usr/local/pkg/RESTAPI/Fields/UnixTimeField.inc
[24.03-RELEASE][admin@pfSense.localdomain]/root: pfsense-restapi delete
pfSense-pkg-RESTAPI-2.0: missing file /usr/local/pkg/RESTAPI/Fields/FloatField.inc
pfSense-pkg-RESTAPI-2.0: missing file /usr/local/pkg/RESTAPI/Fields/IntegerField.inc
pfSense-pkg-RESTAPI-2.0: missing file /usr/local/pkg/RESTAPI/Fields/UnixTimeField.inc
pfSense-pkg-RESTAPI-2.0: missing file /usr/local/pkg/RESTAPI/Validators/NumericRangeValidator.inc
pfSense-pkg-RESTAPI-2.0: missing file /usr/local/www/api/v2/documentation/index.php
pfSense-pkg-RESTAPI-2.0: missing file /usr/local/www/api/v2/schema/index.php
pkg-static: unlinkat(usr/local/www/api/v2/schema/): No such file or directory
pkg-static: unlinkat(usr/local/www/api/v2/): No such file or directory
pkg-static: unlinkat(usr/local/www/api/v2/documentation/): No such file or directory
pkg-static: unlinkat(usr/local/www/api/v2/): No such file or directory
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-RESTAPI: 2.0

Number of packages to be removed: 1

The operation will free 6 MiB.
[1/1] Deinstalling pfSense-pkg-RESTAPI-2.0...
The RESTAPI package is not installed.

Deletion aborted.[1/1] Deleting files for pfSense-pkg-RESTAPI-2.0: ...
[1/1] Deleting files for pfSense-pkg-RESTAPI-2.0...
[1/1] Deleting files for pfSense-pkg-RESTAPI-2.0....
[1/1] Deleting files for pfSense-pkg-RESTAPI-2.0........
[1/1] Deleting files for pfSense-pkg-RESTAPI-2.0...
[1/1] Deleting files for pfSense-pkg-RESTAPI-2.0...
[1/1] Deleting files for pfSense-pkg-RESTAPI-2.0... done
Restarting webConfigurator... done.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions