nextcloud / nextcloud/deck

error 500: links broken, uploaded files not found

Open
#3,453 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug feature: attachments
Dominant language
JavaScript
Stars
1.4k
Forks
354
Avg merge
1d 10h
Merged PRs (30d)
43

Description

How to use GitHub
  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Description of the bug
Files that were uploaded as attachment to a deck card in a previous version cannot be opened in the current version 1.5.5 and return error 500.
Hyperlink shows up as e.g. https://servername/f/undefined
Files in interface are labelled 'NaN B vor 3 Jahren'
These files are still physically present in a server subdirectory of e.g. /data/appdata..../deck/file-card-73/...

NC Log-entry: OCP\Files\NotFoundException: /appdata_oc0scagbkxv1/deck/file-card-73/

Files uploaded from current version get stored into the subdir 'Deck' of the users directory data and are accessible.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Deck/Board/Card/attachments'
  2. Click on file
  3. See error 500

Expected behavior
open or download attached file

Client details:

  • Manjaro linux '5.10.70-1-MANJARO' -
  • Browser Firefox 93.0
  • Device: desktop PC
Server details

Operating system: Manjaro linux '5.10.70-1-MANJARO'

Web server: nginx version: nginx/1.20.1

Database: mysql 10.6.4

PHP version: 8.011

Nextcloud version: 22.2.3

Where did you install Nextcloud from: download.nextcloud.com/server/releases/

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:**
Enabled:
  - accessibility: 1.8.0
  - activity: 2.15.0
  - admin_audit: 1.12.0
  - calendar: 2.4.0
  - camerarawpreviews: 0.7.15
  - circles: 22.1.1
  - cloud_federation_api: 1.5.0
  - comments: 1.12.0
  - contacts: 4.0.6
  - contactsinteraction: 1.3.0
  - dashboard: 7.2.0
  - dav: 1.19.0
  - deck: 1.5.5
  - federatedfilesharing: 1.12.0
  - federation: 1.12.0
  - files: 1.17.0
  - files_pdfviewer: 2.3.1
  - files_rightclick: 1.1.0
  - files_sharing: 1.14.0
  - files_trashbin: 1.12.0
  - files_videoplayer: 1.11.0
  - logreader: 2.7.0
  - lookup_server_connector: 1.10.0
  - nextcloud_announcements: 1.11.0
  - notes: 4.2.0
  - notifications: 2.10.1
  - oauth2: 1.10.0
  - password_policy: 1.12.0
  - photos: 1.4.0
  - previewgenerator: 3.2.0
  - privacy: 1.6.0
  - provisioning_api: 1.12.0
  - recommendations: 1.1.0
  - serverinfo: 1.12.0
  - settings: 1.4.0
  - sharebymail: 1.12.0
  - spreed: 12.1.2
  - support: 1.5.0
  - systemtags: 1.12.0
  - tasks: 0.14.2
  - text: 3.3.0
  - theming: 1.13.0
  - twofactor_backupcodes: 1.11.0
  - updatenotification: 1.12.0
  - user_status: 1.2.0
  - viewer: 1.6.0
  - weather_status: 1.2.0
  - workflowengine: 2.4.0
Disabled:
  - encryption
  - files_external
  - files_versions
  - firstrunwizard
  - survey_client
  - user_ldap

**Nextcloud configuration:**
{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "hostname",
            "IP"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "22.2.3.0",
        "overwrite.cli.url": "http:\/\/localhost",
        "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***",
        "default_phone_region": "DE",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtpsecure": "tls",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "activity_expire_days": 14,
        "auth.bruteforce.protection.enabled": true,
        "blacklisted_files": [
            ".htaccess",
            "Thumbs.db",
            "thumbs.db"
        ],
        "cron_log": true,
        "enable_previews": true,
        "enabledPreviewProviders": [
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\Movie",
            "OC\\Preview\\PDF",
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown"
        ],
        "filesystem_check_changes": 0,
        "filelocking.enabled": "true",
        "htaccess.RewriteBase": "\/",
        "integrity.check.disabled": false,
        "knowledgebaseenabled": false,
        "logfile": "\/var\/nc_data\/nextcloud.log",
        "loglevel": 2,
        "logtimezone": "Europe\/Berlin",
        "log_rotate_size": 104857600,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "overwriteprotocol": "https",
        "preview_max_x": 1024,
        "preview_max_y": 768,
        "preview_max_scale_factor": 1,
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0
        },
        "quota_include_external_storage": false,
        "share_folder": "\/Shares",
        "skeletondirectory": "",
        "theme": "",
        "trashbin_retention_obligation": "auto, 7",
        "updater.release.channel": "stable",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "app_install_overwrite": [
            "recommendation_assistant"
        ]
    }
}

**Are you using an external user-backend, if yes which one:** No

#### Nextcloud log (data/nextcloud.log)

| OCP\Files\NotFoundException: /appdata_oc0scagbkxv1/deck/file-card-73/XXXXX.ods
/usr/share/webapps/nextcloud/lib/private/Files/Node/Folder.php - line 146: OC\Files\Node\Root->get()
/usr/share/webapps/nextcloud/apps/deck/lib/Service/FileService.php - line 225: OC\Files\Node\Folder->get()
/usr/share/webapps/nextcloud/apps/deck/lib/Service/FileService.php - line 234: OCA\Deck\Service\FileService->getFileFromRootFolder()
/usr/share/webapps/nextcloud/apps/deck/lib/Service/AttachmentService.php - line 257: OCA\Deck\Service\FileService->display()
/usr/share/webapps/nextcloud/apps/deck/lib/Controller/AttachmentController.php - line 61: OCA\Deck\Service\AttachmentService->display()
/usr/share/webapps/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 217: OCA\Deck\Controller\AttachmentController->display()
/usr/share/webapps/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 126: OC\AppFramework\Http\Dispatcher->executeController()
/usr/share/webapps/nextcloud/lib/private/AppFramework/App.php - line 156: OC\AppFramework\Http\Dispatcher->dispatch()
/usr/share/webapps/nextcloud/lib/private/Route/Router.php - line 302: OC\AppFramework\App::main()
/usr/share/webapps/nextcloud/lib/base.php - line 1006: OC\Route\Router->match()
/usr/share/webapps/nextcloud/index.php - line 36: OC::handleRequest()
-- | --

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 with apps/deck/lib/Service/FileService.php around lines 225 and 234, then trace the call through AttachmentService.php and AttachmentController.php. Compare how the logged legacy appdata path is resolved with the path used for current attachments. Done means attachments uploaded in earlier versions open or download without a 500 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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.