Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#434 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
38/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
aws, php
領域
backend, cli, cloud

調査の方向性

提供された occ backup:point:upload コマンドで再現し、その後 apps/files_versions/lib/Storage.php の230行目付近と lib/Versions/VersionManager.php の90行目付近を調査します。custom_apps/backup/lib/Service/ExternalFolderService.php の223行目からの呼び出しを追跡し、バックアップをS3外部フォルダーにアップロードしても null IUser TypeError が発生せずに完了することを確認します。

索引モデルが issue の本文から書いたものです。

説明

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}
主要言語
PHP
スター
272
フォーク
37
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

nextcloud/backup のほかの issue

nextcloud/backup の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。