Skip to content

[Bug]: malformed imaginary request url #49963

@jsalort

Description

@jsalort

⚠️ This issue respects the following points: ⚠️

Bug description

Describe the bug

I have Preview configured to use a remote Imaginary instance, and it used to work fine (on Nextcloud 29). It broke recently, presumably after updating to NC 30.
Now, the requests produce a HTTP 400 error code on the Imaginary instance, and I haven't been able to figure out how to debug this problem. I don't know if it is a bug in upstream nextcloud server, preview app, a misconfiguration on the Imaginary instance, or an edge case because of a broken file... The error occurs with the latest version of Imaginary, as well as older versions of Imaginary.

Here is an example of the requests on the Imaginary instance:

imaginary_1  | 192.168.112.1 - - [23/Dec/2024 08:50:33] "POST /pipeline?operations=%5B%7B%22operation%22%3A%22fit%22%2C%22params%22%3A%7B%22width%22%3A2048%2C%22height%22%3A2048%2C%22stripmeta%22%3A%22true%22%2C%22type%22%3A%22jpeg%22%2C%22norotation%22%3A%22true%22%2C%22quality%22%3A%2260%22%7D%7D%5D&key=**REDACTED*** HTTP/1.1" 400 168 0.2713

My understanding is that code 400 means malformed request.

Platform

- Browser: Safari and Firefox
- Memories Version: 7.4.1
- Nextcloud Version: 30.0.4
- PHP Version: 8.2

Additional context

  • Any errors in the JS console?

Yes:

Failed to load XImg Error fetching single preview: {"message":"No provider successfully handled the preview generation"} 3 [XImg.vue:95](webpack:///memories/components/frame/XImg.vue)
    loadImage XImg.vue:95
    mounted XImg.vue:50
    VueJS 19
    processDays Timeline.vue:873
    fetchDays Timeline.vue:774
    createState Timeline.vue:370
    refresh Timeline.vue:394
    routeChange Timeline.vue:300
    mounted Timeline.vue:212
    VueJS 11
  • Any errors in the Nextcloud server logs?
    No

I don't know how to debug this, and in particular how to obtain more details about the error...

Steps to reproduce

  1. Set up Imaginary in the preview providers
  2. Try to get a preview
  3. The preview generation fails.

Expected behavior

I should get a successful HTTP code in the Imaginary instance, and a preview on nextcloud web interface.

Nextcloud Server version

30

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.2

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Upgraded to a MAJOR version (ex. 28 to 29)

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***",
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "30.0.4.1",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "default_phone_region": "FR",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "dbindex": 0,
            "timeout": 1.5
        },
        "mail_smtpmode": "sendmail",
        "mail_smtpsecure": "tls",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "maintenance_window_start": 0,
        "theme": "",
        "log_type": "file",
        "syslog_tag": "Nextcloud",
        "logfile": "data\/nextcloud.log",
        "loglevel": 3,
        "logdateformat": "F d, Y H:i:s",
        "enabledPreviewProviders": [
            "OC\\Preview\\MP4",
            "OC\\Preview\\Movie",
            "OC\\Preview\\Imaginary"
        ],
        "preview_imaginary_url": "***REMOVED SENSITIVE VALUE***",
        "preview_imaginary_key": "***REMOVED SENSITIVE VALUE***",
        "updater.release.channel": "stable",
        "preview_max_x": 2048,
        "preview_max_y": 2048,
        "jpeg_quality": 60,
        "twofactor_enforced": "true",
        "twofactor_enforced_groups": [
            "admin"
        ],
        "twofactor_enforced_excluded_groups": [],
        "app_install_overwrite": [
            "facerecognition",
            "news"
        ],
        "memories.exiftool": "\/home\/jsalort\/Documents\/nextcloud\/apps\/memories\/bin-ext\/exiftool-aarch64-glibc",
        "memories.vod.path": "\/home\/jsalort\/Documents\/nextcloud\/apps\/memories\/bin-ext\/go-vod-aarch64",
        "memories.vod.ffmpeg": "\/usr\/bin\/ffmpeg",
        "memories.vod.ffprobe": "\/usr\/bin\/ffprobe",
        "memories.gis_type": 1,
        "memories.db.triggers.fcu": true,
        "memories.video_default_quality": "-2"
    }
}

List of activated Apps

Enabled:
  - activity: 3.0.0
  - app_api: 4.0.3
  - audioplayer: 3.4.1
  - calendar: 5.0.8
  - circles: 30.0.0
  - cloud_federation_api: 1.13.0
  - comments: 1.20.1
  - contacts: 6.1.1
  - contactsinteraction: 1.11.0
  - dashboard: 7.10.0
  - dav: 1.31.1
  - federatedfilesharing: 1.20.0
  - federation: 1.20.0
  - files: 2.2.0
  - files_downloadlimit: 3.0.0
  - files_external: 1.22.0
  - files_pdfviewer: 3.0.0
  - files_reminders: 1.3.0
  - files_sharing: 1.22.0
  - files_trashbin: 1.20.1
  - files_versions: 1.23.0
  - firstrunwizard: 3.0.0
  - logreader: 3.0.0
  - lookup_server_connector: 1.18.0
  - memories: 7.4.1
  - music: 2.0.1
  - news: 25.1.2
  - nextcloud_announcements: 2.0.0
  - notifications: 3.0.0
  - oauth2: 1.18.1
  - password_policy: 2.0.0
  - passwords: 2024.12.21
  - photos: 3.0.2
  - previewgenerator: 5.7.0
  - privacy: 2.0.0
  - provisioning_api: 1.20.0
  - recognize: 8.2.0
  - recommendations: 3.0.0
  - related_resources: 1.5.0
  - serverinfo: 2.0.0
  - settings: 1.13.0
  - sharebymail: 1.20.0
  - spreed: 20.1.1
  - support: 2.0.0
  - survey_client: 2.0.0
  - systemtags: 1.20.0
  - text: 4.1.0
  - theming: 2.5.0
  - twofactor_backupcodes: 1.19.0
  - twofactor_nextcloud_notification: 4.0.0
  - twofactor_totp: 12.0.0-dev
  - updatenotification: 1.20.0
  - user_status: 1.10.0
  - viewer: 3.0.0
  - weather_status: 1.10.0
  - webhook_listeners: 1.1.0-dev
  - workflowengine: 2.12.0
Disabled:
  - admin_audit: 1.20.0
  - bruteforcesettings: 3.0.0 (installed 2.4.0)
  - encryption: 2.18.0
  - files_rightclick: 0.15.1 (installed 1.6.0)
  - maps: 1.5.0 (installed 1.5.0)
  - metadata: 0.21.0 (installed 0.21.0)
  - suspicious_login: 8.0.0
  - tasks: 0.16.1 (installed 0.16.1)
  - twofactor_admin: 4.7.1 (installed 4.7.1)
  - twofactor_email: 2.7.4 (installed 2.7.4)
  - user_ldap: 1.21.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    Triaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions