rotdrop / nextcloud-app-files-archive

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

Error 500 on NC Files app #9

Closed TtuxX closed 1 year ago

TtuxX commented 1 year ago

Hi :)

I am having troubles with latest version 1.0.5, that make Nextcloud Files unusuable for me with a 500 error:

{"reqId":"soKGFkZXDuDrHJFp2Yp9","level":3,"time":"2022-11-14T15:13:11+00:00","remoteAddr":"XXXX","user":"XXXX","app":"index","method":"GET","url":"/apps/files/","message":"array_filter(): Argument #1 ($array) must be of type array, null given in file '/usr/local/www/nextcloud/apps/files_archive/lib/Service/MimeTypeService.php' line 121","userAgent":"Mozilla/5.0 XXXX","version":"24.0.7.1","exception":{"Exception":"Exception","Message":"array_filter(): Argument #1 ($array) must be of type array, null given in file '/usr/local/www/nextcloud/apps/files_archive/lib/Service/MimeTypeService.php' line 121","Code":0,"Trace":[{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\AppFramework\Http\Dispatcher","type":"->","args":[{"class":"OCA\Files\Controller\ViewController"},"index"]},{"file":"/usr/local/www/nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\AppFramework\App","type":"::","args":["OCA\Files\Controller\ViewController","index",{"class":"OC\AppFramework\DependencyInjection\DIContainer"},["files.view.index"]]},{"file":"/usr/local/www/nextcloud/lib/base.php","line":1030,"function":"match","class":"OC\Route\Router","type":"->","args":["/apps/files/"]},{"file":"/usr/local/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","Line":165,"Previous":{"Exception":"TypeError","Message":"array_filter(): Argument #1 ($array) must be of type array, null given","Code":0,"Trace":[{"file":"/usr/local/www/nextcloud/apps/files_archive/lib/Service/MimeTypeService.php","line":121,"function":"array_filter","args":[null,{"class":"Closure"},2]},{"file":"/usr/local/www/nextcloud/apps/files_archive/lib/Service/MimeTypeService.php","line":92,"function":"getMimeTypeMapping","class":"OCA\FilesArchive\Service\MimeTypeService","type":"->","args":[]},{"file":"/usr/local/www/nextcloud/apps/files_archive/lib/Listener/FilesActionListener.php","line":108,"function":"getSupportedMimeTypes","class":"OCA\FilesArchive\Service\MimeTypeService","type":"->","args":[]},{"file":"/usr/local/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":87,"function":"handle","class":"OCA\FilesArchive\Listener\FilesActionListener","type":"->","args":[{"class":"OCA\Files\Event\LoadAdditionalScriptsEvent"}]},{"file":"/usr/local/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"function":"invoke","class":"OC\EventDispatcher\ServiceEventListener","type":"->","args":[{"class":"OCA\Files\Event\LoadAdditionalScriptsEvent"},"OCA\Files\Event\LoadAdditionalScriptsEvent",{"class":"Symfony\Component\EventDispatcher\EventDispatcher"}]},{"file":"/usr/local/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\Component\EventDispatcher\EventDispatcher","type":"->","args":[[{"class":"Closure"},{"class":"Closure"},{"class":"Closure"},{"class":"Closure"},{"class":"Closure"},"And 8 more entries, set log level to debug to see all entries"],"OCA\Files\Event\LoadAdditionalScriptsEvent",{"class":"OCA\Files\Event\LoadAdditionalScriptsEvent"}]},{"file":"/usr/local/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":88,"function":"dispatch","class":"Symfony\Component\EventDispatcher\EventDispatcher","type":"->","args":[{"class":"OCA\Files\Event\LoadAdditionalScriptsEvent"},"OCA\Files\Event\LoadAdditionalScriptsEvent"]},{"file":"/usr/local/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":100,"function":"dispatch","class":"OC\EventDispatcher\EventDispatcher","type":"->","args":["OCA\Files\Event\LoadAdditionalScriptsEvent",{"class__":"OCA\Files\Event\LoadAdditionalScriptsEvent"}]},{"file":"/usr/local/www/nextcloud/apps/files_sharing/list.php","line":46,"function":"dispatchTyped","class":"OC\EventDispatcher\EventDispatcher","type":"->","args":[{"class":"OCA\Files\Event\LoadAdditionalScriptsEvent"}]},{"file":"/usr/local/www/nextcloud/apps/files/lib/Controller/ViewController.php","line":136,"args":["/usr/local/www/nextcloud/apps/files_sharing/list.php"],"function":"include"},{"file":"/usr/local/www/nextcloud/apps/files/lib/Controller/ViewController.php","line":276,"function":"renderScript","class":"OCA\Files\Controller\ViewController","type":"->","args":["files_sharing","list.php"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"index","class":"OCA\Files\Controller\ViewController","type":"->","args":["","",null,false,null]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\AppFramework\Http\Dispatcher","type":"->","args":[{"class":"OCA\Files\Controller\ViewController"},"index"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\AppFramework\Http\Dispatcher","type":"->","args":[{"class":"OCA\Files\Controller\ViewController"},"index"]},{"file":"/usr/local/www/nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\AppFramework\App","type":"::","args":["OCA\Files\Controller\ViewController","index",{"class":"OC\AppFramework\DependencyInjection\DIContainer"},["files.view.index"]]},{"file":"/usr/local/www/nextcloud/lib/base.php","line":1030,"function":"match","class":"OC\Route\Router","type":"->","args":["/apps/files/"]},{"file":"/usr/local/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/usr/local/www/nextcloud/apps/files_archive/lib/Service/MimeTypeService.php","Line":121},"CustomMessage":"--"}}

rotdrop commented 1 year ago

I did quite some restructuring in order to share code between files_archive and pdf_downloader. I think as a side-effect also this problem should no longer be there.

rotdrop commented 1 year ago

Could you please test if the current rc1 pre-release resolves the issue for you? Thanks!

TtuxX commented 1 year ago

It works perfectly fine with this new version. Thank you ! :)