marius-wieschollek / passwords

A simple, yet feature rich password manager for Nextcloud
GNU Affero General Public License v3.0
215 stars 45 forks source link

unhandled exception #505

Closed Michele64 closed 2 years ago

Michele64 commented 2 years ago

System Information

Nextcloud Version: 24.0.1 PHP Version: 8.0 Database and Version: mysql 8.0.27 Server OS and Version: Linux 4.18.0-348.20.1.el8_5.x86_64 x86_64 Passwords Version: 2022.5.20


**Client:**

Browser and Version: Firefox 100.0.2 Client OS and Version: Ubuntu 21.10



### Steps to reproduce
1. ssh login -> running eg php occ db:add-missing-indices -> 
2. An unhandled exception has been thrown:
ParseError: syntax error, unexpected '=>' (T_DOUBLE_ARROW) in /data/web/1/000/105/016/419203/htdocs/nextcloud/apps/passwords/lib/Services/HelperService.php:117
3. when disabled "passwords" no error occurs

### Expected result
well, the output of the command

### Actual result
independently of the command the error is the same

### Nextcloud log
<details>
<summary>Nextcloud log</summary>

{"reqId":"YpT5JJDjkBbzygZcpP-53wAAUhs","level":4,"time":"2022-05-30T17:04:39+00:00","remoteAddr":"62.216.205.62","user":"MicheleN","app":"passwords","method":"GET","url":"/index.php/apps/passwords/api/1.0/service/favicon/id.sophos.com/32","message":"Favicon service returned unsupported data type: application/octet-stream","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0","version":"24.0.1.1","exception":{"Exception":"OCA\\Passwords\\Exception\\Favicon\\InvalidFaviconDataException","Message":"Favicon service returned unsupported data type: application/octet-stream","Code":101,"Trace":[{"file":"/data/web/1/000/105/016/419203/htdocs/nextcloud/apps/passwords/lib/Services/FaviconService.php","line":90,"function":"getFavicon","class":"OCA\\Passwords\\Helper\\Favicon\\AbstractFaviconHelper","type":"->"},{"file":"/data/web/1/000/105/016/419203/htdocs/nextcloud/apps/passwords/lib/Controller/Api/ServiceApiController.php","line":187,"function":"getFavicon","class":"OCA\\Passwords\\Services\\FaviconService","type":"->"},{"file":"/data/web/1/000/105/016/419203/htdocs/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"getFavicon","class":"OCA\\Passwords\\Controller\\Api\\ServiceApiController","type":"->"},{"file":"/data/web/1/000/105/016/419203/htdocs/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/data/web/1/000/105/016/419203/htdocs/nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/data/web/1/000/105/016/419203/htdocs/nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/data/web/1/000/105/016/419203/htdocs/nextcloud/lib/base.php","line":1023,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/data/web/1/000/105/016/419203/htdocs/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/data/web/1/000/105/016/419203/htdocs/nextcloud/apps/passwords/lib/Helper/Favicon/AbstractFaviconHelper.php","Line":97,"CustomMessage":"Favicon service returned unsupported data type: application/octet-stream"},"id":"6294fb62dee11"}
</details>
marius-wieschollek commented 2 years ago

You're not running PHP 8.0. Use php -v to see your php version and try running the command with php8.0 occ <command> to specify the php version.