nextcloud / nextcloud/nextcloudpi
ncp-web backups.php crashes
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 2.9k
- Forks
- 318
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure by placing correctly named backup files in the configured DESTDIR, then inspect backups.php around line 76 and the inclusion from ncp-launcher.php. Confirm the fix by refreshing the System Info screen and verifying it remains available with backup files present.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100