Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pfSense 2.7.0: php errors & crash report after install #380

Closed
maxlluky opened this issue Jul 19, 2023 · 1 comment · Fixed by #386
Closed

pfSense 2.7.0: php errors & crash report after install #380

maxlluky opened this issue Jul 19, 2023 · 1 comment · Fixed by #386
Labels
bug Something isn't working regression Potential regressions that need new tests written

Comments

@maxlluky
Copy link

Describe the bug
Hello, I have the following crash reports with the new pfSense version 2.7.0 after installing the API. I have tested with two pfSense instances. Unfortunately both times the same error. The API can be used "normally" after the installation. However, after creating a new API token, a PHP error message also appears in the webui.

To Reproduce
Steps to reproduce the behavior:

  1. Install the API via the Webui -> Command Prompt
  2. Reload the Webui
  3. See the Crash Report

Expected behavior
A normal install of the API without any crash report or php error-messages

pfSense Version & Package Version:

  • pfSense Version: [pfSense 2.7.0]
  • Package Version [latest (19.07.2023)]

Additional context
Crash report begins. Anonymous machine information:

amd64
14.0-CURRENT
FreeBSD 14.0-CURRENT #1 RELENG_2_7_0-n255866-686c8d3c1f0: Wed Jun 28 04:21:19 UTC 2023 root@freebsd:/var/jenkins/workspace/pfSense-CE-snapshots-2_7_0-main/obj/amd64/LwYAddCr/var/jenkins/workspace/pfSense-CE-snapshots-2_7_0-main/sources/FreeBSD-src-REL

Crash report details:

PHP Errors:
[19-Jul-2023 11:08:53 Europe/Berlin] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/api/framework/APITools.inc:1136
Stack trace:
#0 /etc/inc/api/framework/APITools.inc(1174): APITools\api_request('https://10.252....', 'PUT', '{"enable":"","p...', 'anka-gw-02-sync', '###############')
#1 /usr/local/share/pfSense-pkg-API/manage.php(82): APITools\sync()
#2 /usr/local/share/pfSense-pkg-API/manage.php(161): sync()
#3 {main}
thrown in /etc/inc/api/framework/APITools.inc on line 1136

@jaredhendrickson13
Copy link
Owner

Hey!

Thanks for reporting this. This looks like a regression in the API sync feature due to the changes in PHP 8 introduced in pfSense 2.7. I'll work on a patch and see what I can do to improve tests for the sync feature in the future.

Thanks!

@jaredhendrickson13 jaredhendrickson13 added bug Something isn't working regression Potential regressions that need new tests written labels Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working regression Potential regressions that need new tests written
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants