Uncaught TypeError: xml is undefined: cannot upload files via browser

Hello,
My owncloud installed on server with docker compose.
My server has 2 IP addresses (actually more than 2, because docker use some network space): external and local.

User from office open URL https://my_domain.name/ (this URL points to local IP address) and trying upload some files. They got this error in browser console

Uncaught TypeError: xml is undefined
    getResponse https://my_domain.name/apps/files/js/file-upload.js?v=e9dc7d1727adb01e0b3fef9f2ec06b5e:411
    fail https://my_domain.name/apps/files/js/file-upload.js?v=e9dc7d1727adb01e0b3fef9f2ec06b5e:1228
    jQuery 8
file-upload.js:411:8

Owncloud apps sync file fine.

User from office open URL https://my_local_IP.name:8080/ (local IP address without SSL) and trying upload some files. No problem and everything works as expected.

Users from Internet open URL https://my_domain.name/ (this URL points to INTERNET IP address) and trying upload some files. No problem and everything works as expected.

{
    "system": {
        "data_directory": "\/mnt\/data\/files",
        "apps_paths": [
            {
                "path": "\/var\/www\/owncloud\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/owncloud\/custom",
                "url": "\/custom",
                "writable": true
            }
        ],
        "dbtype": "mysql",
        "dbhost": "db",
        "dbname": "owncloud",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "trusted_domains": [
            "localhost",
               ],
        "mysql.utf8mb4": true,
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "\/mnt\/data\/files",
        "overwrite.cli.url": "https:***REMOVED SENSITIVE VALUE***",
        "version": "10.4.1.3",
        "logtimezone": "UTC",
        "installed": true,
        "instanceid": "oc2n0iyxbsf8",
        "updatechecker": "false",
        "redis": {
            "host": "redis",
            "port": "6379"
        },
        "filelocking.enabled": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "loglevel": 2,
        "default_language": "en",
        "htaccess.RewriteBase": "\/",
        "maintenance": false,
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "tls",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "upgrade.disable-web": true,
        "log_type": "owncloud",
        "supportedDatabases": [
            "sqlite",
            "mysql",
            "pgsql"
        ],
        "logfile": "\/mnt\/data\/files\/owncloud.log",
        "singleuser": false
    }
}

Why users from office has this strange error and how to fix ?
Also I’m wondering why occ config:list system command shows only localhost in "trusted_domains": section ?
In real file there are also such records:

 "PUBLIC_DNS_NAME",
  "INTERNAL_IP",
  "INTERNAL_DOCKER_IP_OWNCLOUD_CONTAINER",
  "PRIVATE_DNS_CONTAINER_NAME"

To my mind problem appears because my reverse proxy is a part of docker-compose. And owncloud in someway blocked connection coming from local network.

When office user open URL, I see not his “real” INTERNAL_IP, but IP address of nginx (running as reverse proxy in same docker compose). When user come from Internet I see real EXTERNAL_USER_IP.

You probably have some mixed content warnings, please just use the external URL with SSL on the internal network as well.
If you don’t want to route the traffic through the internet first, you could resolve the domain internally and install a reverse proxy container to terminate the SSL connection on the docker host directly.

1 Like