You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error: ZipArchive::open(): Using empty file as ZipArchive is deprecated #27064
@szaimen @acsfer
I had the same error in Nextcloud 22.
And using fix #27075 solved this issue.
I have made patch directly in source code.
Thank You
{"reqId":"v4mep9qvkcJP6f87mdTR","level":3,"time":"2021-11-12T03:22:50+00:00","remoteAddr":"25.65.85.22","user":"admin","app":"PHP","method":"GET","url":"/core/preview?fileId=85162&x=32&y=32","message":"ZipArchive::open(): Using empty file as ZipArchive is deprecated at /var/www/html/lib/private/Archive/ZIP.php#51","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:94.0) Gecko/20100101 Firefox/94.0","version":"22.2.0.2","exception":{"Exception":"Error","Message":"ZipArchive::open(): Using empty file as ZipArchive is deprecated at /var/www/html/lib/private/Archive/ZIP.php#51","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[8192,"ZipArchive::open(): Using empty file as ZipArchive is deprecated","/var/www/html/lib/private/Archive/ZIP.php",51]},{"file":"/var/www/html/lib/private/Archive/ZIP.php","line":51,"function":"open","class":"ZipArchive","type":"->","args":["/tmp/oc_tmp_JpaHhF",1]},{"file":"/var/www/html/lib/private/Preview/Bundled.php","line":41,"function":"__construct","class":"OC\\Archive\\ZIP","type":"->","args":["/tmp/oc_tmp_JpaHhF"]},{"file":"/var/www/html/lib/private/Preview/OpenDocument.php","line":44,"function":"extractThumbnail","class":"OC\\Preview\\Bundled","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"},"Thumbnails/thumbnail.png"]},{"file":"/var/www/html/lib/private/Preview/GeneratorHelper.php","line":62,"function":"getThumbnail","class":"OC\\Preview\\OpenDocument","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"},2048,2048]},{"file":"/var/www/html/lib/private/Preview/Generator.php","line":245,"function":"getThumbnail","class":"OC\\Preview\\GeneratorHelper","type":"->","args":[{"__class__":"OC\\Preview\\OpenDocument"},{"__class__":"OC\\Files\\Node\\File"},2048,2048]},{"file":"/var/www/html/lib/private/Preview/Generator.php","line":140,"function":"getMaxPreview","class":"OC\\Preview\\Generator","type":"->","args":[{"__class__":"OC\\Files\\SimpleFS\\SimpleFolder"},{"__class__":"OC\\Files\\Node\\File"},"application/vnd.oasis.opendocument.text",""]},{"file":"/var/www/html/lib/private/Preview/Generator.php","line":109,"function":"generatePreviews","class":"OC\\Preview\\Generator","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"},[{"width":32,"height":32,"crop":true,"mode":"fill"}],"application/vnd.oasis.opendocument.text"]},{"file":"/var/www/html/lib/private/PreviewManager.php","line":189,"function":"getPreview","class":"OC\\Preview\\Generator","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"},32,32,true,"fill",null]},{"file":"/var/www/html/core/Controller/PreviewController.php","line":169,"function":"getPreview","class":"OC\\PreviewManager","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"},32,32,true,"fill"]},{"file":"/var/www/html/core/Controller/PreviewController.php","line":142,"function":"fetchPreview","class":"OC\\Core\\Controller\\PreviewController","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"},32,32,false,true,"fill"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":217,"function":"getPreviewByFileId","class":"OC\\Core\\Controller\\PreviewController","type":"->","args":[85162,32,32,false,true,"fill"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OC\\Core\\Controller\\PreviewController"},"getPreviewByFileId"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":156,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OC\\Core\\Controller\\PreviewController"},"getPreviewByFileId"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":301,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OC\\Core\\Controller\\PreviewController","getPreviewByFileId",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"core.Preview.getPreviewByFileId"}]},{"file":"/var/www/html/lib/base.php","line":1000,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/core/preview"]},{"file":"/var/www/html/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"id":"618dde0ac37e8"}
Hi, please update to 24.0.9 or better 25.0.3 and report back if it fixes the issue. Thank you!
My goal is to add a label like e.g. 25-feedback to this ticket of an up-to-date major Nextcloud version where the bug could be reproduced. However this is not going to work without your help. So thanks for all your effort!
Activity
szaimen commentedon May 22, 2021
Hi, thanks for your report! Please post at least your config.php file to make debugging possible. Thanks!
Using empty file as ZipArchive is deprecated
solracsf commentedon May 22, 2021
Mind to try #27075?
[-]Deprecated ZIP function[/-][+]Error: `ZipArchive::open()`: Using empty file as ZipArchive is deprecated[/+]antiuser commentedon May 24, 2021
@szaimen
Hi! Sorry for late answer
szaimen commentedon May 24, 2021
@antiuser thanks for your config.php file! Please test if the patch that @acsfer provided in #27075 fixes your issue, thanks!
Using empty file as ZipArchive is deprecated
Using empty file as ZipArchive is deprecated
pawanrai9999 commentedon Nov 12, 2021
@szaimen @acsfer
I had the same error in Nextcloud 22.
And using fix #27075 solved this issue.
I have made patch directly in source code.
Thank You
{"reqId":"v4mep9qvkcJP6f87mdTR","level":3,"time":"2021-11-12T03:22:50+00:00","remoteAddr":"25.65.85.22","user":"admin","app":"PHP","method":"GET","url":"/core/preview?fileId=85162&x=32&y=32","message":"ZipArchive::open(): Using empty file as ZipArchive is deprecated at /var/www/html/lib/private/Archive/ZIP.php#51","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:94.0) Gecko/20100101 Firefox/94.0","version":"22.2.0.2","exception":{"Exception":"Error","Message":"ZipArchive::open(): Using empty file as ZipArchive is deprecated at /var/www/html/lib/private/Archive/ZIP.php#51","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[8192,"ZipArchive::open(): Using empty file as ZipArchive is deprecated","/var/www/html/lib/private/Archive/ZIP.php",51]},{"file":"/var/www/html/lib/private/Archive/ZIP.php","line":51,"function":"open","class":"ZipArchive","type":"->","args":["/tmp/oc_tmp_JpaHhF",1]},{"file":"/var/www/html/lib/private/Preview/Bundled.php","line":41,"function":"__construct","class":"OC\\Archive\\ZIP","type":"->","args":["/tmp/oc_tmp_JpaHhF"]},{"file":"/var/www/html/lib/private/Preview/OpenDocument.php","line":44,"function":"extractThumbnail","class":"OC\\Preview\\Bundled","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"},"Thumbnails/thumbnail.png"]},{"file":"/var/www/html/lib/private/Preview/GeneratorHelper.php","line":62,"function":"getThumbnail","class":"OC\\Preview\\OpenDocument","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"},2048,2048]},{"file":"/var/www/html/lib/private/Preview/Generator.php","line":245,"function":"getThumbnail","class":"OC\\Preview\\GeneratorHelper","type":"->","args":[{"__class__":"OC\\Preview\\OpenDocument"},{"__class__":"OC\\Files\\Node\\File"},2048,2048]},{"file":"/var/www/html/lib/private/Preview/Generator.php","line":140,"function":"getMaxPreview","class":"OC\\Preview\\Generator","type":"->","args":[{"__class__":"OC\\Files\\SimpleFS\\SimpleFolder"},{"__class__":"OC\\Files\\Node\\File"},"application/vnd.oasis.opendocument.text",""]},{"file":"/var/www/html/lib/private/Preview/Generator.php","line":109,"function":"generatePreviews","class":"OC\\Preview\\Generator","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"},[{"width":32,"height":32,"crop":true,"mode":"fill"}],"application/vnd.oasis.opendocument.text"]},{"file":"/var/www/html/lib/private/PreviewManager.php","line":189,"function":"getPreview","class":"OC\\Preview\\Generator","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"},32,32,true,"fill",null]},{"file":"/var/www/html/core/Controller/PreviewController.php","line":169,"function":"getPreview","class":"OC\\PreviewManager","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"},32,32,true,"fill"]},{"file":"/var/www/html/core/Controller/PreviewController.php","line":142,"function":"fetchPreview","class":"OC\\Core\\Controller\\PreviewController","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"},32,32,false,true,"fill"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":217,"function":"getPreviewByFileId","class":"OC\\Core\\Controller\\PreviewController","type":"->","args":[85162,32,32,false,true,"fill"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OC\\Core\\Controller\\PreviewController"},"getPreviewByFileId"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":156,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OC\\Core\\Controller\\PreviewController"},"getPreviewByFileId"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":301,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OC\\Core\\Controller\\PreviewController","getPreviewByFileId",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"core.Preview.getPreviewByFileId"}]},{"file":"/var/www/html/lib/base.php","line":1000,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/core/preview"]},{"file":"/var/www/html/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"id":"618dde0ac37e8"}Using empty file as ZipArchive is deprecated
benjaminsabatini commentedon Dec 1, 2021
... and it was not merged?
by-erik commentedon Jan 22, 2022
@szaimen @acsfer
I also had the same problem. After I applied the patch #27075, the problem was solved.
I use nextcloud 22.2.3.
Using empty file as ZipArchive is deprecated
szaimen commentedon Jan 23, 2023
Hi, please update to 24.0.9 or better 25.0.3 and report back if it fixes the issue. Thank you!
My goal is to add a label like e.g. 25-feedback to this ticket of an up-to-date major Nextcloud version where the bug could be reproduced. However this is not going to work without your help. So thanks for all your effort!
If you don't manage to reproduce the issue in time and the issue gets closed but you can reproduce the issue afterwards, feel free to create a new bug report with up-to-date information by following this link: https://github.com/nextcloud/server/issues/new?assignees=&labels=bug%2C0.+Needs+triage&template=BUG_REPORT.yml&title=%5BBug%5D%3A+