Skip to content

[Bug]: NC31.0.0 not logging view/download activity #51097

@jl-678

Description

@jl-678

⚠️ This issue respects the following points: ⚠️

Bug description

I have been using NC for a long time and just upgraded to 31. I can create public shares with no issues, but I no longer see public share views and downloads listed under activity. It shows the share being created and deleted but nothing related to views/downloads. I checked the "oc_activity" table, and the rows in that table match what I am seeing.

I shared a document on 2/22, and it showed as downloaded in activity and the oc_activity table. This was before I upgraded. The share is still active and accessible since upgrading, but now, when I perform the same activity (e.g., access the file via the share link), views/downloads no longer appear in oc_activity or in the activity stream.

In case it matters, when I upgraded, I got all kinds of “incorrect row format found in your database” errors. It is described in this post. I used that script and manually updated every row and the errors are gone. I have no idea if that matters, but I wanted to share.

I also found this GitHub issue, which looks similar. However, it is for a different version, and it suggests that activity is still logged when files are downloaded rather than viewed. For me, activity is never logged other than "share" and "unshare."

This is new behavior as it worked previously, as shown from the example from 2/22. As an aside, I also posted about this in the NC forum.

Steps to reproduce

  1. Share a file and copy the link
  2. Open Incognito window
  3. Paste the link and view the file
  4. View the activity screen in NC or query all records in oc_activity

Expected behavior

Views and downloads should appear in the activity stream as in the past.

Nextcloud Server version

31

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.3

Web server

Apache (supported)

Database engine version

MariaDB

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

Upgraded to a MAJOR version (ex. 31 to 32)

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

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "overwritecondaddr": "<IP>",
        "trusted_domains": {
            "1": "<FQDN>",
            "2": "<FQDN>",
            "3": "<IP>",
            "4": "<IP>"
        },
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "<FQDN>",
        "dbtype": "mysql",
        "version": "31.0.0.18",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "mail_smtpmode": "smtp",
        "loglevel": 2,
        "default_phone_region": "US",
        "maintenance": false,
        "htaccess.RewriteBase": "\/",
        "theme": "",
        "mail_smtpauthtype": "LOGIN",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "updater.release.channel": "stable",
        "twofactor_enforced": "false",
        "twofactor_enforced_groups": [],
        "twofactor_enforced_excluded_groups": [],
        "mail_sendmailmode": "smtp",
        "mysql.utf8mb4": true,
        "maintenance_window_start": 6
    }
}

List of activated Apps

Enabled:
  - activity: 4.0.0
  - app_api: 5.0.2
  - bruteforcesettings: 4.0.0
  - circles: 31.0.0-dev.0
  - cloud_federation_api: 1.14.0
  - comments: 1.21.0
  - contactsinteraction: 1.12.0
  - dashboard: 7.11.0
  - dav: 1.33.0
  - federatedfilesharing: 1.21.0
  - federation: 1.21.0
  - files: 2.3.1
  - files_downloadlimit: 4.0.0
  - files_pdfviewer: 4.0.0
  - files_reminders: 1.4.0
  - files_sharing: 1.23.1
  - files_trashbin: 1.21.0
  - files_versions: 1.24.0
  - firstrunwizard: 4.0.0
  - logreader: 4.0.0
  - lookup_server_connector: 1.19.0
  - nextcloud_announcements: 3.0.0
  - notifications: 4.0.0
  - oauth2: 1.19.1
  - password_policy: 3.0.0
  - photos: 4.0.0-dev.1
  - 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
  - survey_client: 3.0.0
  - suspicious_login: 9.0.1
  - text: 5.0.0
  - theming: 2.6.1
  - twofactor_backupcodes: 1.20.0
  - twofactor_totp: 13.0.0-dev.0
  - updatenotification: 1.21.0
  - viewer: 4.0.0
  - weather_status: 1.11.0
  - webhook_listeners: 1.2.0
  - workflowengine: 2.13.0

Nextcloud Signing status

No errors have been found

Nextcloud Logs

{"reqId":"iqYqZ3QZsXElkuqMc852","level":3,"time":"2025-02-26T20:30:01+00:00","remoteAddr":"162.158.6.61","user":false,"app":"no app in context","method":"GET","url":"/.well-known/","message":"Could not decrypt or decode encrypted session data","userAgent":"--","version":"31.0.0.18","exception":{"Exception":"Exception","Message":"HMAC does not match.","Code":0,"Trace":[{"file":"/var/www/html/owncloud/lib/private/Security/Crypto.php","line":98,"function":"decryptWithoutSecret","class":"OC\\Security\\Crypto","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/owncloud/lib/private/Session/CryptoSessionData.php","line":70,"function":"decrypt","class":"OC\\Security\\Crypto","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/owncloud/lib/private/Session/CryptoSessionData.php","line":47,"function":"initializeSession","class":"OC\\Session\\CryptoSessionData","type":"->"},{"file":"/var/www/html/owncloud/lib/private/Session/CryptoWrapper.php","line":94,"function":"__construct","class":"OC\\Session\\CryptoSessionData","type":"->"},{"file":"/var/www/html/owncloud/lib/base.php","line":410,"function":"wrapSession","class":"OC\\Session\\CryptoWrapper","type":"->"},{"file":"/var/www/html/owncloud/lib/base.php","line":679,"function":"initSession","class":"OC","type":"::"},{"file":"/var/www/html/owncloud/lib/base.php","line":1149,"function":"init","class":"OC","type":"::"},{"file":"/var/www/html/owncloud/index.php","line":22,"args":["/var/www/html/owncloud/lib/base.php"],"function":"require_once"}],"File":"/var/www/html/owncloud/lib/private/Security/Crypto.php","Line":162,"message":"Could not decrypt or decode encrypted session data","exception":[],"CustomMessage":"Could not decrypt or decode encrypted session data"},"id":"67bf94c8beee9"}

Additional info

I don't think that the log is relevant, and I wanted to share it even so. The line has been repeated once.

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