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

ncp-web backups.php crashes #1729

Open
tahoar opened this issue Feb 6, 2023 · 8 comments
Open

ncp-web backups.php crashes #1729

tahoar opened this issue Feb 6, 2023 · 8 comments
Labels
bug disruption Issues actively causing problems with existing installations has-updates

Comments

@tahoar
Copy link

tahoar commented Feb 6, 2023

NextCloud v25.0.3
NextCloudPi v1.51.0
Debian 11.6
PHP 8.1-fpm

Problem:
Nextcloudpi web UI (System Info screen) crashes when one or more backup files with proper name syntax (nextcloud-bkp_yyyymmdd_dddddddddd.tar.gz) are present in the configured nc-backup.cfg DESTDIR directory.

Result:
Initial System Info screen collects information (spinning mouse icon). It then shows status information but immediately goes blank with the message: "Something went wrong. Try refreshing the page"
I can navigate left menu to other apps, but returning to System Info screen is always blank. After hard browser refresh (ctrl-shift-R with Firefox), the screen collects information and then goes blank with message again.

Error message in error.log:
[Sun Feb 05 20:03:17.301164 2023] [proxy_fcgi:error] [pid 4438] [client 192.168.50.1:52012] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given in /var/www/ncp-web/backups.php:76\nStack trace:\n#0 /var/www/ncp-web/ncp-launcher.php(146): include()\n#1 {main}\n thrown in /var/www/ncp-web/backups.php on line 76'

Note: removing the backup files from the configured directory, followed by hard browser refresh clears the error and displays system information.

@tahoar
Copy link
Author

tahoar commented Mar 21, 2023

Ping... Any suggestions? The problem continues and the solution to remove the backup file from the configured folder still works. However, that's not the same as having it work properly.

@tahoar
Copy link
Author

tahoar commented Apr 12, 2023

Ping... This bug continues in NextcloudPi version v1.51.1 update.

@Dani-Pi
Copy link

Dani-Pi commented Jun 9, 2023

I see the same problem in v1.52.0. Cleaning up the backup folder solves the problem till a new backup is made.

@theCalcaholic
Copy link
Collaborator

Thanks for reporting! I'm currently very short on time but will try to look into this issue on the weekend.

@Dani-Pi
Copy link

Dani-Pi commented Jul 19, 2023

The bug continues in NCP v1.52.1

@theCalcaholic theCalcaholic added the disruption Issues actively causing problems with existing installations label Jul 21, 2023
@Dani-Pi
Copy link

Dani-Pi commented Jul 22, 2023

The bug continues in NCP v1.52.2

@Halloran
Copy link

in NCP v1.51.4 a similar issue occurs when the system has a corrupted backup-info-cache.cfg file. I was able to resolve this by renaming the backup-info-cache.cfg file, thought I don't know how the file got corrupted in the first place.

Looking at the code, it seems like adding a check to ensure that backup-info-cache.cfg contains valid json as is done for nc-backup-auto.cfg, might resolve the issue.

Thanks for your hard work on a great project!

@Dani-Pi
Copy link

Dani-Pi commented Sep 22, 2023

in NCP v1.51.4 a similar issue occurs when the system has a corrupted backup-info-cache.cfg file. I was able to resolve this by renaming the backup-info-cache.cfg file, thought I don't know how the file got corrupted in the first place.

Looking at the code, it seems like adding a check to ensure that backup-info-cache.cfg contains valid json as is done for nc-backup-auto.cfg, might resolve the issue.

Thanks for your hard work on a great project!

Solved the problem for me. Thank you, @Halloran !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug disruption Issues actively causing problems with existing installations has-updates
Projects
Status: In Progress
Development

No branches or pull requests

4 participants