Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Deprecation warnings in production #34960

Closed
6 of 9 tasks
nicokaiser opened this issue Nov 3, 2022 · 3 comments
Closed
6 of 9 tasks

[Bug]: Deprecation warnings in production #34960

nicokaiser opened this issue Nov 3, 2022 · 3 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap technical debt

Comments

@nicokaiser
Copy link
Contributor

⚠️ This issue respects the following points: ⚠️

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

Bug description

In Nextcloud 25, there are hundereds to thousands of deprecation warnings in the console. It seems like they are created by the setDeprecatedProp function in core/src/globals.js and only be displayed when window.TESTING is not set.

I really do not understand why there is a need of this volley of warnings in the console in production mode.

  1. These deprecation warnings are meant for developers. Users/admins cannot do anything about them, so they should not be displayed in regular installation (maybe even only when window.TESTING is set!)
  2. Some of the deprecation warnings are simply wrong. "Handlebars is deprecated: please ship your own, this will be removed in Nextcloud 20" is being displayed in Nextcloud 25, so seemingly Handlebars was not removed in version 20.
  3. Since global methods are wrapped, the warnings are displayed every time this methods is being accessed. I did not measure this, but I could imagine that hundereds of console.warn messages do affect the performance.
  4. Flooding the console with warnings does not make Nextcloud look very polished and stable although these are "only" deprecation warnings for future versions.

For performance and cleanness sake, the warnIfNotTesting method should also be shut up when used in production (or even be changed to warnOnlyIfTesting – but since I am not into the Nextcloud development process, I cannot comment on this).

This might be seen as duplicate for #31763, but that issue only deals with jQuery.

Steps to reproduce

  1. Open Nextcloud
  2. Look at the browser console

Expected behavior

I'd expect only severe warnings and errors being displayed in the browser console. Instead, the console is flooded with deprecation warnings I cannot do anything about.

Installation method

Community Docker image

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?

Encryption is Disabled

What user-backends are you using?

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

Configuration report

No response

List of activated Apps

Enabled:
  - activity: 2.17.0
  - admin_audit: 1.15.0
  - calendar: 4.1.0
  - cloud_federation_api: 1.8.0
  - contacts: 5.0.1
  - dashboard: 7.5.0
  - dav: 1.24.0
  - federatedfilesharing: 1.15.0
  - federation: 1.15.0
  - files: 1.20.1
  - files_rightclick: 1.4.0
  - files_sharing: 1.17.0
  - files_trashbin: 1.15.0
  - files_versions: 1.18.0
  - firstrunwizard: 2.14.0
  - logreader: 2.10.0
  - lookup_server_connector: 1.13.0
  - notes: 4.6.0
  - notifications: 2.13.1
  - notify_push: 0.5.0
  - oauth2: 1.13.0
  - password_policy: 1.15.0
  - photos: 2.0.0
  - previewgenerator: 5.1.0
  - privacy: 1.9.0
  - provisioning_api: 1.15.0
  - serverinfo: 1.15.0
  - settings: 1.7.0
  - sharebymail: 1.15.0
  - systemtags: 1.15.0
  - tasks: 0.14.5
  - text: 3.6.0
  - theming: 2.0.1
  - twofactor_backupcodes: 1.14.0
  - twofactor_totp: 7.0.0
  - updatenotification: 1.15.0
  - viewer: 1.9.0
  - workflowengine: 2.7.0
Disabled:
  - bruteforcesettings: 2.1.0
  - circles: 25.0.0
  - comments: 1.15.0
  - contactsinteraction: 1.2.0
  - encryption: 2.9.0
  - files_external: 0.2.3
  - files_pdfviewer: 1.2.0
  - nextcloud_announcements: 1.14.0
  - recommendations: 0.5.0
  - related_resources: 1.0.3
  - support: 1.8.0
  - survey_client: 1.0.0
  - suspicious_login: 3.1.0
  - user_ldap
  - user_status: 1.5.0
  - weather_status: 1.5.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

No response

Additional info

No response

@nicokaiser nicokaiser added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Nov 3, 2022
@nicokaiser
Copy link
Contributor Author

nicokaiser commented Nov 3, 2022

This is only a small fraction of the messages:

deprecation-warnings

@mrtumnus
Copy link

Is there a workaround for this? Some way to clear window.TESTING?

@szaimen
Copy link
Contributor

szaimen commented Jun 24, 2023

Fixed with #38852

@szaimen szaimen closed this as completed Jun 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap technical debt
Projects
None yet
Development

No branches or pull requests

4 participants