Repository navigation
Closed
Labels
0. Needs triagePending check for reproducibility or if it fits our roadmapbugfeature: object storage
Description
- NC 19.0.4
- nGinx 1.19
- PHP 7.4.11
- APCU as Local cache
- Redis 5 as Distributed Memcache
- S3 Object Storage as primary
- MariaDB 10.4
Reproduce case here: #19009 (comment)
[remote] Error: TypeError: Argument 1 passed to OC\Files\Cache\CacheQueryBuilder::whereFileId() must be of the type int, null given, called in /srv/lib/private/Files/Cache/Cache.php on line 655 at <<closure>>
0. /srv/lib/private/Files/Cache/Cache.php line 655
OC\Files\Cache\CacheQueryBuilder->whereFileId(null)
1. /srv/lib/private/Files/Cache/Cache.php line 579
OC\Files\Cache\Cache->moveFromCache(OC\Files\Cache\Cache {}, "files/TEST A/DSC_0073.jpg.part", "files/TEST A/DSC_0073.jpg")
2. /srv/lib/private/Files/ObjectStore/ObjectStoreStorage.php line 481
OC\Files\Cache\Cache->move("files/TEST A/DSC_0073.jpg.part", "files/TEST A/DSC_0073.jpg")
3. /srv/lib/private/Files/Storage/Wrapper/Wrapper.php line 630
OC\Files\ObjectStore\ObjectStoreStorage->writeStream("files/TEST A/DSC_0073.jpg", null, 10987936)
4. /srv/lib/private/Files/Storage/Wrapper/Wrapper.php line 630
OC\Files\Storage\Wrapper\Wrapper->writeStream("files/TEST A/DSC_0073.jpg", null, null)
5. /srv/apps/dav/lib/Connector/Sabre/File.php line 192
OC\Files\Storage\Wrapper\Wrapper->writeStream("files/TEST A/DSC_0073.jpg", null)
6. /srv/apps/dav/lib/Connector/Sabre/Directory.php line 156
OCA\DAV\Connector\Sabre\File->put(null)
7. /srv/3rdparty/sabre/dav/lib/DAV/Tree.php line 316
OCA\DAV\Connector\Sabre\Directory->createFile("DSC_0073.jpg", null)
8. /srv/3rdparty/sabre/dav/lib/DAV/Tree.php line 130
Sabre\DAV\Tree->copyNode(OCA\DAV\Upload\FutureFile {}, OCA\DAV\Connector\Sabre\Directory {}, "DSC_0073.jpg")
9. /srv/3rdparty/sabre/dav/lib/DAV/Tree.php line 161
Sabre\DAV\Tree->copy("uploads/u221219 ... e", "files/u221219/TEST A/DSC_0073.jpg")
10. /srv/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 642
Sabre\DAV\Tree->move("uploads/u221219 ... e", "files/u221219/TEST A/DSC_0073.jpg")
11. <<closure>>
Sabre\DAV\CorePlugin->httpMove(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
12. /srv/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
call_user_func_array([Sabre\DAV\CorePlugin {},"httpMove"], [Sabre\HTTP\Requ ... }])
13. /srv/3rdparty/sabre/dav/lib/DAV/Server.php line 479
Sabre\Event\EventEmitter->emit("method:MOVE", [Sabre\HTTP\Requ ... }])
14. /srv/3rdparty/sabre/dav/lib/DAV/Server.php line 254
Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
15. /srv/apps/dav/lib/Server.php line 319
Sabre\DAV\Server->exec()
16. /srv/apps/dav/appinfo/v2/remote.php line 35
OCA\DAV\Server->exec()
17. /srv/remote.php line 165
require_once("/mnt/ ... p")
MOVE /remote.php/dav/uploads/u221219/web-file-upload-360dc11ec3f6b727dccf1f21382d298b-1579507080603/.file
Reacted by autoantwort, nat, orandev, Elliott Shugerman and devi
Metadata
Metadata
Assignees
Labels
0. Needs triagePending check for reproducibility or if it fits our roadmapbugfeature: object storage
Activity
gnikyt commentedon Jan 22, 2020
JUVOJustin commentedon Mar 13, 2020
kesselb commentedon Apr 3, 2020
MOVE /remote.php/dav/uploads/u221219/web-file-upload-360dc11ec3f6b727dccf1f21382d298b-1579507080603/.fileis related to assembly a file uploaded in chunks. I don't know how to reproduce that kind of failure. Uploading files in chunks with s3 (minio) works with my development setup.server/lib/private/Files/Cache/Cache.php
Line 614 in d918458
$sourceDatacould be false. Probably a check is missing here. But the actual error is happening earlier.It seems that $data is null.
https://github.com/nextcloud/3rdparty/blob/b0afba6d6508a1c85332cf8c61e90ad91b289ebc/sabre/dav/lib/DAV/Tree.php#L302-L311
$data = $source->get();returns null.cc @rullzer @icewind1991
solracsf commentedon Apr 30, 2020
For the record, i'm able to reproduce it every time with this test case:
1 file uploaded, 4 errors
And in the logfile 4 lines like:
williamsmt commentedon May 14, 2020
I can consistently repro this issue, but with a different test case. Same specs as @acsfer
solracsf commentedon May 17, 2020
Other errors while generating previews, this is completely spamming logs.
Details
[-]NC18: Argument 1 passed to OC\Files\Cache\CacheQueryBuilder::whereFileId() must be of the type int, null given[/-][+]CacheQueryBuilder::whereFileId() must be of the type int, null given[/+]williamsmt commentedon May 17, 2020
@acsfer - when repro’d, are you presented with a 500 error?
evan-a-a commentedon Jul 18, 2020
I'm able to reproduce this problem when attempting to run
encryption:encrypt-allon an instance with S3 backed storage.It's consistently failing at the same file.Update, doesn't appear to be the case as I just got a different file failure.solracsf commentedon Jul 28, 2020
Not always, but in some cases, yes.
vpecinka commentedon Sep 15, 2020
Same here - trying to remove folder from group folder with error:
The folder
vp-pokuswas successfully created over web interface and trying to be removed.vpecinka commentedon Sep 15, 2020
It seems that direcotry/file is removed, just this exception means web ui or sync errors. Small hot fix (don't now if this is proper solution) is as follows:
solracsf commentedon Sep 16, 2020
@vpecinka mind to open a PR to review?
vpecinka commentedon Sep 16, 2020
Well, I'm not sure this is a valid solution. It is a hotfix but the real question is why the
$sourceIdis null in this case.May you change the Cache.php locally and confirm that this condition
if ($sourceId) {works for you as well?solracsf commentedon Sep 16, 2020
Ok thanks; do you have a test case?
My previous test case is not valid anymore in 19.0.3; it now trows an "Lock" warning and not the "CacheQueryBuilder" error.
vpecinka commentedon Sep 16, 2020
I am able to reproduce this error on 18.0.9 while using "group folders" app
my_test) and add yourself (a group you are member of) to itmy_test\sub\test.txt)subsolracsf commentedon Oct 18, 2020
@vpecinka i was able to test it today using #19009 (comment) and confirm
if ($sourceId) {works here.szaimen commentedon Jun 17, 2021
I cannot reproduce this #19009 (comment) on NC21.0.2
If this is still happening please make sure to upgrade to the latest version. After that, feel free to reopen. The latest version can be seen by checking https://nextcloud.com/install/#install-clients and https://nextcloud.com/install/#instructions-server respectively.
brainchild0 commentedon Aug 2, 2023
I am reproducing the problem, in Nextcloud 27 (27.0.1.2).
It is running with MariaDB 10.2 (10.2.31), PHP 8.0 (8.0.26), under CentOS 7 (7.9.2009).
I have further attempted the process after a sequence of operations, including
files:cleanup,files:repair-tree, andfiles:scan, but such preparations produce no improvement.Once the error occurs, I must restore the entire deployment from backup, because even thought the file store is only partially decrypted, subsequent calls to the same command for decryption report that the store is no longer encrypted, and performs no action.
The message shown for subsequent attempts to decrypt is as follows:
Catch more invalid cache source storage paths
Catch more invalid cache source storage paths
Catch more invalid cache source storage paths
Catch more invalid cache source storage paths
Catch more invalid cache source storage paths