During initial backup, paths are always null
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Comienza con custom_apps/backup/lib/Service/PointService.php, especialmente con initBackupFS() y scanFoldersFromAppData(), y luego sigue el BeforeNodeWrittenEvent hasta apps/files_versions/lib/Listener/FileEventsListener.php y getPathForNode. Usa el stack trace proporcionado para reproducir el fallo del backup inicial. Se considera terminado cuando la ruta del backup ya no se pasa como null y el backup inicial puede continuar.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
I've just installed the app recently, and have been unable to take a backup so far.
I run the standard Nextcloud image inside a Docker container. I have both stages of the backup pointed to an NFS mount in the container. Double checked that the permissions are correct, but it's not even able to get to the point of actually storing anything.
It can't even read files because it keeps pulling up the path of whatever file it's trying to look at as null. This causes an error with one of the functions that is expecting a path string. I don't really know PHP so this has been difficult for me to try to debug, but I'm pretty sure it is deriving the user session as null in /var/www/html/apps/files_versions/lib/Listener/FileEventsListener.php. I added some logging to getPathForNode, and the $user and $owner variables both come up null. As a result, the function returns null, and that value is plugged into OC\Files\View->file_exists(), which is not expecting a null value. Full log:
An unhandled exception has been thrown:
TypeError: OC\Files\View::basicOperation(): Argument #2 ($path) must be of type string, null given, called in /var/www/html/lib/private/Files/View.php on line 528 and defined in /var/www/html/lib/private/Files/View.php:1128
Stack trace:
#0 /var/www/html/lib/private/Files/View.php(528): OC\Files\View->basicOperation('file_exists', NULL)
#1 /var/www/html/lib/private/Files/Filesystem.php(545): OC\Files\View->file_exists(NULL)
#2 /var/www/html/apps/files_versions/lib/Storage.php(189): OC\Files\Filesystem::file_exists(NULL)
#3 /var/www/html/apps/files_versions/lib/Listener/FileEventsListener.php(196): OCA\Files_Versions\Storage::store(NULL)
#4 /var/www/html/apps/files_versions/lib/Listener/FileEventsListener.php(102): OCA\Files_Versions\Listener\FileEventsListener->write_hook(Object(OC\Files\Node\File))
#5 /var/www/html/lib/private/EventDispatcher/ServiceEventListener.php(86): OCA\Files_Versions\Listener\FileEventsListener->handle(Object(OCP\Files\Events\Node\BeforeNodeWrittenEvent))
#6 /var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php(230): OC\EventDispatcher\ServiceEventListener->__invoke(Object(OCP\Files\Events\Node\BeforeNodeWrittenEvent), 'OCP\\Files\\Event...', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#7 /var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php(59): Symfony\Component\EventDispatcher\EventDispatcher->callListeners(Array, 'OCP\\Files\\Event...', Object(OCP\Files\Events\Node\BeforeNodeWrittenEvent))
#8 /var/www/html/lib/private/EventDispatcher/EventDispatcher.php(94): Symfony\Component\EventDispatcher\EventDispatcher->dispatch(Object(OCP\Files\Events\Node\BeforeNodeWrittenEvent), 'OCP\\Files\\Event...')
#9 /var/www/html/lib/private/EventDispatcher/EventDispatcher.php(106): OC\EventDispatcher\EventDispatcher->dispatch('OCP\\Files\\Event...', Object(OCP\Files\Events\Node\BeforeNodeWrittenEvent))
#10 /var/www/html/lib/private/Files/Node/HookConnector.php(100): OC\EventDispatcher\EventDispatcher->dispatchTyped(Object(OCP\Files\Events\Node\BeforeNodeWrittenEvent))
#11 /var/www/html/lib/private/legacy/OC_Hook.php(105): OC\Files\Node\HookConnector->write(Array)
#12 /var/www/html/lib/private/Files/View.php(1270): OC_Hook::emit('OC_Filesystem', 'write', Array)
#13 /var/www/html/lib/private/Files/View.php(1144): OC\Files\View->runHooks(Array, '/backup/staging...')
#14 /var/www/html/lib/private/Files/View.php(680): OC\Files\View->basicOperation('file_put_conten...', '/adam/files/bac...', Array, '')
#15 /var/www/html/lib/private/Files/Node/Folder.php(188): OC\Files\View->file_put_contents('/adam/files/bac...', '')
#16 /var/www/html/lib/private/Files/SimpleFS/SimpleFolder.php(89): OC\Files\Node\Folder->newFile('.nobackup', '')
#17 /var/www/html/custom_apps/backup/lib/Service/PointService.php(796): OC\Files\SimpleFS\SimpleFolder->newFile('.nobackup', '')
#18 /var/www/html/custom_apps/backup/lib/Service/PointService.php(642): OCA\Backup\Service\PointService->initBackupFS()
#19 /var/www/html/custom_apps/backup/lib/Command/PointScan.php(129): OCA\Backup\Service\PointService->scanFoldersFromAppData()
#20 /var/www/html/3rdparty/symfony/console/Command/Command.php(298): OCA\Backup\Command\PointScan->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /var/www/html/core/Command/Base.php(177): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 /var/www/html/3rdparty/symfony/console/Application.php(1040): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 /var/www/html/3rdparty/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Backup\Command\PointScan), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#24 /var/www/html/3rdparty/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#25 /var/www/html/lib/private/Console/Application.php(206): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#26 /var/www/html/console.php(100): OC\Console\Application->run()
#27 /var/www/html/occ(11): require_once('/var/www/html/c...')
#28 {main}%
I'm kind of not sure where to go from there. I'm not sure where this user session is coming from, and I don't have experience debugging PHP. Some help would be immensely appreciated.
- Lenguaje dominante
- PHP
- Estrellas
- 272
- Forks
- 37
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de nextcloud/backup
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 70/100
-
Update to NX 32 Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
-
Update to NX 30 Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
-
Translations are paused Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 45/100
Todos los issues de nextcloud/backup
Issues similares
-
Solved site promotion gate fails on runner PHP patch drift (expects 8.2.33, runner installs 8.2.34) Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Automattic/blocks-engine#2161 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Automattic/static-site-importer#1824 ·
-
[Chore] Keep one viget-block-generator skill and replicate it, instead of four tracked copies Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
Cannot reset column width Abierto0. Needs triage bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
0. Needs triage 35-feedback bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100