When moving files they become corrupted

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  1. Nextcloud VersionNextcloud 23.0.0.10
  2. Hardware Configuration – AWS EC2 instance, Linux/UNIX, Instance type: t2.2xlarge.
  3. The issue: We have two issues related to file corruption listed below

The issue

When we rename a folder, all of the scanned files within it become corrupted.

Issue number 2 is that when we create a new subfolder and move a scanned file into it it becomes corrupted as well.

If there are some logs or something I can pull from somewhere to give more info please let me know:) Thanks!

rename with what?

1 Like

Is the version correct? In that case, the last version is from 2022 and is currently unsupported. So as a first step I recommend to update to a supported version :slight_smile:
See Maintenance and Release Schedule · nextcloud/server Wiki · GitHub for the versions.

1 Like

@Sanook Just right clicking and renaming a folder within nextcloud

@SysKeeper @Sanook Hi reaching back out because we have upgraded to the latest version of nextcloud and still experiencing this issue. Here is more details:

Summary of the issue you are facing:

A user renamed a folder that had sub folders and PDFs files within it. After the folder was renamed, all the PDFs inside the folder became corrupted somehow.

Steps to replicate it (hint: details matter!):

  1. Rename existing folder that was shared out to people. After it was renamed, the people it was shared with were no longer on the folder. The user that renamed the folder is in admin group.
  2. PDF files within that folder no longer opened properly
  3. The error shown when trying to open the PDFs: “PDF.js v2.10.377 (build: 156762c48) Message: Invalid PDF structure.

Note: Prior to the folder being renamed, all the files were opening normally.

Any help would be appreciated thank you!

PDF.js, which you’re presumably getting via the files_pdfviewer app in Nextcloud, hasn’t used v2.10.377 since Nextcloud Server v23.

What Nextcloud installation method?
And do you have a reverse proxy? If so, what type?

Please also post the output of:

  • occ config:list system
  • occ app:list

@jtr here is the info you asked for!

occ config:list system output:
{
“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
}
],
“instanceid”: “REMOVED SENSITIVE VALUE”,
“passwordsalt”: “REMOVED SENSITIVE VALUE”,
“secret”: “REMOVED SENSITIVE VALUE”,
“trusted_domains”: [
“127.0.0.1:8000”,
“172.31.22.106:8000”,
“18.204.228.54:8000”,
nextcloud.eassist.me
],
“datadirectory”: “REMOVED SENSITIVE VALUE”,
“dbtype”: “pgsql”,
“version”: “29.0.12.2”,
“overwrite.cli.url”: “http://172.31.22.106:8000”,
“overwriteprotocol”: “https”,
“dbname”: “REMOVED SENSITIVE VALUE”,
“dbhost”: “REMOVED SENSITIVE VALUE”,
“dbport”: “”,
“dbtableprefix”: “oc_”,
“dbuser”: “REMOVED SENSITIVE VALUE”,
“dbpassword”: “REMOVED SENSITIVE VALUE”,
“installed”: true,
“skeletondirectory”: “”,
“mail_smtpmode”: “smtp”,
“mail_sendmailmode”: “smtp”,
“maintenance”: false,
“twofactor_enforced”: “true”,
“twofactor_enforced_groups”: [
“SCs”,
“IT Leads”,
“Clients”,
“IT with Share Access”
],
“twofactor_enforced_excluded_groups”: [
“admin”
],
“app_install_overwrite”: [
“bookmarks_fulltextsearch”
],
“mail_from_address”: “REMOVED SENSITIVE VALUE”,
“mail_domain”: “REMOVED SENSITIVE VALUE”,
“mail_smtphost”: “REMOVED SENSITIVE VALUE”,
“mail_smtpport”: “465”,
“mail_smtpauth”: 1,
“mail_smtpname”: “REMOVED SENSITIVE VALUE”,
“mail_smtppassword”: “REMOVED SENSITIVE VALUE”,
“mail_smtpsecure”: “ssl”,
“filelocking.enabled”: true,
“updater.secret”: “REMOVED SENSITIVE VALUE”,
“loglevel”: 0
}
}

occ app:list output:
Enabled:

  • activity: 2.21.1
  • admin_audit: 1.19.0
  • bruteforcesettings: 2.9.0
  • cloud_federation_api: 1.12.0
  • comments: 1.19.0
  • contacts: 6.0.3
  • contactsinteraction: 1.10.0
  • dav: 1.30.1
  • encryption: 2.17.0
  • federatedfilesharing: 1.19.0
  • federation: 1.19.0
  • files: 2.1.1
  • files_accesscontrol: 1.19.1
  • files_downloadlimit: 2.0.0
  • files_external: 1.21.0
  • files_fulltextsearch: 29.0.1
  • files_pdfviewer: 2.10.0
  • files_reminders: 1.2.0
  • files_scripts: 4.1.0
  • files_sharing: 1.21.0
  • files_trashbin: 1.19.0
  • files_versions: 1.22.0
  • fulltextsearch: 29.0.1
  • impersonate: 1.16.0
  • logreader: 2.14.0
  • lookup_server_connector: 1.17.0
  • mail: 3.7.20
  • nextcloud_announcements: 1.18.0
  • notifications: 2.17.0
  • oauth2: 1.17.1
  • password_policy: 1.19.0
  • privacy: 1.13.0
  • provisioning_api: 1.19.0
  • recommendations: 2.1.0
  • related_resources: 1.4.0
  • richdocumentscode: 24.4.1103
  • serverinfo: 1.19.0
  • settings: 1.12.0
  • sharebymail: 1.19.0
  • sociallogin: 5.9.1
  • socialsharing_email: 3.3.0
  • support: 1.12.0
  • systemtags: 1.19.0
  • text: 3.10.1
  • theming: 2.4.0
  • twofactor_backupcodes: 1.18.0
  • twofactor_totp: 11.0.0-dev
  • updatenotification: 1.19.1
  • user_status: 1.9.0
  • viewer: 2.3.0
  • workflowengine: 2.11.0
    Disabled:
  • calendar: 4.7.16 (installed 4.7.16)
  • circles: 29.0.0-dev (installed 23.0.0)
  • dashboard: 7.9.0 (installed 7.3.0)
  • files_antivirus: 5.6.1 (installed 5.6.1)
  • files_automatedtagging: 1.19.0 (installed 1.19.0)
  • files_fulltextsearch_tesseract: 27.0.0 (installed 27.0.0)
  • files_retention: 1.18.0 (installed 1.18.0)
  • files_rightclick: 0.15.1 (installed 1.6.0)
  • firstrunwizard: 2.18.0 (installed 2.12.0)
  • flow_notifications: 1.9.0 (installed 1.9.0)
  • fulltextsearch_elasticsearch: 29.0.1 (installed 29.0.1)
  • groupfolders: 17.0.10 (installed 17.0.10)
  • photos: 2.5.0 (installed 1.5.0)
  • richdocuments: 8.4.9 (installed 8.4.9)
  • spreed: 19.0.13 (installed 19.0.13)
  • survey_client: 1.17.0 (installed 1.11.0)
  • suspicious_login: 7.0.0
  • twofactor_admin: 4.7.1 (installed 4.7.1)
  • twofactor_email: 2.7.4 (installed 2.7.4)
  • user_ldap: 1.20.0
  • weather_status: 1.9.0 (installed 1.3.0)
  • workflow_ocr: 1.28.1 (installed 1.28.1)
  • workflow_script: 1.13.1 (installed 1.13.1)

Nextcloud installation method:
Nextcloud is installed using Docker with the image nextcloud:29.0.12

Reverse proxy:

  • Yes, we have a reverse proxy.
  • The reverse proxy is Nginx

The version of PDF.js that is bundled in the files_pdfviewer shipped with Nc v29.0.12 is 4.0.189 so something is not right in your environment.

Couple things to check:

  • Do you have another version of files_pdfviewer installed within the custom_apps/ folder perhaps?
  • Do you have any errors or warnings under Admin settings->Overview?

@jtr Im not seeing another version of the files_pdfviewer installed in custom apps, and it doesn’t seem like there is any related errors on the overview page. I have seen some people say they removed the app from the apps folder and reclone the newest version. is that maybe something you would suggest?