S3 upload fails with Argument #1 ($user) must be of type OCP\IUser, null given
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 38/100
調査の方向性
提供された 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 はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nextcloud/backup のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
-
Update to NX 32 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
-
Update to NX 30 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
nextcloud/backup の issue をすべて見る
似ている issue
-
Solved site promotion gate fails on runner PHP patch drift (expects 8.2.33, runner installs 8.2.34) オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Automattic/blocks-engine#2161 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
Automattic/static-site-importer#1824 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
0. Needs triage bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
0. Needs triage 35-feedback bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100