server icon indicating copy to clipboard operation
server copied to clipboard

[Bug]: Uncaught (in promise) TypeError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': String contains non ISO-8859-1 code point.

Open Doublefire-Chen opened this issue 2 years ago • 7 comments

⚠️ This issue respects the following points: ⚠️

Bug description

The problem arises when I attempt to upload large files (exceeding 100MB) with Chinese filenames via the web page. The upload process gets stuck at “estimating time left.” Then I check the console via F12. Screenshot 2023-12-16 at 11 46 59 Surprisingly, if I change the file name to English, the upload proceeds smoothly. Additionally, I’ve also observed that small files (less than 1MB) with Chinese names, including those renamed to match the problematic larger files, succeed to upload. It seems that the issue is specifically related to the upload of large files with Chinese filenames.

Steps to reproduce

  1. Followed the official instructions using Apache2 and MariaDB.(manual installation with Archive file)
  2. Upload large files (exceeding 100MB) with Chinese filenames via the web page.

Expected behavior

The large file with Chinese filename can be uploaded successfully.

Installation method

Community Manual installation with Archive

Nextcloud Server version

28

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.1

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • [X] Default user-backend (database)
  • [ ] LDAP/ Active Directory
  • [ ] SSO - SAML
  • [ ] Other

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "disk.aka.cy"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "28.0.0.11",
        "overwrite.cli.url": "https:\/\/disk.aka.cy",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "default_phone_region": "CN",
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_sendmailmode": "smtp",
        "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***",
        "maintenance": false
    }
}

List of activated Apps

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_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.0
  - 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
  - files_external: 1.20.0
  - suspicious_login: 6.0.0
  - twofactor_totp: 10.0.0-beta.2
  - user_ldap: 1.19.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

No response

Additional info

No response

Doublefire-Chen avatar Dec 16 '23 04:12 Doublefire-Chen

Upload large file whose name is in Chinese using WabDAV is fine. So this is my temporary solution.

Doublefire-Chen avatar Dec 16 '23 09:12 Doublefire-Chen

version 28.0.0 has the same problem, with non-English file names and a size of more than 10mb

suiduid avatar Dec 19 '23 10:12 suiduid

@AndyScherzinger @sorbaugh

kesselb avatar Dec 19 '23 13:12 kesselb

got same issue now on 28.0.0 =\ any solutions?

some more errors here: image

DreamShaded avatar Dec 20 '23 12:12 DreamShaded

I've this issue too on NC 28

romale avatar Dec 21 '23 09:12 romale

Fixed by

  • https://github.com/nextcloud/server/pull/42281
  • https://github.com/nextcloud-libraries/nextcloud-upload/pull/996

ShGKme avatar Dec 21 '23 16:12 ShGKme

Thank you all developers and contributors, after upgrading to 28.0.1, this issue solved. Now I can upload large file with Chinese filename successfully.

Doublefire-Chen avatar Dec 22 '23 09:12 Doublefire-Chen