Project

General

Profile

Actions

Bug #14519

closed

PHP Error: Cannot access offset of type string on string in /usr/local/pkg/status_traffic_totals.inc:189

Added by L J 10 months ago. Updated 10 months ago.

Status:
Not a Bug
Priority:
Very Low
Assignee:
Category:
Status Traffic Totals
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Affected Version:
2.7.0
Affected Plus Version:
Affected Architecture:

Description

It seems that this error was already topic in #13775

Crash report begins. Anonymous machine information:

amd64
14.0-CURRENT
FreeBSD 14.0-CURRENT #0 RELENG_2_7_0-n255866-686c8d3c1f0: Thu Jun 22 06:29:30 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:
[27-Jun-2023 16:12:12 Europe/Berlin] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/status_traffic_totals.inc:189
Stack trace:
#0 /usr/local/pkg/status_traffic_totals.inc(76): vnstat_portlist()
#1 /usr/local/pkg/status_traffic_totals.inc(226): vnstat_create_nic_dbs()
#2 /etc/inc/pkg-utils.inc(709) : eval()'d code(1): vnstat_sync()
#3 /etc/inc/pkg-utils.inc(709): eval()
#4 /etc/rc.start_packages(66): sync_package('Traffic Totals')
#5 {main}
thrown in /usr/local/pkg/status_traffic_totals.inc on line 189
[27-Jun-2023 16:17:42 Europe/Berlin] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/status_traffic_totals.inc:189
Stack trace:
#0 /usr/local/pkg/status_traffic_totals.inc(76): vnstat_portlist()
#1 /usr/local/pkg/status_traffic_totals.inc(226): vnstat_create_nic_dbs()
#2 /etc/inc/pkg-utils.inc(709) : eval()'d code(1): vnstat_sync()
#3 /etc/inc/pkg-utils.inc(709): eval()
#4 /etc/rc.start_packages(66): sync_package('Traffic Totals')
#5 {main}
thrown in /usr/local/pkg/status_traffic_totals.inc on line 189

No FreeBSD crash data found.

As I have no idea on how to further troubleshoot this, can anyone give instructions on how to debug this. I'Ve updated the machine from 2.6.0 release to 2_7_0-n255866-686c8d3c1f0
AS far as I can see, there are no not-working things it is hust annoying.

Actions #1

Updated by Jim Pingle 10 months ago

  • Project changed from pfSense to pfSense Packages
  • Subject changed from status_traffic_totals crash report to PHP Error: Cannot access offset of type string on string in /usr/local/pkg/status_traffic_totals.inc:189
  • Category changed from Web Interface to Status Traffic Totals
  • Assignee set to Jim Pingle
  • Release Notes deleted (Default)

Looks like it's one of a common set of errors we've seen where the config has no (or a partial/empty) OpenVPN config so the code that makes the interface list in the package is erroring out.

Should be an easy fix.

Actions #2

Updated by Jim Pingle 10 months ago

  • Status changed from New to Not a Bug

OK I've tried but I can't reproduce this. The only thing I can think of is that somehow your system was trying to execute the old version of the package code from 2.6.0 while it was running on 2.7.0. So it may have been a glitch during the upgrade or maybe something happened where the package didn't update (or updated after this error).

The fix in #13775 is good and working, and I can't make it crash no matter what the config looks like.

Actions #3

Updated by L J 10 months ago

This is strange as I get this error every time I log into the web interface. I've reinstalled the package and now the error is gone. It seems to me that something went wrong during the update which was resolvable with a reinstallation

Actions #4

Updated by Jim Pingle 10 months ago

Yes, it's consistent with the package not updating during the upgrade. Updating the package to the current (fixed) code fixed it. So it's not a bug in this package, but something that went wrong during your upgrade.

Actions

Also available in: Atom PDF