Rar Download unexpected end of archive

Hey folks,

Installed my first nextcloud setup all works fine.

But when i download a map and it gets a rar file the rar file seems completely empty with the message “unexpected end of archive”

Any idea how to resolve this?


Which version of NC do you have? You download with which browser and OS?
Can you download an archive on demo.nextcloud.com?

hi thnx for the reply.

i got the latest NC running on RPI.

i tried downloading with Chrome and firefox both got me a falty rar.

running on Win 10. both on my latop and desktop

from the demo it seems fine.

is there a max size to the download?

Do you mean the download option where NC creates archives itself? Under Windows (as client) this should be zip files. Or are these your own rars?
Can you check the server logfile, could be a memory problem …

yeah its the archive that gets created when you let NC make it. in this case its a sync map of 7GB. its possible its a memory problem. i’ll go check out the log

Thnx for your reply

a 50MB directory doesn’t seems to be a problem.

Exception: {“Exception”:“OverflowException”,“Message”:“Count64 object limited to 32 bit (overflow)”,“Code”:0,“Trace”:"#0 /var/www/nextcloud/3rdparty/mcnetic/zipstreamer/src/ZipStreamer.php(231): ZipStreamer\Count64_32->add(Array)\n#1 /var/www/nextcloud/lib/private/Streamer.php(98): ZipStreamer\ZipStreamer->addFileFromStream(Resource id #8427, ‘plugins/HDRI St…’)\n#2 /var/www/nextcloud/lib/private/Streamer.php(80): OC\Streamer->addFileFromStream(Resource id #8427, ‘plugins/HDRI St…’, 105200136)\n#3 /var/www/nextcloud/lib/private/Streamer.php(83): OC\Streamer->addDirRecursive(’/Software/C4d/K…’, ‘plugins/HDRI St…’)\n#4 /var/www/nextcloud/lib/private/Streamer.php(83): OC\Streamer->addDirRecursive(’/Software/C4d/K…’, ‘plugins/HDRI St…’)\n#5 /var/www/nextcloud/lib/private/Streamer.php(83): OC\Streamer->addDirRecursive(’/Software/C4d/K…’, ‘plugins/HDRI St…’)\n#6 /var/www/nextcloud/lib/private/Streamer.php(83): OC\Streamer->addDirRecursive(’/Software/C4d/K…’, ‘plugins/HDRI St…’)\n#7 /var/www/nextcloud/lib/private/legacy/files.php(165): OC\Streamer->addDirRecursive(’/Software/C4d/K…’)\n#8 /var/www/nextcloud/apps/files/ajax/download.php(63): OC_Files::get(’/Software/C4d/K…’, ‘plugins’, Array)\n#9 /var/www/nextcloud/lib/private/Route/Route.php(155) : runtime-created function(1): require_once(’/var/www/nextcl…’)\n#10 [internal function]: __lambda_func()\n#11 /var/www/nextcloud/lib/private/Route/Router.php(293): call_user_func(’\x00lambda_928’, Array)\n#12 /var/www/nextcloud/lib/base.php(967): OC\Route\Router->match(’/apps/files/aja…’)\n#13 /var/www/nextcloud/index.php(48): OC::handleRequest()\n#14 {main}",“File”:"/var/www/nextcloud/3rdparty/mcnetic/zipstreamer/src/lib/Count64.php",“Line”:221}

seems the zipstreamer is not handeling the big directory well.

is there any way one could just drag a direrctory to your windows map en its copies? much like how you can upload but then vice versa?

Do you run Nextcloud on a 64-bit system? 32-bit php has some problems with large file sizes.

well its installed on RPi rasbian jessie not sure what version it is prolly 32bit

I have the same problem happening with someone trying to download a large zip file from my server. It runs the latest stable version of nextcloud on a turris omnia within a linux container, ubuntu xenial.

Any solution for this?

If you get a similar error message indicating an overflow on a 32 bit system, there is not much you can do except of changing to a 64 bit system.

1 Like

Alright, thanks. There should be a workaround for systems that don’t have a 64bit architecture.

That would be the best, at least a more meaningful error-handling. Open a bug report to improve this: https://github.com/nextcloud/server/issues


Good idea.