Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

S3 upload fails with Argument #1 ($user) must be of type OCP\IUser, null given

Abierto
#434 4 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
38/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
aws, php
Área
backend, cli, cloud

Línea de trabajo

Reproducir con el comando occ backup:point:upload proporcionado y, después, inspeccionar apps/files_versions/lib/Storage.php alrededor de la línea 230 y lib/Versions/VersionManager.php alrededor de la línea 90. Seguir la llamada desde custom_apps/backup/lib/Service/ExternalFolderService.php, línea 223, y verificar que la carga de una copia de seguridad en la carpeta externa de S3 se complete sin el null IUser TypeError.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

I can't upload backup archive (packed,compressed,encrypted) to s3, that is mounted as external storage and accessible in files interface. Folders are successfully created on s3, but files upload fails. Looks it tries to upload with a user owner in metadata, as seen in error message, that is inexistant as called from CLI.

NC 24.0.6 with official docker image. Backup 1.1.3.

$ ./occ backup:point:upload 20221018174455-full-xxxx --remote="amazon::external::xxxxxxxxxxxxxxxxxxxxxxxxxxx" -vvv
- uploading 20221018174455-full-xxxx to external folders
 - checking external folder 26:ncc
  > restoring point not found
  * Creating Restoring Point on external folder: ok
  > restoring point created
  * initiating health check
An unhandled exception has been thrown:
TypeError: OCA\Files_Versions\Versions\VersionManager::createVersion(): Argument #1 ($user) must be of type OCP\IUser, null given, called in /var/www/html/apps/files_versions/lib/Storage.php on line 230 and defined in /var/www/html/apps/files_versions/lib/Versions/VersionManager.php:90
Stack trace:
#0 /var/www/html/apps/files_versions/lib/Storage.php(230): OCA\Files_Versions\Versions\VersionManager->createVersion(NULL, Object(OC\Files\Node\File))
#1 /var/www/html/apps/files_versions/lib/Hooks.php(56): OCA\Files_Versions\Storage::store('/backups3bis/nc...')
#2 /var/www/html/lib/private/legacy/OC_Hook.php(106): OCA\Files_Versions\Hooks::write_hook(Array)
#3 /var/www/html/lib/private/Files/View.php(1290): OC_Hook::emit('OC_Filesystem', 'write', Array)
#4 /var/www/html/lib/private/Files/View.php(1160): OC\Files\View->runHooks(Array, '/backups3bis/nc...')
#5 /var/www/html/lib/private/Files/View.php(711): OC\Files\View->basicOperation('file_put_conten...', '/jeremy/files/bac...', Array, '{\n    "id": "20...')
#6 /var/www/html/lib/private/Files/Node/File.php(71): OC\Files\View->file_put_contents('/jeremy/files/bac...', '{\n    "id": "20...')
#7 /var/www/html/custom_apps/backup/lib/Service/ExternalFolderService.php(223): OC\Files\Node\File->putContent('{\n    "id": "20...')
#8 /var/www/html/custom_apps/backup/lib/Service/ExternalFolderService.php(388): OCA\Backup\Service\ExternalFolderService->getRestoringPoint(Object(OCA\Backup\Model\ExternalFolder), '20221018174455-...', true)
#9 /var/www/html/custom_apps/backup/lib/Service/UploadService.php(318): OCA\Backup\Service\ExternalFolderService->confirmPoint(Object(OCA\Backup\Model\ExternalFolder), Object(OCA\Backup\Model\RestoringPoint))
#10 /var/www/html/custom_apps/backup/lib/Command/PointUpload.php(129): OCA\Backup\Service\UploadService->uploadToExternalFolder(Object(OCA\Backup\Model\RestoringPoint), 0)
#11 /var/www/html/3rdparty/symfony/console/Command/Command.php(255): OCA\Backup\Command\PointUpload->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /var/www/html/core/Command/Base.php(168): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /var/www/html/3rdparty/symfony/console/Application.php(1009): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /var/www/html/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Backup\Command\PointUpload), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /var/www/html/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /var/www/html/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /var/www/html/console.php(100): OC\Console\Application->run()
#18 /var/www/html/occ(11): require_once('/var/www/html/c...')
#19 {main}
Lenguaje dominante
PHP
Estrellas
272
Forks
37
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de nextcloud/backup

Todos los issues de nextcloud/backup

Issues similares

Más issues de PHP

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.