server icon indicating copy to clipboard operation
server copied to clipboard

[Bug]: Spam of jQuery deprecation warnings in developers console

Open chris-der-kleine opened this issue 3 years ago • 19 comments

⚠️ This issue respects the following points: ⚠️

  • [X] This is a bug, not a question or a configuration/webserver/proxy issue.
  • [X] This issue is not already reported on Github (I've searched it).
  • [X] Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • [X] I agree to follow Nextcloud's Code of Conduct.

Bug description

The following warnings are thrown every few seconds up to multiple time per second into my dev console in Firefox:

$ is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own. 2 [globals.js:62:15](webpack:///core/src/globals.js)
OC.Util.relativeModifiedDate is deprecated and will be removed in Nextcloud 21. See @nextcloud/moment [util.js:135:11](webpack:///core/src/OC/util.js)

So far I couldn't find this mentioned in an issue.

Steps to reproduce

  1. Visit your Nextcloud Installation (https://cloud.example.com)
  2. Press F12
  3. Enter Tab "Console" if not already selected by your browser

Expected behavior

Only a handfull of warnings. (Rate < 1msg / 5secs)

Installation method

Official Docker image

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.0

Web server

Nginx

Database engine version

MySQL

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

No response

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

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

Configuration report

{
    "system": {
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***",
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "23.0.0.10",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "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",
        "overwriteprotocol": "https",
        "default_phone_region": "DE",
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpsecure": "ssl",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "loglevel": 2,
        "theme": "",
        "app_install_overwrite": [
            "passman"
        ]
    }
}

List of activated Apps

Enabled:
  - accessibility: 1.9.0
  - activity: 2.15.0
  - checksum: 1.1.3
  - cloud_federation_api: 1.6.0
  - comments: 1.13.0
  - dav: 1.21.0
  - external: 3.10.2
  - federatedfilesharing: 1.13.0
  - files: 1.18.0
  - files_accesscontrol: 1.13.0
  - files_downloadactivity: 1.12.0
  - files_pdfviewer: 2.4.0
  - files_retention: 1.12.0
  - files_rightclick: 1.2.0
  - files_sharing: 1.15.0
  - files_trashbin: 1.13.0
  - files_versions: 1.16.0
  - files_videoplayer: 1.12.0
  - forms: 2.4.0
  - groupfolders: 11.1.2
  - logreader: 2.8.0
  - lookup_server_connector: 1.11.0
  - metadata: 0.15.0
  - notifications: 2.11.1
  - oauth2: 1.11.0
  - onlyoffice: 7.3.2
  - password_policy: 1.13.0
  - photos: 1.5.0
  - provisioning_api: 1.13.0
  - serverinfo: 1.13.0
  - settings: 1.5.0
  - sharebymail: 1.13.0
  - sociallogin: 4.14.0
  - systemtags: 1.13.0
  - text: 3.4.0
  - theming: 1.14.0
  - theming_customcss: 1.10.0
  - twofactor_backupcodes: 1.12.0
  - twofactor_nextcloud_notification: 3.3.1
  - twofactor_totp: 6.2.0
  - twofactor_u2f: 6.3.0
  - updatenotification: 1.13.0
  - user_ldap: 1.13.0
  - user_usage_report: 1.7.0
  - viewer: 1.7.0
  - weather_status: 1.3.0
  - workflow_script: 1.8.0
  - workflowengine: 2.5.0
Disabled:
  - admin_audit
  - apporder
  - bruteforcesettings
  - circles
  - contactsinteraction
  - dashboard
  - encryption
  - federation
  - files_antivirus
  - files_external
  - firstrunwizard
  - fulltextsearch
  - group_everyone
  - integration_google
  - integration_jira
  - nextcloud_announcements
  - passman
  - privacy
  - recommendations
  - support
  - survey_client
  - twofactor_gateway
  - user_status

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

No response

Additional info

Also had same problem on a System with 23.0.3

chris-der-kleine avatar Mar 30 '22 17:03 chris-der-kleine

I have this problem since I installed, every version has it as far as my own copy goes; I've seen it mentioned years before but no solution that I have been able to find.

Aonodensetsu avatar May 30 '22 19:05 Aonodensetsu

Same here!

SKB-CGN avatar Jul 20 '22 08:07 SKB-CGN

Additionally, this is something I saw when deploying the official docker image without modifications:

moment is deprecated: please ship your own, this will be removed in Nextcloud 20

Interesting then that it's still appearing in Hub 3 (NC 25).

throny avatar Oct 27 '22 18:10 throny

same for me!

davkar3n avatar Nov 02 '22 20:11 davkar3n

At least the deprecation warnings should be removed. There are hundereds of them in the console, which not only makes Nextcloud look very unprofessional, but also they are simply wrong: "this will be removed in Nextcloud 20" did not happen, since the warning is still there in Nextcloud 25.

The deprecated modules should either really be removed (might possibly break a lot of things) or the warning should be removed.

deprecation-warnings

nicokaiser avatar Nov 03 '22 19:11 nicokaiser

A workaround I've done on my install to make things not suck so hard:

Search for, in dist/core-main.js, the following function:

function(){void 0===window.TESTING&&console.warn.apply(console,arguments)}

Replace that function with this empty function:

function(){}

Performance is noticeably improved by not getting hundreds or thousands of jQuery deprecation warnings when using News.

Is that the right way to fix it? No. Is it effective? Seems so.

bhtooefr avatar Jan 22 '23 22:01 bhtooefr

Hi, please update to 24.0.9 or better 25.0.3 and report back if it fixes the issue. Thank you!

My goal is to add a label like e.g. 25-feedback to this ticket of an up-to-date major Nextcloud version where the bug could be reproduced. However this is not going to work without your help. So thanks for all your effort!

If you don't manage to reproduce the issue in time and the issue gets closed but you can reproduce the issue afterwards, feel free to create a new bug report with up-to-date information by following this link: https://github.com/nextcloud/server/issues/new?assignees=&labels=bug%2C0.+Needs+triage&template=BUG_REPORT.yml&title=%5BBug%5D%3A+

szaimen avatar Jan 23 '23 13:01 szaimen

To be clear, my install had the issue on 25.0.3.

bhtooefr avatar Jan 23 '23 14:01 bhtooefr

Okay, thanks!

szaimen avatar Jan 23 '23 14:01 szaimen

On my site also with 25.0.3 many JQuery Warning Logs.

SKB-CGN avatar Jan 23 '23 14:01 SKB-CGN

Same problem with 25.0.3 using Docker nextcloud:latest on x64.

rickycraft avatar Jan 23 '23 21:01 rickycraft

Same here with NC 25.0.3 on 4 different installations.

pnurs avatar Feb 01 '23 10:02 pnurs

Same here with NC 25.0.3

sergeng avatar Feb 02 '23 17:02 sergeng

same here with both NC 25.0.3 and 25.0.4

gonzalo avatar Mar 01 '23 12:03 gonzalo

Yep! It's still here in NC 26. It is going to be before year 2099 when this will is fixed? Just curious.

assen-totin avatar May 20 '23 20:05 assen-totin

the milestone has been moved again to NC28 so i guess about that much time if not more

Aonodensetsu avatar May 21 '23 07:05 Aonodensetsu

The actual issue is "the deprecation warnings should be removed because nothing ever gets deprecated any time soon". Nextcloud development is focused on cramming new features into the old code base, instead of cleaning up and refactoring…

nicokaiser avatar May 21 '23 07:05 nicokaiser

Literally, I think it might be best to just implement my suggested workaround (the function is slightly different in 26) as a temporary thing, before things actually get fixed.

Nextcloud's front end, especially in News, is literally unusable due to the massive CPU load, even on reasonably fast platforms (Ryzen 7 5800X, Apple M2) on a Chromium-based browser (Vivaldi), because of the deprecation warning spam, unless I manually go in and make that function do nothing every single time there's a Nextcloud update (I'm using FreeBSD's package).

bhtooefr avatar May 21 '23 10:05 bhtooefr

CAN YOU ACTUALLY FIX THIS BUG? This problem is basically spamming the shit out of any browser's console. Just update the fking jquery version or remove the function that keeps on spamming these USELESS warnings.

kboykov avatar Jun 16 '23 11:06 kboykov

Done with https://github.com/nextcloud/server/pull/38852

szaimen avatar Jun 24 '23 15:06 szaimen

@szaimen I don't really understand where the fix will be merged. Will be available for the 26 version of nextcloud server or just the 27?

gonzalo avatar Jun 30 '23 09:06 gonzalo

27.0.1

szaimen avatar Jul 10 '23 13:07 szaimen

tks for the update. Will it be possible to have also in 26? We just moved to 26 and will keep there still for months

gonzalo avatar Jul 10 '23 14:07 gonzalo