nextcloud / nextcloud/workflow_pdf_converter
PDF file not created
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 26
- Forks
- 8
- Avg merge
- 10h 30m
- Merged PRs (30d)
- 31
Description
My system fails to generate a PDF file when uploading an Office document.
Steps to reproduce
- Add and enable Automated PDF conversion app
- In Nextcloud, add flow (Add File and Mimetype equals Office Documents =>
PDF conversion = keep original, keep existing PDF's) - Upload a .docx file
Expected behaviour
A PDF file is created and two files exist (document.docx and document.pdf)
Actual behaviour
A PDF file is not created.
Error message in nextcloud.log:
{"reqId":"ySR0SbbTnS3J44Slpjql","level":3,"time":"2020-04-24T14:00:00+01:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"/cron.php","message":"fopen(/var/www/nextcloud/tmp/oc_tmp_yiz0a1-.pdf): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/View.php#1042","userAgent":"--","version":"18.0.4.2"}
File /var/www/nextcloud/tmp/oc_tmp_yiz0a1-.pdf does not exist
File /var/www/nextcloud/tmp/oc_tmp_yiz0a1-.png exists. Preview works.
PDF Converter app
PDF Converter app version: 1.3.1
Server configuration
Operating system: Debian 10.3
Web server: Apache/2.4.38 (Debian)
Database: MariaDB 10.4.12
PHP version: PHP 7.4.5
Nextcloud Version: Nextcloud 18.0.4
**Where did you install Nextcloud from: Downloaded server package from Nextcloud
Signing status:
md5sum --c nextcloud-18.0.4.tar.bz2.md5
nextcloud-18.0.4.tar.bz2: OK
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:
Nextcloud configuration:
"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": "18.0.4.2",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "3306",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"defaultapp": "files",
"knowledgebaseenabled": true,
"allow_user_to_change_display_name": true,
"remember_login_cookie_lifetime": 1296000,
"session_lifetime": 86400,
"session_keepalive": true,
"token_auth_enforced": false,
"auth.bruteforce.protection.enabled": true,
"skeletondirectory": "",
"activity_expire_days": 365,
"overwritehost": "",
"overwriteprotocol": "https",
"overwritewebroot": "\/",
"overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
"htaccess.RewriteBase": "\/",
"trashbin_retention_obligation": "auto, 180",
"versions_retention_obligation": "auto, 365",
"appcodechecker": true,
"updatechecker": true,
"updater.server.url": "https:\/\/updates.nextcloud.com\/updater_server\/",
"updater.release.channel": "stable",
"has_internet_connection": true,
"check_for_working_wellknown_setup": true,
"check_for_working_htaccess": true,
"check_data_directory_permissions": true,
"config_is_read_only": false,
"log_type": "file",
"logfile": "\/var\/log\/nextcloud\/nextcloud.log",
"logfilemode": 416,
"loglevel": 2,
"logdateformat": "Y-m-d\\TH:i:sP",
"logtimezone": "***REMOVED SENSITIVE VALUE***",
"log_query": false,
"log_rotate_size": 104857600,
"appstoreenabled": true,
"apps_paths": [
{
"path": "\/var\/www\/nextcloud\/apps",
"url": "\/apps",
"writable": true
}
],
"enable_previews": true,
"preview_libreoffice_path": "\/usr\/bin\/libreoffice",
"preview_office_cl_parameters": " --headless --nologo --nofirststartwizard --invisible --norestore --convert-to png --outdir ",
"enabledPreviewProviders": [
"OC\\Preview\\BMP",
"OC\\Preview\\GIF",
"OC\\Preview\\HEIC",
"OC\\Preview\\JPEG",
"OC\\Preview\\MarkDown",
"OC\\Preview\\MP3",
"OC\\Preview\\PNG",
"OC\\Preview\\TXT",
"OC\\Preview\\XBitmap",
"OC\\Preview\\Illustrator",
"OC\\Preview\\Movie",
"OC\\Preview\\MSOffice2003",
"OC\\Preview\\MSOffice2007",
"OC\\Preview\\MSOfficeDoc",
"OC\\Preview\\OpenDocument",
"OC\\Preview\\PDF",
"OC\\Preview\\Photoshop",
"OC\\Preview\\Postscript",
"OC\\Preview\\StarOffice",
"OC\\Preview\\SVG",
"OC\\Preview\\TIFF",
"OC\\Preview\\Font"
],
"ldapUserCleanupInterval": 360,
"sort_groups_by_name": false,
"ldapIgnoreNamingRules": false,
"maintenance": false,
"memcache.local": "\\OC\\Memcache\\APCu",
"memcache.distributed": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 6379,
"timeout": 0,
"password": "***REMOVED SENSITIVE VALUE***",
"dbindex": 1
},
"cache_chunk_gc_ttl": 86400,
"tempdirectory": "\/nextcloud\/tmp",
"share_folder": "\/",
"theme": "",
"cipher": "AES-256-CFB",
"filesystem_check_changes": 1,
"part_file_in_storage": true,
"mount_file": "\/nextcloud\/data\/mount.json",
"filesystem_cache_readonly": false,
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"forwarded_for_headers": [
"HTTP_X_FORWARDED_FOR"
],
"max_filesize_animated_gifs_public_sharing": 10,
"filelocking.enabled": true,
"filelocking.ttl": 3600,
"filelocking.debug": false,
"memcache.locking": "\\OC\\Memcache\\Redis",
"upgrade.disable-web": false,
"debug": false,
"data-fingerprint": "",
"simpleSignUpLink.shown": false,
"login_form_autocomplete": false,
"ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory"
}
Are you using external storage, if yes which one: nfs
Are you using encryption: no
Server log (data/nextcloud.log)
Libreoffice is installed:
dpkg-query -l | grep -i libreoffice
ii libreoffice 1:6.1.5-3+deb10u5 amd64 office productivity suite (metapackage)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the flow with a .docx upload and inspect the cron.php path around the reported failure in lib/private/Files/View.php#1042. Compare the PDF conversion app's handling of the missing oc_tmp_*.pdf with the existing preview output. Done means the workflow creates both the original document and a PDF without the logged fopen 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
- 25/100