cwilby / nextcloud-workflow-media-converter

An automated media conversion plugin for NextCloud
https://apps.nextcloud.com/apps/workflow_media_converter
GNU Affero General Public License v3.0
36 stars 16 forks source link

Undefined variable $node #429

Closed abhilesh closed 5 months ago

abhilesh commented 7 months ago

Steps to reproduce

  1. Create flow for converting uploaded files with .avi extension
  2. Added additional output flags
  3. Upload media and check conversion status

Expected behaviour

Automated media converter would convert the .avi into the specified output

Actual behaviour

No conversion but error messages in the logs

[PHP] Error: Undefined variable $node at /var/www/html/custom_apps/workflow_media_converter/lib/Operation/ConvertMediaOperation.php#78
    GET /core/preview?fileId=1422&x=250&y=250
    from 192.168.107.1 by admin at 3 Apr 2024, 11:02:44

[workflow_media_converter] Error: (0) :: Call to a member function getPath() on null
    GET /core/preview?fileId=1422&x=250&y=250
    from 192.168.107.1 by admin at 3 Apr 2024, 11:02:44

The event type being dispatched in nextcloud is \OCP\EventDispatcher\GenericEvent and the event doesn't have any arguments leading to the undefined variable $node error.

I also notice that with the v1.10.3 update, media conversions are triggered immediately upon file upload whereas previously they would be scheduled as a cron job.

Workflow Media Converter app

Workflow Media Converter app version: (see apps admin page: /index.php/settings/apps) v1.10.3

Server configuration

Operating system: Docker via Orbstack on Mac Mini M1

Web server: Apache

Database: MySQL

PHP version: 8.2.17

Nextcloud Version: (see admin page) 28.0.4

Where did you install Nextcloud from: https://hub.docker.com/_/nextcloud

Signing status:

Login as admin user into your Nextcloud and access
http://example.com/index.php/settings/integrity/failed
paste the results here.

No errors have been found.

List of activated apps:

``` If you have access to your command line run e.g.: sudo -u www-data php occ app:list from within your server installation folder Enabled: - activity: 2.20.0 - circles: 28.0.0 - cloud_federation_api: 1.11.0 - comments: 1.18.0 - dav: 1.29.1 - federatedfilesharing: 1.18.0 - federation: 1.18.0 - files: 2.0.0 - files_pdfviewer: 2.9.0 - files_reminders: 1.1.0 - files_sharing: 1.20.0 - files_trashbin: 1.18.0 - files_versions: 1.21.0 - firstrunwizard: 2.17.0 - logreader: 2.13.0 - lookup_server_connector: 1.16.0 - nextcloud_announcements: 1.17.0 - notifications: 2.16.0 - oauth2: 1.16.3 - password_policy: 1.18.0 - photos: 2.4.0 - previewgenerator: 5.5.0 - privacy: 1.12.0 - provisioning_api: 1.18.0 - recommendations: 2.0.0 - related_resources: 1.3.0 - serverinfo: 1.18.0 - settings: 1.10.1 - sharebymail: 1.18.0 - support: 1.11.1 - survey_client: 1.16.0 - systemtags: 1.18.0 - text: 3.9.1 - theming: 2.3.0 - twofactor_backupcodes: 1.17.0 - updatenotification: 1.18.0 - viewer: 2.2.0 - weather_status: 1.8.0 - workflow_media_converter: 1.10.3 - workflowengine: 2.10.0 Disabled: - admin_audit: 1.18.0 - bruteforcesettings: 2.8.0 - contactsinteraction: 1.9.0 (installed 1.9.0) - dashboard: 7.8.0 (installed 7.8.0) - encryption: 2.16.0 - files_external: 1.20.0 - suspicious_login: 6.0.0 - twofactor_totp: 10.0.0-beta.2 - user_ldap: 1.19.0 - user_status: 1.8.1 (installed 1.8.1) ```

Nextcloud configuration:

``` If you have access to your command line run e.g.: sudo -u www-data php occ config:list system from within your Nextcloud installation folder or Insert your config.php content here Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …) { "system": { "htaccess.RewriteBase": "\/", "memcache.local": "\\OC\\Memcache\\APCu", "apps_paths": [ { "path": "\/var\/www\/html\/apps", "url": "\/apps", "writable": false }, { "path": "\/var\/www\/html\/custom_apps", "url": "\/custom_apps", "writable": true } ], "memcache.distributed": "\\OC\\Memcache\\Redis", "memcache.locking": "\\OC\\Memcache\\Redis", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "password": "***REMOVED SENSITIVE VALUE***", "port": 6379 }, "mail_smtpmode": "smtp", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "587", "mail_smtpsecure": "tls", "mail_smtpauth": true, "mail_smtpauthtype": "LOGIN", "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "upgrade.disable-web": true, "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "localhost", ], "trusted_proxies": "***REMOVED SENSITIVE VALUE***", "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "28.0.4.1", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "instanceid": "***REMOVED SENSITIVE VALUE***", "maintenance_window_start": 1, "default_timezone": "Europe\/London", "default_phone_region": "GB", "filesystem_check_changes": 1, "simpleSignUpLink.shown": false, "loglevel": 0, "enable_previews": true, "enabledPreviewProviders": [ "OC\\Preview\\TXT", "OC\\Preview\\MarkDown", "OC\\Preview\\OpenDocument", "OC\\Preview\\PDF", "OC\\Preview\\MSOffice2003", "OC\\Preview\\MSOfficeDoc", "OC\\Preview\\Image", "OC\\Preview\\Photoshop", "OC\\Preview\\TIFF", "OC\\Preview\\SVG", "OC\\Preview\\Font", "OC\\Preview\\MP3", "OC\\Preview\\Movie", "OC\\Preview\\MKV", "OC\\Preview\\MP4", "OC\\Preview\\AVI" ], "maintenance": false }, "apps": { "activity": { "enabled": "yes", "installed_version": "2.20.0", "types": "filesystem" }, "backgroundjob": { "lastjob": "183" }, "circles": { "enabled": "yes", "installed_version": "28.0.0", "loopback_tmp_scheme": "http", "maintenance_run": "0", "maintenance_update": "{\"3\":1712139304,\"2\":1712141108,\"1\":1712141109}", "migration_22": "1", "migration_run": "0", "types": "filesystem,dav" }, "cloud_federation_api": { "enabled": "yes", "installed_version": "1.11.0", "types": "filesystem" }, "comments": { "enabled": "yes", "installed_version": "1.18.0", "types": "logging" }, "contactsinteraction": { "enabled": "no", "installed_version": "1.9.0", "types": "dav" }, "core": { "backgroundjobs_mode": "cron", "emailTestSuccessful": "1", "files_metadata": "{\"photos-original_date_time\":{\"value\":null,\"type\":\"int\",\"indexed\":true,\"editPermission\":0},\"photos-exif\":{\"value\":null,\"type\":\"array\",\"indexed\":false,\"editPermission\":0},\"photos-ifd0\":{\"value\":null,\"type\":\"array\",\"indexed\":false,\"editPermission\":0},\"photos-size\":{\"value\":null,\"type\":\"array\",\"indexed\":false,\"editPermission\":0}}", "files_metadata_installed": "1", "installedat": "1710866491.9307", "lastcron": "1712141110", "lastupdateResult": "[]", "lastupdatedat": "1712140474", "moveavatarsdone": "yes", "oc.integritycheck.checker": "[]", "previewsCleanedUp": "1", "public_files": "files_sharing\/public.php", "public_webdav": "dav\/appinfo\/v1\/publicwebdav.php", "vendor": "nextcloud" }, "dashboard": { "enabled": "no", "installed_version": "7.8.0", "types": "" }, "dav": { "enabled": "yes", "installed_version": "1.29.1", "types": "filesystem" }, "federatedfilesharing": { "enabled": "yes", "installed_version": "1.18.0", "types": "" }, "federation": { "enabled": "yes", "installed_version": "1.18.0", "types": "authentication" }, "files": { "enabled": "yes", "installed_version": "2.0.0", "types": "filesystem" }, "files_pdfviewer": { "enabled": "yes", "installed_version": "2.9.0", "types": "" }, "files_reminders": { "enabled": "yes", "installed_version": "1.1.0", "types": "dav" }, "files_sharing": { "enabled": "yes", "installed_version": "1.20.0", "types": "filesystem" }, "files_trashbin": { "enabled": "yes", "installed_version": "1.18.0", "types": "filesystem,dav" }, "files_versions": { "enabled": "yes", "installed_version": "1.21.0", "types": "filesystem,dav" }, "firstrunwizard": { "enabled": "yes", "installed_version": "2.17.0", "types": "logging" }, "logreader": { "enabled": "yes", "installed_version": "2.13.0", "shownLevels": "[0,1,2,3,4]", "types": "logging" }, "lookup_server_connector": { "enabled": "yes", "installed_version": "1.16.0", "types": "authentication" }, "nextcloud_announcements": { "enabled": "yes", "installed_version": "1.17.0", "pub_date": "Thu, 24 Oct 2019 00:00:00 +0200", "types": "logging" }, "notifications": { "enabled": "yes", "installed_version": "2.16.0", "types": "logging" }, "oauth2": { "enabled": "yes", "installed_version": "1.16.3", "types": "authentication" }, "password_policy": { "enabled": "yes", "installed_version": "1.18.0", "types": "authentication" }, "photos": { "enabled": "yes", "installed_version": "2.4.0", "lastPlaceMappedUser": "admin", "lastPlaceMappingDone": "true", "types": "dav,authentication" }, "previewgenerator": { "enabled": "yes", "installed_version": "5.5.0", "types": "filesystem" }, "privacy": { "enabled": "yes", "installed_version": "1.12.0", "readableLocation": "gb", "types": "" }, "provisioning_api": { "enabled": "yes", "installed_version": "1.18.0", "types": "prevent_group_restriction" }, "recommendations": { "enabled": "yes", "installed_version": "2.0.0", "types": "" }, "related_resources": { "enabled": "yes", "installed_version": "1.3.0", "types": "" }, "serverinfo": { "cached_count_filecache": "952", "cached_count_storages": "2", "enabled": "yes", "installed_version": "1.18.0", "types": "" }, "settings": { "enabled": "yes", "installed_version": "1.10.1", "types": "" }, "sharebymail": { "enabled": "yes", "installed_version": "1.18.0", "types": "filesystem" }, "support": { "SwitchUpdaterServerHasRun": "yes", "enabled": "yes", "installed_version": "1.11.1", "types": "session" }, "survey_client": { "enabled": "yes", "installed_version": "1.16.0", "types": "" }, "systemtags": { "enabled": "yes", "installed_version": "1.18.0", "types": "logging" }, "text": { "enabled": "yes", "installed_version": "3.9.1", "types": "dav" }, "theming": { "backgroundMime": "image\/png", "cachebuster": "10", "color": "#264747", "enabled": "yes", "installed_version": "2.3.0", "logoMime": "image\/png", "name": "", "slogan": "***REMOVED SENSITIVE VALUE***", "types": "logging", "url": "***REMOVED SENSITIVE VALUE***" }, "twofactor_backupcodes": { "enabled": "yes", "installed_version": "1.17.0", "types": "" }, "updatenotification": { "core": "28.0.4.1", "enabled": "yes", "installed_version": "1.18.0", "previewgenerator": "5.5.0", "types": "", "update_check_errors": "0", "workflow_media_converter": "1.10.2" }, "user_status": { "enabled": "no", "installed_version": "1.8.1", "types": "" }, "viewer": { "enabled": "yes", "installed_version": "2.2.0", "types": "" }, "weather_status": { "enabled": "yes", "installed_version": "1.8.0", "types": "" }, "workflow_media_converter": { "conversionLock": "no", "convertMediaInParallel": "yes", "enabled": "yes", "installed_version": "1.10.3", "threadLimit": "4", "types": "" }, "workflowengine": { "enabled": "yes", "installed_version": "2.10.0", "types": "filesystem" } } } ```

Are you using external storage, if yes which one: local

Are you using encryption: no

Server log (data/nextcloud.log)

``` Insert your server log here No other errors apart from the conversion log ```
thegabriele97 commented 6 months ago

I confirm it happens to me too

AlexandruNegura commented 5 months ago

Happens to me as well. Same error in logs