External storage - SMB downloads failing for files > 8192 bytes
Version: 21.0.1
I'm using the Apache Dockerfile with smbclient added: https://github.com/rawbertp/nextcloud-docker/commit/6d5d3401d74e282e24b369c420ebeb68f18b509e
This used to work fine in 20.0.8 (and before) - however, after upgrading to 21.0.1 I suddenly get an error when trying to download files larger than 8192 bytes from the external SMB storage:
[PHP] Error: Error: fread(): Icewind\SMB\Native\NativeReadStream::stream_read - read 242151 bytes more data than requested (250343 read, 8192 max) - excess data will be lost at /var/www/html/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php#55 at <<closure>>
0. <<closure>>
OC\Log\ErrorHandler::onError(2, "fread(): Icewin ... t", "/var/www/html/a ... p", 55, {count: 8192})
1. /var/www/html/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php line 55
fread(null, 8192)
2. /var/www/html/apps/files_external/3rdparty/icewind/streams/src/CallbackWrapper.php line 96
Icewind\Streams\Wrapper->stream_read(8192)
3. <<closure>>
Icewind\Streams\CallbackWrapper->stream_read(8192)
4. /var/www/html/3rdparty/sabre/http/lib/Sapi.php line 112
stream_copy_to_stream(null, null, 504295)
5. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 490
Sabre\HTTP\Sapi::sendResponse(Sabre\HTTP\Response {})
6. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 253
Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
7. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 321
Sabre\DAV\Server->start()
8. /var/www/html/apps/dav/lib/Server.php line 332
Sabre\DAV\Server->exec()
9. /var/www/html/apps/dav/appinfo/v2/remote.php line 35
OCA\DAV\Server->exec()
10. /var/www/html/remote.php line 167
require_once("/var/www/html/a ... p")
GET /remote.php/dav/files/<....>.pdf
I did a fresh test installation using the original Docker image and manually installing smbclient and libsmbclient in the container and it works, so something must be broken with my setup. :-/
Just to re-open this. This is still an issue in the docker versions, and below is the conversation going on at the server repo.
https://github.com/nextcloud/server/issues/26457
Even if I clone this repo, re-build the docker files in this repo I still have the issues without going into the container and either manipulating the files, or doing additional installs.