File drop "Could not upload" error but file uploaded correctly

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

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:

Nextcloud version (eg, 20.0.5): 24.0.2
Operating system and version (eg, Ubuntu 20.04): Ubuntu 16.04
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.18
PHP version (eg, 7.4): 7.4.18

The issue you are facing:
I have a shared folder configured as file drop, where people can safely upload documents to me. When they do that, they get an error message in the top right corner of the page that says “Could not upload [filename]”. However, the file of that name is uploaded correctly. This is confusing for people because they think their file wasn’t received and often they try multiple times.

Is this the first time you’ve seen this error? (Y/N): Yes

Steps to replicate it:

  1. Share folder as file drop
  2. Use the share link of the file drop location in a new browser window
  3. Upload file

The output of your Nextcloud log in Admin > Logging:

{"reqId":"Yr70yrISUDEAADMIe9UAAAAJ","level":4,"time":"2022-07-01T13:21:14+00:00","remoteAddr":"159.48.55.24","user":"--","app":"webdav","method":"PUT","url":"/public.php/webdav/document.pdf","message":"\"put\" can only be accessed once if not application/x-www-form-urlencoded or application/json.","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:101.0) Gecko/20100101 Firefox/101.0","version":"24.0.2.1","exception":{"Exception":"LogicException","Message":"\"put\" can only be accessed once if not application/x-www-form-urlencoded or application/json.","Code":0,"Trace":[{"file":"/var/www/cloud.beris.nl/lib/private/AppFramework/Http/Request.php","line":269,"function":"getContent","class":"OC\\AppFramework\\Http\\Request","type":"->"},{"file":"/var/www/cloud.beris.nl/lib/private/AppFramework/Http/Request.php","line":338,"function":"__get","class":"OC\\AppFramework\\Http\\Request","type":"->"},{"file":"/var/www/cloud.beris.nl/lib/private/Activity/Manager.php","line":327,"function":"getParam","class":"OC\\AppFramework\\Http\\Request","type":"->"},{"file":"/var/www/cloud.beris.nl/apps/systemtags/lib/Activity/Provider.php","line":89,"function":"isFormattingFilteredObject","class":"OC\\Activity\\Manager","type":"->"},{"file":"/var/www/cloud.beris.nl/apps/activity/lib/NotificationGenerator.php","line":96,"function":"parse","class":"OCA\\SystemTags\\Activity\\Provider","type":"->"},{"file":"/var/www/cloud.beris.nl/apps/activity/lib/NotificationGenerator.php","line":123,"function":"populateEvent","class":"OCA\\Activity\\NotificationGenerator","type":"->"},{"file":"/var/www/cloud.beris.nl/lib/private/Notification/Manager.php","line":376,"function":"prepare","class":"OCA\\Activity\\NotificationGenerator","type":"->"},{"file":"/var/www/cloud.beris.nl/apps/notifications/lib/Push.php","line":255,"function":"prepare","class":"OC\\Notification\\Manager","type":"->"},{"file":"/var/www/cloud.beris.nl/apps/notifications/lib/App.php","line":57,"function":"pushToDevice","class":"OCA\\Notifications\\Push","type":"->"},{"file":"/var/www/cloud.beris.nl/lib/private/Notification/Manager.php","line":337,"function":"notify","class":"OCA\\Notifications\\App","type":"->"},{"file":"/var/www/cloud.beris.nl/apps/activity/lib/NotificationGenerator.php","line":61,"function":"notify","class":"OC\\Notification\\Manager","type":"->"},{"file":"/var/www/cloud.beris.nl/apps/activity/lib/Consumer.php","line":72,"function":"sendNotificationForEvent","class":"OCA\\Activity\\NotificationGenerator","type":"->"},{"file":"/var/www/cloud.beris.nl/lib/private/Activity/Manager.php","line":157,"function":"receive","class":"OCA\\Activity\\Consumer","type":"->"},{"file":"/var/www/cloud.beris.nl/apps/systemtags/lib/Activity/Listener.php","line":228,"function":"publish","class":"OC\\Activity\\Manager","type":"->"},{"file":"/var/www/cloud.beris.nl/apps/systemtags/lib/AppInfo/Application.php","line":72,"function":"mapperEvent","class":"OCA\\SystemTags\\Activity\\Listener","type":"->"},{"file":"/var/www/cloud.beris.nl/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"function":"OCA\\SystemTags\\AppInfo\\{closure}","class":"OCA\\SystemTags\\AppInfo\\Application","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/cloud.beris.nl/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/cloud.beris.nl/lib/private/EventDispatcher/EventDispatcher.php","line":88,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/cloud.beris.nl/lib/private/EventDispatcher/SymfonyAdapter.php","line":99,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/cloud.beris.nl/lib/private/SystemTag/SystemTagObjectMapper.php","line":174,"function":"dispatch","class":"OC\\EventDispatcher\\SymfonyAdapter","type":"->"},{"file":"/var/www/cloud.beris.nl/apps/files_automatedtagging/lib/Operation.php","line":98,"function":"assignTags","class":"OC\\SystemTag\\SystemTagObjectMapper","type":"->"},{"file":"/var/www/cloud.beris.nl/apps/files_automatedtagging/lib/Listener/CacheListener.php","line":43,"function":"checkOperations","class":"OCA\\FilesAutomatedTagging\\Operation","type":"->"},{"file":"/var/www/cloud.beris.nl/lib/private/EventDispatcher/ServiceEventListener.php","line":87,"function":"handle","class":"OCA\\FilesAutomatedTagging\\Listener\\CacheListener","type":"->"},{"file":"/var/www/cloud.beris.nl/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/var/www/cloud.beris.nl/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/cloud.beris.nl/lib/private/EventDispatcher/EventDispatcher.php","line":88,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/cloud.beris.nl/lib/private/EventDispatcher/EventDispatcher.php","line":100,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/cloud.beris.nl/lib/private/Files/Cache/Cache.php","line":327,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/cloud.beris.nl/lib/private/Files/Cache/Wrapper/CacheWrapper.php","line":135,"function":"insert","class":"OC\\Files\\Cache\\Cache","type":"->"},{"file":"/var/www/cloud.beris.nl/lib/private/Files/Cache/Wrapper/CacheWrapper.php","line":135,"function":"insert","class":"OC\\Files\\Cache\\Wrapper\\CacheWrapper","type":"->"},{"file":"/var/www/cloud.beris.nl/lib/private/Files/Cache/Wrapper/CacheWrapper.php","line":135,"function":"insert","class":"OC\\Files\\Cache\\Wrapper\\CacheWrapper","type":"->"},{"file":"/var/www/cloud.beris.nl/lib/private/Files/Cache/Wrapper/CacheWrapper.php","line":135,"function":"insert","class":"OC\\Files\\Cache\\Wrapper\\CacheWrapper","type":"->"},{"file":"/var/www/cloud.beris.nl/lib/private/Files/Cache/Scanner.php","line":296,"function":"insert","class":"OC\\Files\\Cache\\Wrapper\\CacheWrapper","type":"->"},{"file":"/var/www/cloud.beris.nl/lib/private/Files/Cache/Scanner.php","line":226,"function":"addToCache","class":"OC\\Files\\Cache\\Scanner","type":"->"},{"file":"/var/www/cloud.beris.nl/lib/private/Files/Cache/Scanner.php","line":340,"function":"scanFile","class":"OC\\Files\\Cache\\Scanner","type":"->"},{"file":"/var/www/cloud.beris.nl/lib/private/Files/Cache/Updater.php","line":125,"function":"scan","class":"OC\\Files\\Cache\\Scanner","type":"->"},{"file":"/var/www/cloud.beris.nl/apps/dav/lib/Connector/Sabre/File.php","line":369,"function":"update","class":"OC\\Files\\Cache\\Updater","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/cloud.beris.nl/apps/dav/lib/Connector/Sabre/Directory.php","line":164,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/cloud.beris.nl/3rdparty/sabre/dav/lib/DAV/Server.php","line":1098,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->"},{"file":"/var/www/cloud.beris.nl/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":504,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/cloud.beris.nl/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/cloud.beris.nl/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/cloud.beris.nl/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/cloud.beris.nl/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/cloud.beris.nl/apps/dav/appinfo/v1/publicwebdav.php","line":113,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/cloud.beris.nl/public.php","line":80,"args":["/var/www/cloud.beris.nl/apps/dav/appinfo/v1/publicwebdav.php"],"function":"require_once"}],"File":"/var/www/cloud.beris.nl/lib/private/AppFramework/Http/Request.php","Line":407,"CustomMessage":"--"},"id":"62bf08ea8c96e"}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

{
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "cloud.example.com",
        "example.com"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "overwrite.cli.url": "https:\/\/cloud.example.com",
    "dbtype": "mysql",
    "version": "24.0.2.1",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "logtimezone": "UTC",
    "installed": true,
    "memcache.local": "\\OC\\Memcache\\APCu",
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "filelocking.enabled": "true",
    "redis": {
        "host": "***REMOVED SENSITIVE VALUE***",
        "port": 0,
        "timeout": 0
    },
    "htaccess.RewriteBase": "\/",
    "updater.release.channel": "stable",
    "theme": "",
    "log_type": "file",
    "logfile": "\/home\/nextcloud\/nextcloud.log",
    "logfilemode": 416,
    "loglevel": 1,
    "log_rotate_size": 10485760,
    "maintenance": false,
    "mail_smtpmode": "smtp",
    "mail_smtpsecure": "tls",
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpport": "587",
    "mail_smtpauthtype": "PLAIN",
    "mail_smtpauth": 1,
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "mysql.utf8mb4": true,
    "enable_previews": true,
    "enabledPreviewProviders": [
        "OC\\Preview\\Image",
        "OC\\Preview\\Movie",
        "OC\\Preview\\TXT",
        "OC\\Preview\\MP3",
        "OC\\Preview\\MKV",
        "OC\\Preview\\MP4",
        "OC\\Preview\\AVI"
    ],
    "preview_max_x": 1024,
    "preview_max_y": 1024,
    "preview_max_filesize_image": 5,
    "ldapIgnoreNamingRules": false,
    "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
    "encryption.legacy_format_support": false,
    "encryption.key_storage_migrated": false,
    "mail_sendmailmode": "smtp",
    "default_phone_region": "NL"
}

The output of your Apache/nginx/system log in /var/log/____:

159.48.xxx.xxx - sL2ZkGCW6BFcfnq [01/Jul/2022:15:20:18 +0200] "PUT /public.php/webdav/document.pdf HTTP/1.1" 500 5761 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:101.0) Gecko/20100101 Firefox/101.0"
159.48.xxx.xxx - - [01/Jul/2022:15:20:19 +0200] "GET /core/img/actions/error.svg HTTP/1.1" 200 5370 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:101.0) Gecko/20100101 Firefox/101.0"

This problem has been reported before in older versions:

Following the advice there, I disabled the Activity app. This workaround does get rid of the error people get when uploading. I need the Activity app so it’s not really a feasible workaround for me.

Looks like an earlier bug but I am not using server side encryption.

Any ideas? Should I open a bug report?