nextcloud / nextcloud/workflow_pdf_converter

Conversion from document to pdf is not working

Open
#363 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
26
Forks
8
Avg merge
10h 30m
Merged PRs (30d)
31

Description

Steps to reproduce

  1. Change file, chreate file and tag with "convert-to-pdf"
  2. Config workflow like in screenshot
    grafik
Expected behaviour

worcflow should convert a document to pdf

Actual behaviour

Nothing, see in log files

{ "reqId": "Fn6QmGmF6OevZgXu85DZ", "level": 3, "time": "2021-12-23T16:31:05+00:00", "remoteAddr": "", "user": "--", "app": "PHP", "method": "", "url": "--", "message": "fopen(/home/**REMOVED SENSITIVE VALUE**/domains/cloud.**REMOVED SENSITIVE VALUE**.de/tmp/nextcloudtemp/oc_tmp_jCP4Po-.pdf): Failed to open stream: No such file or directory at /home/**REMOVED SENSITIVE VALUE**/domains/cloud.**REMOVED SENSITIVE VALUE**.de/public_html/lib/private/Files/View.php#1051", "userAgent": "--", "version": "22.2.3.0", "exception": { "Exception": "Error", "Message": "fopen(/home/**REMOVED SENSITIVE VALUE**/domains/cloud.**REMOVED SENSITIVE VALUE**.de/tmp/nextcloudtemp/oc_tmp_jCP4Po-.pdf): Failed to open stream: No such file or directory at /home/**REMOVED SENSITIVE VALUE**/domains/cloud.**REMOVED SENSITIVE VALUE**.de/public_html/lib/private/Files/View.php#1051", "Code": 0, "Trace": [ { "function": "onError", "class": "OC\\Log\\ErrorHandler", "type": "::" }, { "file": "/home/**REMOVED SENSITIVE VALUE**/domains/cloud.**REMOVED SENSITIVE VALUE**.de/public_html/lib/private/Files/View.php", "line": 1051, "function": "fopen" }, { "file": "/home/**REMOVED SENSITIVE VALUE**/domains/cloud.**REMOVED SENSITIVE VALUE**.de/public_html/apps/workflow_pdf_converter/lib/BackgroundJobs/Convert.php", "line": 136, "function": "fromTmpFile", "class": "OC\\Files\\View", "type": "->" }, { "file": "/home/**REMOVED SENSITIVE VALUE**/domains/cloud.**REMOVED SENSITIVE VALUE**.de/public_html/lib/private/BackgroundJob/Job.php", "line": 51, "function": "run", "class": "OCA\\WorkflowPDFConverter\\BackgroundJobs\\Convert", "type": "->" }, { "file": "/home/**REMOVED SENSITIVE VALUE**/domains/cloud.**REMOVED SENSITIVE VALUE**.de/public_html/lib/private/BackgroundJob/QueuedJob.php", "line": 45, "function": "execute", "class": "OC\\BackgroundJob\\Job", "type": "->" }, { "file": "/home/**REMOVED SENSITIVE VALUE**/domains/cloud.**REMOVED SENSITIVE VALUE**.de/public_html/cron.php", "line": 127, "function": "execute", "class": "OC\\BackgroundJob\\QueuedJob", "type": "->" } ], "File": "/home/**REMOVED SENSITIVE VALUE**/domains/cloud.**REMOVED SENSITIVE VALUE**.de/public_html/lib/private/Log/ErrorHandler.php", "Line": 92, "CustomMessage": "--" }, "id": "61c4a95da8512" }

Server configuration detail

Operating system: Linux 5.4.0-80-generic #90-Ubuntu SMP Fri Jul 9 22:49:44 UTC 2021 x86_64

Webserver: Apache (fpm-fcgi)

Database: mysql 8.0.26

PHP version: 8.0.9

Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, Reflection, SPL, session, standard, sodium, cgi-fcgi, mysqlnd, PDO, xml, apcu, bcmath, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, imagick, intl, exif, mysqli, pdo_mysql, Phar, posix, readline, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, Zend OPcache

Nextcloud version: 22.2.3 - 22.2.3.0

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from: unknown

Signing status

Array
(
)

List of activated apps
Enabled:
 - accessibility: 1.8.0
 - activity: 2.15.0
 - announcementcenter: 6.1.1
 - appointments: 1.11.8
 - approval: 1.0.9
 - bruteforcesettings: 2.3.0
 - calendar: 3.0.3
 - circles: 22.1.1
 - cloud_federation_api: 1.5.0
 - comments: 1.12.0
 - contacts: 4.0.7
 - contactsinteraction: 1.3.0
 - dashboard: 7.2.0
 - dav: 1.19.0
 - deck: 1.5.5
 - drawio: 1.0.2
 - electronicsignatures: 1.8.0
 - federatedfilesharing: 1.12.0
 - federation: 1.12.0
 - files: 1.17.0
 - files_fulltextsearch: 22.0.1
 - files_pdfviewer: 2.3.1
 - files_rightclick: 1.1.0
 - files_sharing: 1.14.0
 - files_trashbin: 1.12.0
 - files_versions: 1.15.0
 - files_videoplayer: 1.11.0
 - firstrunwizard: 2.11.0
 - flow_notifications: 1.2.0
 - fulltextsearch: 22.0.1
 - fulltextsearch_elasticsearch: 22.0.1
 - impersonate: 1.9.0
 - integration_mastodon: 1.0.2
 - logreader: 2.7.0
 - lookup_server_connector: 1.10.0
 - mail: 1.11.4
 - news: 17.0.1
 - nextcloud_announcements: 1.11.0
 - notifications: 2.10.1
 - oauth2: 1.10.0
 - password_policy: 1.12.0
 - passwords: 2021.12.20
 - phonetrack: 0.6.9
 - photos: 1.4.0
 - privacy: 1.6.0
 - provisioning_api: 1.12.0
 - quota_warning: 1.13.0
 - recommendations: 1.1.0
 - richdocuments: 4.2.3
 - richdocumentscode: 21.11.6
 - serverinfo: 1.12.0
 - settings: 1.4.0
 - sharebymail: 1.12.0
 - spreed: 12.2.2
 - support: 1.5.0
 - survey_client: 1.10.0
 - systemtags: 1.12.0
 - talk_matterbridge: 1.23.2
 - text: 3.3.0
 - theming: 1.13.0
 - timemanager: 0.2.6
 - timetracker: 0.0.72
 - twofactor_backupcodes: 1.11.0
 - updatenotification: 1.12.0
 - user_status: 1.2.0
 - viewer: 1.6.0
 - weather_status: 1.2.0
 - workflow_ocr: 1.22.4
 - workflow_pdf_converter: 1.7.0
 - workflow_script: 1.7.0
 - workflowengine: 2.4.0
Disabled:
 - admin_audit
 - encryption
 - files_external
 - user_ldap

Configuration (config/config.php)
{
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "***REMOVED SENSITIVE VALUE***"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "mysql",
    "version": "22.2.3.0",
    "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,
    "memcache.local": "\\OC\\Memcache\\APCu",
    "memcache.distributed": "\\OC\\Memcache\\APCu",
    "tempdirectory": "\/home\/***REMOVED SENSITIVE VALUE***/domains\/***REMOVED SENSITIVE VALUE***\/tmp\/nextcloudtemp",
    "app_install_overwrite": [
        "timetracker"
    ],
    "maintenance": false,
    "mail_smtpmode": "smtp",
    "mail_smtpsecure": "tls",
    "mail_sendmailmode": "smtp",
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpauthtype": "PLAIN",
    "mail_smtpauth": 1,
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpport": "587",
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "updater.release.channel": "stable",
    "theme": "",
    "loglevel": 2,
    "default_phone_region": "DE",
    "enable_previews": true,
    "preview_max_x": 4096,
    "preview_max_y": 4096,
    "preview_max_filesize_image": 50,
    "preview_libreoffice_path": "\/usr\/bin\/libreoffice",
    "preview_office_cl_parameters": " --headless --nologo --nofirststartwizard --invisible --norestore --convert-to png --outdir ",
    "enabledPreviewProviders": [
        "OC\\Preview\\PNG",
        "OC\\Preview\\JPEG",
        "OC\\Preview\\GIF",
        "OC\\Preview\\BMP",
        "OC\\Preview\\XBitmap",
        "OC\\Preview\\MP3",
        "OC\\Preview\\TXT",
        "OC\\Preview\\MarkDown",
        "OC\\Preview\\OpenDocument",
        "OC\\Preview\\Krita"
    ]
}

External storages: files_external is disabled

Encryption: no

User-backends:

  • OC\User\Database

Talk configuration:

STUN servers

  • stun.nextcloud.com:443

TURN servers

  • turn:REMOVED SENSITIVE VALUE:3478 - udp,tcp

Signaling servers (mode: internal):

  • no custom server configured

Browser: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0

Additional Information: libreoffice-core-nogui is installed and bin is under /usr/bin/libreoffice.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the configured convert-to-pdf workflow and reviewing the logged failure at apps/workflow_pdf_converter/lib/BackgroundJobs/Convert.php:136. Trace how that call reaches lib/private/Files/View.php:1051 and how the job is run through cron.php. Done means the workflow converts the tagged document to PDF without the reported missing temporary-file error.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.