nextcloud / quota_warning

❗💾 This app sends notifications to users when they reached 85, 90 and 95% of their quota.
https://apps.nextcloud.com/apps/quota_warning
GNU Affero General Public License v3.0
17 stars 12 forks source link

quota warning sending weird and inaccurate notifications #142

Closed tessus closed 2 days ago

tessus commented 1 year ago

Steps to reproduce

  1. install quota warning 1.15.0 on nc 24.0.10
  2. set it up like this image

Expected behaviour

I expected that the first field is ignored and only 2 notifications are used.

Actual behaviour

One day later, I get the following email even though my user has no quota at all:

image

Thus it seems there are 3 issues:

Server configuration

Operating system: Linux

Web server: Apache 2.4.55

Database: mysql 8.0.32

PHP version: 8.1.16

Nextcloud version: 24.0.10

Where did you install Nextcloud from: a tar.gz file and then via updater.phar

List of activated apps:

Enabled:
  - accessibility: 1.10.0
  - activity: 2.16.0
  - admin_audit: 1.14.0
  - announcementcenter: 6.3.1
  - appointments: 1.14.11
  - apporder: 0.15.0
  - bookmarks: 11.0.4
  - bruteforcesettings: 2.4.0
  - calendar: 3.5.5
  - circles: 24.0.1
  - cloud_federation_api: 1.7.0
  - comments: 1.14.0
  - contacts: 4.2.5
  - contactsinteraction: 1.5.0
  - dav: 1.22.0
  - federatedfilesharing: 1.14.0
  - federation: 1.14.0
  - files: 1.19.0
  - files_external: 1.16.1
  - files_pdfviewer: 2.5.0
  - files_rightclick: 1.3.0
  - files_sharing: 1.16.2
  - files_trashbin: 1.14.0
  - files_versions: 1.17.0
  - files_videoplayer: 1.13.0
  - firstrunwizard: 2.13.0
  - logreader: 2.9.0
  - lookup_server_connector: 1.12.0
  - nextcloud_announcements: 1.13.0
  - notes: 4.5.1
  - notifications: 2.12.1
  - notify_push: 0.6.0
  - oauth2: 1.12.0
  - password_policy: 1.14.0
  - phonetrack: 0.7.4
  - photos: 1.6.0
  - polls: 3.8.4
  - privacy: 1.8.0
  - provisioning_api: 1.14.0
  - quota_warning: 1.15.0
  - serverinfo: 1.14.0
  - settings: 1.6.0
  - sharebymail: 1.14.0
  - systemtags: 1.14.0
  - tasks: 0.14.5
  - text: 3.5.1
  - theming: 1.15.0
  - twofactor_backupcodes: 1.13.0
  - twofactor_totp: 6.4.1
  - twofactor_webauthn: 0.3.3
  - updatenotification: 1.14.0
  - viewer: 1.8.0
  - weather_status: 1.4.0
  - workflowengine: 2.6.0
Disabled:
  - activitylog: 0.0.2
  - dashboard: 7.0.0
  - encryption
  - files_markdown: 2.3.6
  - impersonate: 1.11.0
  - recommendations: 0.5.0
  - support: 1.4.0
  - survey_client: 0.1.5
  - user_ldap
  - user_status: 1.0.1

Nextcloud configuration:

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "24.0.10.1",
        "installed": true,
        "forcessl": true,
        "loglevel": 0,
        "maintenance": false,
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***"
        ],
        "share_folder": "\/Shared",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logdateformat": "Y-m-d H:i:s O",
        "logtimezone": "Europe\/Vienna",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "sendmail",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "ssl",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "filelocking.enabled": true,
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0
        },
        "appstore.experimental.enabled": true,
        "trashbin_retention_obligation": "auto",
        "updater.release.channel": "stable",
        "htaccess.RewriteBase": "\/",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "auth.bruteforce.protection.enabled": false,
        "simpleSignUpLink.shown": false,
        "upgrade.disable-web": true,
        "theme": "evermeet",
        "mail_smtpauthtype": "PLAIN",
        "mail_smtpauth": 1,
        "mail_sendmailmode": "smtp",
        "filesystem_check_changes": 0,
        "mysql.utf8mb4": true,
        "connectivity_check_domains": [
            "***REMOVED SENSITIVE VALUE***"
        ],
        "default_phone_region": "CA",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***"
    }
}

Client configuration

Browser: Firefox, Chrome, Safari

Operating system: macOS

Logs

Nextcloud log (data/nextcloud.log)

No entries.

Browser log

No errors.

nickvergessen commented 1 year ago

One day later, I get the following email even though my user has no quota at all

This app only acts when the user has at least 5 MB of quota. So not sure if the email you got is actually from this app.

tessus commented 1 year ago

Well, it was definitely from this app. I only got this email 1 day after I installed it. I never had any similar mail before.

And, I do not have a quota set for my user at all.

As I mentioned, it seemd there was an edge case in the internal tests.

I never should have received an email, but also my users did and they have all a quota of 5 GB and none of them were even close to 80% usage.

So the empty value tripped up the app somehow.

After this weird experience I set it to:

image

and it seems to work since then. No weird emails anymore.

tessus commented 1 year ago

The documentation should probably explain how to only set 1 or 2 quotas:

Leaving the first notification empty did clearly not work.

ThaDaVos commented 2 months ago

Same issue here - for me it's even sending notifications to people that they reached like 80% while not even being on 10% of their quota - currently disabled the app as it's causing a lot of confusion because of this

ThaDaVos commented 2 months ago

Apperently mine is related to: https://github.com/nextcloud/quota_warning/issues/35

nickvergessen commented 2 days ago

Closing as it seems to be working now for tessus and #35 is still open for disk