Skip to content

Object for placeholder user is invalid, value 0 for key id is not a string #1967

@e64462

Description

@e64462

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. Enable Activity and Cospend Apps in Nextcloud
  2. Login with a regular user using the Cospend dashboard App
  3. Observe Error in Logs

Expected behaviour

Complete steps 1 and 2 with no errors.

Actual behaviour

Errors appear and the dashboard information fails to load.

Nextcloud Error
{
  "reqId": "redacted_string",
  "level": 3,
  "time": "2025-04-03T23:20:38+00:00",
  "remoteAddr": "xxx.xxx.xxx.xxx",
  "user": "my_user",
  "app": "activity",
  "method": "GET",
  "url": "/ocs/v2.php/apps/activity/api/v2/activity/cospend?format=json&limit=50",
  "message": "Object for placeholder user is invalid, value 0 for key id is not a string",
  "userAgent": "redacted",
  "version": "31.0.2.1",
  "exception": {
    "Exception": "OCP\\RichObjectStrings\\InvalidObjectExeption",
    "Message": "Object for placeholder user is invalid, value 0 for key id is not a string",
    "Code": 0,
    "Trace": [
      {
        "file": "/path/to/nextcloud/lib/private/RichObjectStrings/Validator.php",
        "line": 59,
        "function": "validateParameter",
        "class": "OC\\RichObjectStrings\\Validator",
        "type": "->"
      },
      {
        "file": "/path/to/nextcloud/apps/activity/lib/GroupHelper.php",
        "line": 75,
        "function": "validate",
        "class": "OC\\RichObjectStrings\\Validator",
        "type": "->"
      },
      {
        "file": "/path/to/nextcloud/apps/activity/lib/GroupHelper.php",
        "line": 47,
        "function": "addEvent",
        "class": "OCA\\Activity\\GroupHelper",
        "type": "->"
      },
      {
        "file": "/path/to/nextcloud/apps/activity/lib/Data.php",
        "line": 232,
        "function": "addActivity",
        "class": "OCA\\Activity\\GroupHelper",
        "type": "->"
      },
      {
        "file": "/path/to/nextcloud/apps/activity/lib/Controller/APIv2Controller.php",
        "line": 190,
        "function": "get",
        "class": "OCA\\Activity\\Data",
        "type": "->"
      },
      {
        "file": "/path/to/nextcloud/apps/activity/lib/Controller/APIv2Controller.php",
        "line": 137,
        "function": "get",
        "class": "OCA\\Activity\\Controller\\APIv2Controller",
        "type": "->"
      },
      {
        "file": "/path/to/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 200,
        "function": "getFilter",
        "class": "OCA\\Activity\\Controller\\APIv2Controller",
        "type": "->"
      },
      {
        "file": "/path/to/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 114,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/path/to/nextcloud/lib/private/AppFramework/App.php",
        "line": 161,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/path/to/nextcloud/lib/private/Route/Router.php",
        "line": 307,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::"
      },
      {
        "file": "/path/to/nextcloud/ocs/v1.php",
        "line": 49,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->"
      },
      {
        "file": "/path/to/nextcloud/ocs/v2.php",
        "line": 7,
        "args": [
          "/path/to/nextcloud/ocs/v1.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/path/to/nextcloud/lib/private/RichObjectStrings/Validator.php",
    "Line": 85,
    "message": "Object for placeholder user is invalid, value 0 for key id is not a string",
    "exception": [],
    "CustomMessage": "Object for placeholder user is invalid, value 0 for key id is not a string"
  },
  "id": "67ef198679866"
}

Additional information

While the Activity app generates the error, only the Cospend App has trouble displaying activity on the regular user's dashboard.

Server configuration

Web server: Nginx

Database: MySQL

PHP version: 8.4.5

Nextcloud version: 31.0.2

List of activated apps
Enabled:
  - activity: 4.0.0
  - app_api: 5.0.2
  - bruteforcesettings: 4.0.0
  - calendar: 5.2.0
  - cloud_federation_api: 1.14.0
  - comments: 1.21.0
  - contactsinteraction: 1.12.0
  - cospend: 3.0.11
  - dashboard: 7.11.0
  - dav: 1.33.0
  - federatedfilesharing: 1.21.0
  - files: 2.3.1
  - 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
  - logreader: 4.0.0
  - lookup_server_connector: 1.19.0
  - notifications: 4.0.0
  - oauth2: 1.19.1
  - photos: 4.0.0-dev.1
  - profile: 1.0.0
  - provisioning_api: 1.21.0
  - recommendations: 4.0.0
  - related_resources: 2.0.0
  - richdocuments: 8.6.4
  - settings: 1.14.0
  - sharebymail: 1.21.0
  - theming: 2.6.1
  - twofactor_backupcodes: 1.20.0
  - updatenotification: 1.21.0
  - user_oidc: 7.1.0
  - user_status: 1.11.0
  - viewer: 4.0.0
  - weather_status: 1.11.0
  - webhook_listeners: 1.2.0
  - workflowengine: 2.13.0
Disabled:
  - admin_audit: 1.21.0
  - circles: 31.0.0 (installed 29.0.0-dev)
  - encryption: 2.19.0
  - federation: 1.21.0 (installed 1.19.0)
  - files_downloadlimit: 4.0.0 (installed 2.0.0)
  - files_external: 1.23.0
  - firstrunwizard: 4.0.0 (installed 2.18.0)
  - nextcloud_announcements: 3.0.0 (installed 1.18.0)
  - password_policy: 3.0.0 (installed 1.19.0)
  - privacy: 3.0.0 (installed 1.13.0)
  - serverinfo: 3.0.0 (installed 1.19.0)
  - support: 3.0.0 (installed 1.12.0)
  - survey_client: 3.0.0 (installed 1.17.0)
  - suspicious_login: 9.0.1
  - systemtags: 1.21.1 (installed 1.19.0)
  - text: 5.0.0 (installed 3.10.1)
  - twofactor_nextcloud_notification: 5.0.0
  - twofactor_totp: 13.0.0-dev.0
  - user_ldap: 1.22.0
Nextcloud configuration
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "nextcloud.example.com"
        ],
        "overwritehost": "example.com",
        "overwritecondaddr": "^127\\.0\\.0\\.1:8789%",
        "overwrite.cli.url": "https:\/\/nextcloud.example.com",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "31.0.2.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "allow_local_remote_servers": true,
        "maintenance_window_start": 1,
        "default_phone_region": "en",
        "user_oidc": {
            "use_pkce": true,
            "enable_default_claims": false
        },
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0,
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "loglevel": 0,
        "maintenance": false,
        "theme": "",
        "mail_smtpsecure": "ssl",
        "mail_smtpauth": true,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "app_install_overwrite": []
    }
}

Browser

Browser name: Firefox

Browser version: 137.0 (64-bit)

Operating system: Windows 10

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