ariselseng / camerarawpreviews

Camera Raw Previews app for Nextcloud
GNU Affero General Public License v3.0
53 stars 11 forks source link

Doesn't work on Ubuntu 20.04 with php7.4 #89

Closed ghost closed 1 year ago

ghost commented 1 year ago

Hi, on the latest Nextcloud 25.0.3, i'm getting this error: (check the following screenshot) image After this, we can can think it worked, but no, we have this following error on chrome and firefox: image image image

And in nextcloud.log we get:

"reqId": "ZsDpYvKxxAt3s2Ct2oHp",
    "level": 3,
    "time": "February 02, 2023 16:31:16",
    "remoteAddr": "91.110.121.110",
    "user": "user",
    "app": "camerarawpreviews",
    "method": "GET",
    "url": "/core/preview?fileId=1225846&c=be02783666a00cf464b4fd1ea46a4918&x=313&y=313&forceIcon=0&a=0",
    "message": "Unable to find preview data: /var/www/nextcloud/apps/camerarawpreviews/vendor/exiftool/exiftool/exiftool.bin -json -preview:all -FileType '/data/ncdata/user/files/InstantUpload/DNG/IMG_20230202_154519825.DNG' -> [{\n  \"SourceFile\": \"/data/ncdata/user/files/InstantUpload/DNG/IMG_20230202_154519825.DNG\",\n  \"FileType\": \"DNG\"\n}]\n",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/109.0",
    "version": "25.0.3.2",
    "exception": {
        "Exception": "Exception",
        "Message": "Unable to find preview data: /var/www/nextcloud/apps/camerarawpreviews/vendor/exiftool/exiftool/exiftool.bin -json -preview:all -FileType '/data/ncdata/user/files/InstantUpload/DNG/IMG_20230202_154519825.DNG' -> [{\n  \"SourceFile\": \"/data/ncdata/user/files/InstantUpload/DNG/IMG_20230202_154519825.DNG\",\n  \"FileType\": \"DNG\"\n}]\n",
        "Code": 0,
        "Trace": [{
            "file": "/var/www/nextcloud/apps/camerarawpreviews/lib/RawPreviewBase.php",
            "line": 110,
            "function": "getBestPreviewTag",
            "class": "OCA\\CameraRawPreviews\\RawPreviewBase",
            "type": "->"
        }, {
            "file": "/var/www/nextcloud/apps/camerarawpreviews/lib/RawPreviewBase.php",
            "line": 60,
            "function": "getResizedPreview",
            "class": "OCA\\CameraRawPreviews\\RawPreviewBase",
            "type": "->"
        }, {
            "file": "/var/www/nextcloud/apps/camerarawpreviews/lib/RawPreviewIProviderV2.php",
            "line": 25,
            "function": "getThumbnailInternal",
            "class": "OCA\\CameraRawPreviews\\RawPreviewBase",
            "type": "->"
        }, {
            "file": "/var/www/nextcloud/lib/private/Preview/GeneratorHelper.php",
            "line": 65,
            "function": "getThumbnail",
            "class": "OCA\\CameraRawPreviews\\RawPreviewIProviderV2",
            "type": "->"
        }, {
            "file": "/var/www/nextcloud/lib/private/Preview/Generator.php",
            "line": 343,
            "function": "getThumbnail",
            "class": "OC\\Preview\\GeneratorHelper",
            "type": "->"
        }, {
            "file": "/var/www/nextcloud/lib/private/Preview/Generator.php",
            "line": 162,
            "function": "getMaxPreview",
            "class": "OC\\Preview\\Generator",
            "type": "->"
        }, {
            "file": "/var/www/nextcloud/lib/private/Preview/Generator.php",
            "line": 114,
            "function": "generatePreviews",
            "class": "OC\\Preview\\Generator",
            "type": "->"
        }, {
            "file": "/var/www/nextcloud/lib/private/PreviewManager.php",
            "line": 185,
            "function": "getPreview",
            "class": "OC\\Preview\\Generator",
            "type": "->"
        }, {
            "file": "/var/www/nextcloud/core/Controller/PreviewController.php",
            "line": 144,
            "function": "getPreview",
            "class": "OC\\PreviewManager",
            "type": "->"
        }, {
            "file": "/var/www/nextcloud/core/Controller/PreviewController.php",
            "line": 113,
            "function": "fetchPreview",
            "class": "OC\\Core\\Controller\\PreviewController",
            "type": "->"
        }, {
            "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
            "line": 225,
            "function": "getPreviewByFileId",
            "class": "OC\\Core\\Controller\\PreviewController",
            "type": "->"
        }, {
            "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
            "line": 133,
            "function": "executeController",
            "class": "OC\\AppFramework\\Http\\Dispatcher",
            "type": "->"
        }, {
            "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
            "line": 172,
            "function": "dispatch",
            "class": "OC\\AppFramework\\Http\\Dispatcher",
            "type": "->"
        }, {
            "file": "/var/www/nextcloud/lib/private/Route/Router.php",
            "line": 298,
            "function": "main",
            "class": "OC\\AppFramework\\App",
            "type": "::"
        }, {
            "file": "/var/www/nextcloud/lib/base.php",
            "line": 1047,
            "function": "match",
            "class": "OC\\Route\\Router",
            "type": "->"
        }, {
            "file": "/var/www/nextcloud/index.php",
            "line": 36,
            "function": "handleRequest",
            "class": "OC",
            "type": "::"
        }],
        "File": "/var/www/nextcloud/apps/camerarawpreviews/lib/RawPreviewBase.php",
        "Line": 202,
        "CustomMessage": "--"
    }
}

After some testing, while doing the generating command, it immediately trigger the error of camerapreview unable to find preview data. It first trigger "serverDI" then "camerapreview". image

ariselseng commented 1 year ago

Based on the stacktrace I can see that your files does not contain any previews, at least not some standard ones that exiftool supports.

ghost commented 1 year ago

Oh, okey, its wierd as it's just a normal samsung raw photo from a S20. Also i tried to remove and reinstall the app (while trying to fix the issue), but i'm getting this all the time now:

"app":"no app in context","method":"GET","url":"/apps/memories/api/image/preview/1221717?c=dcf75b5696bf710d8e363aff0cc85946&x=2560&y=1440&a=1","message":"Deprecated event type for OCP\IPreview:PreviewRequested: Symfony\Component\EventDispatcher\GenericEvent is used","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/109.0","version":"25.0.3.2","data":[]}

ariselseng commented 1 year ago

This app only extracts previews already in the file. Sometimes you can enable previews in the camera's settings.

What you are seeing is not errors. You can ignore them and decrease your log level.