Skip to content

Usage Report without a user specified does return wrong values #492

@gnaex

Description

@gnaex

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Run once without a user specified, once with a user specified
  2. php /var/www/html/occ usage-report:generate | grep test.user
  3. php /var/www/html/occ usage-report:generate [email protected]

Expected behaviour

The report without a user specified should return the correct values too

Actual behaviour

When I do not supply a user id it returns wrong values. All close to 0.

php /var/www/html/occ usage-report:generate  | grep test.user
"[email protected]","2025-09-29T08:49:24+00:00",-2,0,3,1,10,15

But if fact the user has over 5 GB, visible when I explicitly aks for a report for this user:

php /var/www/html/occ usage-report:generate [email protected]          
"[email protected]","2025-09-29T08:53:17+00:00",-2,5368709131,15,1,10,15

It happens with all accounts, not just this one

Server configuration

Web server: Nginx

Database: PostgreSQL

PHP version: 8.3.25

Nextcloud version: 31.0.9

List of activated apps
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder

Enabled:
  - activity: 4.0.0
  - admin_audit: 1.21.0
  - announcementcenter: 7.2.1
  - app_api: 5.0.2
  - bruteforcesettings: 4.0.0
  - checksum: 1.2.6
  - circles: 31.0.0
  - cloud_federation_api: 1.14.0
  - comments: 1.21.0
  - contactsinteraction: 1.12.0
  - dav: 1.33.0
  - drawio: 3.1.0
  - encryption: 2.19.0
  - external: 6.0.2
  - federatedfilesharing: 1.21.0
  - files: 2.3.1
  - files_antivirus: 6.0.5
  - files_automatedtagging: 2.0.0
  - files_downloadlimit: 4.0.0
  - files_mindmap: 0.0.33
  - files_pdfviewer: 4.0.0
  - files_reminders: 1.4.0
  - files_retention: 2.0.1
  - files_sharing: 1.23.1
  - files_trashbin: 1.21.0
  - files_versions: 1.24.0
  - firstrunwizard: 4.0.0
  - groupfolders: 19.1.5
  - logreader: 4.0.0
  - lookup_server_connector: 1.19.0
  - metadata: 0.22.0
  - nextcloud_announcements: 3.0.0
  - notifications: 4.0.0
  - oauth2: 1.19.1
  - password_policy: 3.0.0
  - photos: 4.0.0
  - privacy: 3.0.0
  - profile: 1.0.0
  - provisioning_api: 1.21.0
  - recommendations: 4.0.0
  - related_resources: 2.0.0
  - serverinfo: 3.0.0
  - settings: 1.14.0
  - sharebymail: 1.21.0
  - support: 3.0.0
  - survey_client: 3.0.0
  - systemtags: 1.21.1
  - terms_of_service: 4.6.0
  - text: 5.0.0
  - theming: 2.6.1
  - theming_customcss: 1.18.0
  - twofactor_backupcodes: 1.20.0
  - updatenotification: 1.21.0
  - user_oidc: 8.0.0
  - user_status: 1.11.0
  - user_usage_report: 2.0.0
  - viewer: 4.0.0
  - webhook_listeners: 1.2.0
  - workflowengine: 2.13.0
Disabled:
  - dashboard: 7.11.0 (installed 7.11.0)
  - federation: 1.21.0 (installed 1.21.0)
  - files_external: 1.23.0 (installed 1.23.0)
  - geoblocker: 0.5.18 (installed 0.5.18)
  - suspicious_login: 9.0.1
  - twofactor_nextcloud_notification: 5.0.0
  - twofactor_totp: 13.0.0-dev.0
  - user_ldap: 1.22.0
  - weather_status: 1.11.0 (installed 1.11.0)

Nextcloud configuration
If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder

php occ config:list system
{
    "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
            }
        ],
        "logfile": "\/var\/www\/html\/log\/nextcloud.log",
        "connectivity_check_domains": [
            "https:\/\/nextcloud.com"
        ],
        "default_phone_region": "ch",
        "auth.webauthn.enabled": false,
        "enable_previews": true,
        "enabledPreviewProviders": [
            "OC\\Preview\\Movie",
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\MP3",
            "OC\\Preview\\MP4",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\PDF"
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "forwarded_for_headers": [
            "HTTP_X_FORWARDED_FOR"
        ],
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "overwriteprotocol": "https",
        "mail_smtpmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "mail_smtpauthtype": "LOGIN",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "upgrade.disable-web": true,
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "<removed by purpose>.ch"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "31.0.9.1",
        "overwrite.cli.url": "https:\/\/localhost",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "proxy=": "",
        "loglevel": "2",
        "tempdirectory": "\/var\/www\/tmp",
        "allow_local_remote_servers": true,
        "mail_sendmailmode": "smtp",
        "skeletondirectory": "",
        "oidc_login_required_group": "permitted-users",
        "mail_smtpsecure": "tls",
        "mail_smtpauth": false,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "proxy": "http:\/\/<removed by purpose>h:8080",
        "proxyexclude": [
            "localhost",
            "127.0.0.1",
            "kubernetes.default.svc",
            ".svc.cluster.local"
        ],
        "updater.release.channel": "stable",
        "logfile_audit": "\/var\/www\/html\/log\/audit.log",
        "log_type_audit": "file",
        "app_install_overwrite": []
    }
}

Browser

Is not relevant here

Browser name: Chrome

Browser version: Latest

Operating system: Ubuntu

Browser log
Insert your browser log here, this could for example include:
a) The javascript console log
b) The network log
c) ...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions