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

Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/etc/inc/rrd.inc #8043

Open
Zeitkind opened this issue Nov 6, 2024 · 2 comments
Labels
incomplete Issue template missing info

Comments

@Zeitkind
Copy link

Zeitkind commented Nov 6, 2024

Due to a hardware failure I have to replace one of my firewalls.
OPNsense version still 24.1.10_8 aka 11.2, I made a fresh install from USB, set LAN and WAN so I could update to 24.1.10_8, installed the plugins I use, reboot, then tried to restore from backup.

Backup setting: no rrd, no encryption on source system
Restore settings: all (default), exclude console setting (default)
Import starts, then it switches to a (debug?) website with:

Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/etc/inc/rrd.inc:622 Stack trace: #0 /usr/local/www/diag_backup.php(336): rrd_import() #1 {main} thrown in /usr/local/etc/inc/rrd.inc on line 622

Tried 3 times with different installations and 2 different backup-config.xml - same result. In the backup-xml the rrd part is just


  <rrddata>
  </rrddata>

i.e. no data, and rrd.inc has only 100 lines(?), so.. no idea. The import kinda succeeds, if I reboot, the system boots up with the right IP and settings, but I can't see if all data is restored. Any hints? Ideas?

@OPNsense-bot
Copy link

Thank you for creating an issue.
Since the ticket doesn't seem to be using one of our templates, we're marking this issue as low priority until further notice.

For more information about the policies for this repository,
please read https://github.com/opnsense/core/blob/master/CONTRIBUTING.md for further details.

The easiest option to gain traction is to close this ticket and open a new one using one of our templates.

@OPNsense-bot OPNsense-bot added the incomplete Issue template missing info label Nov 7, 2024
@Zeitkind
Copy link
Author

Zeitkind commented Nov 8, 2024

Additional info:
Just tried to import the backup to a vanilla 24.7.8. Error stays, but now

Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/etc/inc/rrd.inc:56 Stack trace: #0 /usr/local/www/diag_backup.php(337): rrd_import() #1 {main} thrown in /usr/local/etc/inc/rrd.inc on line 56

Looking into the code, that seems to be the part it looks for rrddata, so I tried simply removing the empty
<rrddata> </rrddata>

in the config.xml and now restore works without an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
incomplete Issue template missing info
Development

No branches or pull requests

2 participants