e-alfred / nextcloud-scanner

Scanner app for Nextcloud using the SANE framework
GNU Affero General Public License v3.0
23 stars 10 forks source link

$storage must be of type #36

Closed brononius closed 1 year ago

brononius commented 2 years ago

I'm trying to add my scanner (Brother DCP-9015CDW) and this app to nextcloud 24.0.4

When I scan from CLI, it's working:

sudo -u www-data scanimage > test.jpg
Output format is not set, using pnm as a default.
scanimage: rounded value of br-x from 211.9 to 211.881
scanimage: rounded value of br-y from 355.6 to 355.567

This results nicely in a file.

-rw-r--r--  1 root     root     11326741 Sep  7 18:15  test.jpg

But when I try it from the web, it's just saying 'scan started'?

I've changed in ScannerStorage.php the color to '24bit Color', but no luck. Any suggestion?

In the logs, I'm:


{"reqId":"88C4rLqKutC9RuS0qIHv","level":3,"time":"2022-09-08T14:45:32+00:00","remoteAddr":"192.168.111.42","user":"brononius","app":"index","method":"POST","url":"/index.php/apps/scanner/scan","message":"OCA\\Scanner\\Storage\\ScannerStorage::__construct(): Argument #1 ($storage) must be of type OC\\Files\\Node\\Folder, OC\\Files\\Node\\LazyUserFolder given, called in /srv/nextcloud/apps/scanner/appinfo/app.php on line 30","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36","version":"24.0.4.1","exception":{"Exception":"TypeError","Message":"OCA\\Scanner\\Storage\\ScannerStorage::__construct(): Argument #1 ($storage) must be of type OC\\Files\\Node\\Folder, OC\\Files\\Node\\LazyUserFolder given, called in /srv/nextcloud/apps/scanner/appinfo/app.php on line 30","Code":0,"Trace":[{"file":"/srv/nextcloud/apps/scanner/appinfo/app.php","line":30,"function":"__construct","class":"OCA\\Scanner\\Storage\\ScannerStorage","type":"->"},{"file":"/srv/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":162,"function":"OCA\\Scanner\\AppInfo\\{closure}","class":"OCA\\Scanner\\AppInfo\\Application","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/srv/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php","line":122,"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/srv/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":129,"function":"offsetGet","class":"Pimple\\Container","type":"->"},{"file":"/srv/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":459,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/srv/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":437,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/srv/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":99,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/srv/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":108,"function":"array_map"},{"file":"/srv/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":116,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/srv/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":133,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/srv/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":465,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/srv/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":437,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/srv/nextcloud/lib/private/AppFramework/App.php","line":159,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/srv/nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/srv/nextcloud/lib/base.php","line":1023,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/srv/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/srv/nextcloud/apps/scanner/lib/Storage/ScannerStorage.php","Line":34,"CustomMessage":"--"}}
Boc-chi-no commented 2 years ago

This is a duplicate issue #34 Already solved in #35

e-alfred commented 1 year ago

Thanks @LJea for fixing this!