rotdrop / nextcloud-app-files-archive

Archive inspection and extraction as Nextcloud app.
Other
9 stars 4 forks source link

Can't mount large .zip #44

Closed hampoelz closed 1 month ago

hampoelz commented 1 month ago

I'm not sure if this issue is related to #43, so I created a new one. I've a similar problem but with large (several gigabyte) zip files.

When I try to mount the archive, I also get an http 500 error message: Failed to mount archive file "/Archives/BigArchive.zip: Request failed with status code 500". When I open the archive details view, only unknown is displayed as information. In addition, the following error message is shown: Error: OCA\FilesArchive\Toolkit\Exceptions\ArchiveTooLargeException::__construct(): Argument #3 ($actualSize) must be of type int, array given, called in /var/www/html/custom_apps/files_archive/lib/Toolkit/Service/ArchiveService.php on line 291

Smaller zip archives can be mounted without problems.

rotdrop commented 1 month ago

... I really should establish a test-suit. Help wanted ;)

So this means that you have hit the Zip-Bomp limit (which is configurable, defaults to 4GB) and the error handling itself is broken. #43 is something different. From what you write I would assume that the error should not occur if you increase the administrative Zip-Bomp limit (as administrator, and later as ordinary user). Nevertheless this should be fixed, the idea was to inform the user in this case, not to run into PHP errors in the implementation of the error handling.

hampoelz commented 1 month ago

Increasing the size limit fixed the mounting issue. But the ArchiveTooLargeException is unfortunately still not displayed correctly in rc6. When mounting I now get an http 400 error. And opening the archive details view leads to the following log entry:

Error: Call to undefined method OCA\FilesArchive\Toolkit\Exceptions\ArchiveTooLargeException::getArchiveInfo() in file '/var/www/html/custom_apps/files_archive/lib/Controller/ArchiveController.php' line 154
rotdrop commented 1 month ago

ok ,checked again with some example zip-bomp files and I think the diagnostics are now fixed and working, see commit 674c579. No more pre-releases today, but the stable28 & stable29 branches contain the precompiled assets.

hampoelz commented 1 month ago

Can confirm that everything is working now. Thank you!