Unable to upload simple small files

Why is it that I often cannot upload simple small files. Sometimes I can upload large files or small files and other times it just hangs.

See the video I made about this at https://defaria.com/tmp/NextCloudUploadProblems.mp4

Anything in the logfiles?
https://docs.nextcloud.com/server/stable/admin_manual/issues/general_troubleshooting.html#id1

There’s a lot of squawking about sharerenamer (yet sharerenamer works) and a couple of what looks like errors about being unable to create a directory and missing or invalid tokens for Authorization bearer. I guess my point is that while it’s fine that such things are logged, however, if you are unable to accomplish a task, especially a bread-and-butter task like uploading a file, then you should alert the user of the problem in the UI, not hang forever having the user scratch their heads not knowing why it’s not working.

What? I can’t even upload a log file?!? Changed its name to .pdf. Rename it back to nextcloud.log to view.

nextcloud.pdf (70.5 KB)

ShareRenamer is a third party app and hasn’t been updated to work with anything behind Nextcloud v26. It’s not possible to install unless you force enable it because it is incompatible with >v26.

It’s triggering exceptions constantly in your environment, including on upload attempts like below. I somewhat surprised you’re not having even more problems with your Server. I suggest disabling then retesting.

If it still fails, please provide your browser console output and also check the Network tab in your browser console.

Something else is going on here.

{
  "reqId": "Zw36FYvm9JWmx3wJC2li",
  "level": 4,
  "time": "2024-03-13T14:09:14+00:00",
  "remoteAddr": "172.17.0.1",
  "user": "--",
  "app": "sharerenamer",
  "method": "MKCOL",
  "url": "/remote.php/dav/uploads/andrew/web-file-upload-e28c6aea23c2cbe5",
  "message": "Error during app service registration: Autoload path not allowed: /var/www/html/apps/sharerenamer/appinfo/application.php",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36",
  "version": "28.0.3.2",
  "exception": {
    "Exception": "OCP\\AutoloadNotAllowedException",
    "Message": "Autoload path not allowed: /var/www/html/apps/sharerenamer/appinfo/application.php",
[...]

I didn’t force install it and yet it’s there. I disabled it and restarted the container.

This does not negate the fact that if an operation fails the user should be notified of the failure.

Basically, since I’ve been using NC I’ve had intermittent failures when uploading files. Sometimes relatively small files. Often big files. It’s really hard to convince my non-techy friends to utilize my NC for storage when the upload failure rate is so high. They naturally get frustrated and give up.

OK, so disabled sharerenamer and restarted NC container. Tried an upload. Hung like all the other times. Here’s the “log” (pdf → log)

nextcloud.pdf (18.1 KB)

I just played around on my setup, if I change the permission so you cannot write any more, there is an error message in the GUI, but it shows on the top right corner.
There are a few strange things, I get web-file upload ids that are much longer:


/remote.php/dav/uploads/user/web-file-upload-822492deb4aec1dee15709d64975bc33-1710406280711/2

And for large files uploading, in the webserver logs, you get this:

1.2.3.4 - - [14/Mar/2024:09:59:22 +0100] nc.example.net "MKCOL /remote.php/dav/uploads/user/web-file-upload-822492deb4aec1dee15709d64975bc33-1710406280711 HTTP/2.0" 201 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" "-"
1.2.3.4 - - [14/Mar/2024:09:59:23 +0100] nc.example.net "PUT /remote.php/dav/uploads/user/web-file-upload-822492deb4aec1dee15709d64975bc33-1710406280711/1 HTTP/2.0" 201 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" "-"
1.2.3.4 - - [14/Mar/2024:09:59:23 +0100] nc.example.net "PUT /remote.php/dav/uploads/user/web-file-upload-822492deb4aec1dee15709d64975bc33-1710406280711/2 HTTP/2.0" 201 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" "-"
1.2.3.4 - - [14/Mar/2024:09:59:24 +0100] nc.example.net "MOVE /remote.php/dav/uploads/user/web-file-upload-822492deb4aec1dee15709d64975bc33-1710406280711/.file HTTP/2.0" 201 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" "-"

You have a few other errors with the authorization. Not sure if that is linked, but I’d go through all this anyhow. If you still have a few old apps that are not supported, I’d try that first. Other good reason could be an old webserver configuration (between the versions, the recommended configs can change a bit), reverse proxies can create problems.

It’s normal plain storage, nothing shared, no groupfolders, no external storage, …?

(the templates show when you create a new topic are a good guideline which type of information might be helpful to debug problems)

there are numerous checks in place that generate dedicated error messages for common problems (file already exists, no writing access, …).

1 Like

As I stated, I get no error message in the UI. It just hangs. I have no idea why I get errors about authorization in the logs nor do I know how to fix them. I have no idea if I have unsupported apps. As had been said, I should not have been able to install them, yet they are installed and sometimes working. The only other one I can think of is impersonate, which is highly useful and appears to work without issue.

Not sure what you mean by “old webserver configuration”. Where would that be?

I do have shares. Are shares not allowed? I’m not uploading to a share - I’m uploading to the root directory for the user. What’s a group folder? External storage. Yeah, I have that. I’m not trying to upload to external storage though.

I’m also not sure why you posted file-upload.js. I’m sure there are checks for errors. However, again, I get no errors displayed in the UI. It just hangs, which to me, is unacceptable.

Is there an app_install_overwrite entry in your config.php? Is it listed there?

This does not negate the fact that if an operation fails the user should be notified of the failure.

Agreed. But the thing is they typically are. Until we get to the bottom of what’s going on in your environment we can’t say why you’re not getting any feedback.

Not sure what you mean by “old webserver configuration”. Where would that be?

Every major version of Nextcloud documents if changes are required to other components of your infrastructure - such as your web server. e.g. for v28.

I’m also not sure why you posted file-upload.js. I’m sure there are checks for errors. However, again, I get no errors displayed in the UI. It just hangs, which to me, is unacceptable.

I think @tflidd was just trying to point out that there are attempts to generate useful messages in the Web UI’s uploader for most possibilities. You keep noting the lack of feedback as if it was a deliberate oversight. It’s not.

Until the root cause of your particular situation identified, none of us - yourself included - have any idea why you’re not getting useful feedback during the failing upload attempt. For all we know it’s a browser extension or something.

Anyhow, as I stated in my original reply:

If it still fails, please provide your browser console output and also check the Network tab in your browser console. This will tell us what your browser is getting from the server and give us a better trail of clues to start diagnosing the root case from.

"message": "Could not create directory //web-file-upload-4fa752f6bcce2dee",

This is a bit worrisome.

Can you please:

  • provide the requested console output Network tab output?
  • check Administration settings->Overview for any warnings
  • clarify what Nextcloud installation method you use

I have no idea why I get errors about authorization in the logs nor do I know how to fix them. I have no idea if I have unsupported apps

We have no idea either. You haven’t even posted your config. :slight_smile: So add these to the list:

  • post your current system config (config.php or output from occ config:list system)
  • post your apps list (occ app:list).
1 Like

Yes there is an app_install_overwrite:

 'app_install_overwrite' =>  
  array (
    0 => 'files_markdown',
    1 => 'impersonate',
    2 => 'sharerenamer',
    3 => 'cfg_share_links',
    4 => 'defaultlinkopen',
  ),  

Not sure how it got there.

That web page you pointed to Upgrade to Nextcloud 28 — Nextcloud latest Administration Manual latest documentation describes nginx config. I seem to be using Apache.

I did not mean to imply that not reporting errors were deliberate, just that I’m not getting any errors.

I wasn’t sure what you meant by browser console output but I think I found it. Nothing interesting in the Network tab.

JQMIGRATE: Migrate is installed, version 3.4.1
ConsoleLogger.js:74 [ERROR] files: nc:share-attributes already registered Object
value @ ConsoleLogger.js:74
Show 1 more frame
Show less
ConsoleLogger.js:74 [ERROR] files: oc:share-types already registered Object
value @ ConsoleLogger.js:74
Show 1 more frame
Show less
ConsoleLogger.js:74 [ERROR] files: ocs:share-permissions already registered Object
value @ ConsoleLogger.js:74
Show 1 more frame
Show less
logger-YHHKXmsa.mjs:2 [INFO] activity: Activity API registered Object
circles.files.list.js?v=73034410-0:42 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
    at circles.files.list.js?v=73034410-0:42:55
    at circles.files.list.js?v=73034410-0:306:3
ConsoleLogger.js:71 [WARN] viewer: Some mimes were ignored because they are not enabled in the server previews config Object
value @ ConsoleLogger.js:71
Show 1 more frame
Show less
ConsoleLogger.js:68 [INFO] viewer: 5 viewer handlers registered Object
session-heartbeat.js:103 session heartbeat polling started
ConsoleLogger.js:68 [INFO] comments: Comments plugin registered for Activity sidebar action Object
www.facebook.com/tr?id=1731524830476313&ev=PageView:1 
        
        
       Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
/remote.php/dav/uploads/andrew/web-file-upload-ead922e3283d2a12:1 
        
        
       Failed to load resource: the server responded with a status of 403 ()
settle.js:19 Uncaught (in promise) a
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less
NcButton.mjs:155 You need to fill either the text or the ariaLabel props in the button component. Object o
render @ NcButton.mjs:155
Show 1 more frame
Show less

I run Nextcloud in a docker container on Synology.

www-data@nextcloud:./occ config:list  system
{
    "system": {
        "filesystem_check_change": 1,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "cloud.defariahome.com"
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "default_phone_region": "US",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "28.0.3.2",
        "overwrite.cli.url": "https:\/\/cloud.defariahome.com",
        "overwritehost": "cloud.defariahome.com",
        "overwriteprotocol": "https",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "enable_previews": true,
        "enabledPreviewProviders": [
            "OC\\Preview\\Movie",
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\MP3",
            "OC\\Preview\\MP4",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\PDF",
            "OC\\Preview\\SVG"
        ],
        "theme": "",
        "log_type": "file",
        "logfile": "\/var\/www\/html\/data\/nextcloud.log",
        "loglevel": 0,
        "logdataformat": "F d, Y H:i:s",
        "debug": false,
        "mail_smtpsecure": "ssl",
        "app_install_overwrite": [
            "files_markdown",
            "impersonate",
            "sharerenamer",
            "cfg_share_links",
            "defaultlinkopen"
        ],
        "updater.secret": "***REMOVED SENSITIVE VALUE***"
    }
}
www-data@nextcloud:~/html$ ./occ app:list          
Enabled:
  - activity: 2.20.0
  - circles: 28.0.0-dev
  - cloud_federation_api: 1.11.0
  - comments: 1.18.0
  - contactsinteraction: 1.9.0
  - dashboard: 7.8.0
  - dav: 1.29.1
  - federatedfilesharing: 1.18.0
  - federation: 1.18.0
  - files: 2.0.0
  - files_external: 1.20.0
  - files_pdfviewer: 2.9.0
  - files_reminders: 1.1.0
  - files_sharing: 1.20.0
  - files_trashbin: 1.18.0
  - files_versions: 1.21.0
  - firstrunwizard: 2.17.0
  - logreader: 2.13.0
  - lookup_server_connector: 1.16.0
  - nextcloud_announcements: 1.17.0
  - notifications: 2.16.0
  - oauth2: 1.16.3
  - password_policy: 1.18.0
  - photos: 2.4.0
  - privacy: 1.12.0
  - provisioning_api: 1.18.0
  - recommendations: 2.0.0
  - related_resources: 1.3.0
  - serverinfo: 1.18.0
  - settings: 1.10.1
  - sharebymail: 1.18.0
  - support: 1.11.0
  - survey_client: 1.16.0
  - systemtags: 1.18.0
  - text: 3.9.1
  - theming: 2.3.0
  - twofactor_backupcodes: 1.17.0
  - updatenotification: 1.18.0
  - user_status: 1.8.1
  - viewer: 2.2.0
  - weather_status: 1.8.0
  - workflowengine: 2.10.0
Disabled:
  - admin_audit: 1.18.0
  - bruteforcesettings: 2.8.0
  - encryption: 2.16.0
  - suspicious_login: 6.0.0
  - twofactor_totp: 10.0.0-beta.2
  - user_ldap: 1.19.0
www-data@nextcloud:~/html$ 

Can you elaborate? What transactions appear there when attempting to upload a file fails?

    "trusted_proxies": "***REMOVED SENSITIVE VALUE***",

Based on the above as well as the warning in your overview, there is a proxy in the mix for all your web transactions. That could turn out to be relevant. What proxy are you using?

Whereas I could copy and paste the console log, I couldn’t copy and paste the network tab. There didn’t seem to be anything interesting in that tab but if you must look here’s what I see:

I’m using NC on Synology in a Docker container. I’m using Synology’s reverse proxy setup so that I can get to NC from outside my LAN. Let me know what other information you may need on this.

That tab (Network) should be full of activity while you’re using Nextcloud. You had that open while attempting an upload and that’s all that appeared in it?

Pretty much yes. I went to my NC, drag and dropped a file in there. Observed that it was hanging. Hit F12 and when to the Network tab then did a screen shot.