server icon indicating copy to clipboard operation
server copied to clipboard

[Bug]: No notification on comments; activity app reports InvalidObjectExeption Object is invalid, value is not a string

Open DrDBanner opened this issue 1 year ago • 21 comments

⚠️ This issue respects the following points: ⚠️

Bug description

Since the 31.0.0.1 RC1 upgrade from 30.x Branch:

  • I don't get instant notifications in the browser and mobile devices
  • Notifications per mail do get delivered
  • occ push notifications test works fine
  • Log gets filled with errors within activity app
  • I do get push notifications for created calendar events!

Level: Error App: activity

I am unsure if the error is related to the issue. I also truncated the oc_comments, oc_comments_read_markers, oc_activity and oc_activity_mq just to be sure there's no issue.

Steps to reproduce

  1. f.g. Write a comment in a deck card with and without '@' mention; files with '@' mention ;
  2. Realize you don't get a notification
  3. Open log

Expected behavior

Notification in browser and mobile devices work.

Nextcloud Server version

31

Operating system

Other

PHP engine version

PHP 8.2

Web server

Apache (supported)

Database engine version

MySQL

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?

  • [x] 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_domains": [
            "REDACTED"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/cloud.somewhere.de",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "dbtype": "mysql",
        "version": "31.0.1.0",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "maintenance": false,
        "filelocking.enabled": true,
        "theme": "",
        "loglevel": 3,
        "updater.release.channel": "beta",
        "mysql.utf8mb4": true,
        "default_phone_region": "DE",
        "maintenance_window_start": 1,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "versions_retention_obligation": "auto, 128",
        "preview_concurrency_all": 4,
        "preview_concurrency_new": 2,
        "enable_previews": true,
        "enabledPreviewProviders": [
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\Movie",
            "OC\\Preview\\PDF",
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown"
        ],
        "preview_max_x": 1080,
        "preview_max_y": 1920,
        "jpeg_quality": 90,
        "preview_max_filesize_image": 5,
        "preview_max_memory": 256,
        "metadata_max_filesize": 256
    }
}

List of activated Apps

Enabled:
  - activity: 4.0.0
  - app_api: 5.0.2
  - bruteforcesettings: 4.0.0
  - calendar: 5.2.0-rc.1
  - circles: 31.0.0-dev.0
  - cloud_federation_api: 1.14.0
  - comments: 1.21.0
  - contacts: 7.0.3
  - contactsinteraction: 1.12.0
  - dashboard: 7.11.0
  - dav: 1.33.0
  - deck: 1.15.0
  - federatedfilesharing: 1.21.0
  - files: 2.3.1
  - files_bpm: 1.7.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
  - groupfolders: 19.0.3
  - logreader: 4.0.0
  - lookup_server_connector: 1.19.0
  - mail: 4.3.0-rc.1
  - 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
  - support: 3.0.0
  - survey_client: 3.0.0
  - suspicious_login: 9.0.1
  - systemtags: 1.21.1
  - tables: 0.9.0
  - tasks: 0.16.1
  - text: 5.0.0
  - theming: 2.6.1
  - twofactor_backupcodes: 1.20.0
  - updatenotification: 1.21.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
  - drawio: 3.0.3 (installed 3.0.3)
  - encryption: 2.19.0
  - federation: 1.21.0 (installed 1.21.0)
  - files_external: 1.23.0 (installed 1.23.0)
  - twofactor_nextcloud_notification: 5.0.0
  - twofactor_totp: 13.0.0-dev.0
  - user_ldap: 1.22.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

{
  "reqId": "iF1X8d6WrVhIp4EeZRdw",
  "level": 3,
  "time": "2025-03-11T11:28:16+00:00",
  "app": "activity",
  "method": "GET",
  "url": "/ocs/v2.php/apps/activity/api/v2/activity/comments?format=json&previews=true&since=0",
  "message": "Object is invalid, value 240169 is not a string",
  "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Safari/605.1.15",
  "version": "31.0.1.0",
  "exception": {
    "Exception": "OCP\\RichObjectStrings\\InvalidObjectExeption",
    "Message": "Object is invalid, value 240169 is not a string",
    "Code": 0,
    "Trace": [
      {
        "file": "lib/private/RichObjectStrings/Validator.php",
        "line": 59,
        "function": "validateParameter",
        "class": "OC\\RichObjectStrings\\Validator",
        "type": "->"
      },
      {
        "file": "apps/activity/lib/GroupHelper.php",
        "line": 74,
        "function": "validate",
        "class": "OC\\RichObjectStrings\\Validator",
        "type": "->"
      },
      {
        "file": "apps/activity/lib/GroupHelper.php",
        "line": 46,
        "function": "addEvent",
        "class": "OCA\\Activity\\GroupHelper",
        "type": "->"
      },
      {
        "file": "apps/activity/lib/Data.php",
        "line": 231,
        "function": "addActivity",
        "class": "OCA\\Activity\\GroupHelper",
        "type": "->"
      },
      {
        "file": "apps/activity/lib/Controller/APIv2Controller.php",
        "line": 189,
        "function": "get",
        "class": "OCA\\Activity\\Data",
        "type": "->"
      },
      {
        "file": "apps/activity/lib/Controller/APIv2Controller.php",
        "line": 136,
        "function": "get",
        "class": "OCA\\Activity\\Controller\\APIv2Controller",
        "type": "->"
      },
      {
        "file": "lib/private/AppFramework/Http/Dispatcher.php",
        "line": 200,
        "function": "getFilter",
        "class": "OCA\\Activity\\Controller\\APIv2Controller",
        "type": "->"
      },
      {
        "file": "lib/private/AppFramework/Http/Dispatcher.php",
        "line": 114,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "lib/private/AppFramework/App.php",
        "line": 161,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "lib/private/Route/Router.php",
        "line": 307,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::"
      },
      {
        "file": "ocs/v1.php",
        "line": 49,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->"
      },
      {
        "file": "ocs/v2.php",
        "line": 7,
        "args": [
          "ocs/v1.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "lib/private/RichObjectStrings/Validator.php",
    "Line": 85,
    "message": "Object is invalid, value 240169 is not a string",
    "exception": [],
    "CustomMessage": "Object is invalid, value 240169 is not a string"
  },
  "id": "67d15c6973814"
}

Additional info

  • Console throws some 403 on some CSS files from tasks app, when loggin in.

Notifications app output in console after login:

Image

ResizeObserver error is thrown exactly the moment I open a card in the deck:

Image

RangeError: Maximum call stack size exceeded is thrown the moment I click on the notifications bell in the webinterface

Image

DrDBanner avatar Mar 12 '25 10:03 DrDBanner

@DrDBanner Thank you for reporting this! I'm having a hard time to understand this, because I do not understand where the invalid data is coming from. Could you apply the following patch, test again and post the logs? Thanks! patch.txt

provokateurin avatar Mar 12 '25 13:03 provokateurin

Applied like this since no Git environment:

sudo patch -p1 < patch.txt 
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/lib/GroupHelper.php b/lib/GroupHelper.php
|index 0d8921f7..444f7263 100644
|--- a/lib/GroupHelper.php
|+++ b/lib/GroupHelper.php
--------------------------
Patching file lib/GroupHelper.php using Plan A...
Hunk #1 succeeded at 71.
Hmm...  Ignoring the trailing garbage.
done

Console output (came after the patch):

Image

log output:

[PHP] Fehler: Cannot modify header information - headers already sent by (output started at /usr/local/www/apache24/noexec/cloud.somewhere.de/apps/activity/lib/GroupHelper.php:74) at /usr/local/www/apache24/noexec/cloud.somewhere.de/lib/private/AppFramework/Http/Output.php#51
	GET /ocs/v2.php/apps/dashboard/api/v2/widget-items?widgets%5B%5D=activity
	von IP von user um 12.03.2025, 14:57:53

I guess the patch did not do what it should?

DrDBanner avatar Mar 12 '25 14:03 DrDBanner

Eh yes sorry 😬 Depending on where you do it var_dump does the wrong thing. Please revert it!

While I was working on this, I created https://github.com/nextcloud/server/pull/51442 to make future debugging. Could you apply that instead (download from https://patch-diff.githubusercontent.com/raw/nextcloud/server/pull/51442.patch) and post the logs?

provokateurin avatar Mar 12 '25 14:03 provokateurin

no "tests" in path hence the patch fails

DrDBanner avatar Mar 12 '25 15:03 DrDBanner

Ah forgot about that, now this one should really work now™: patch.txt

provokateurin avatar Mar 12 '25 15:03 provokateurin

@provokateurin GM ...

I updated to RC2 and reapplied the patch. Then I disabled deck, just to be sure, because I get a lot of https://github.com/nextcloud/deck/issues/6815 these.

Then I truncated oc_comments, oc_comments_read_markers, oc_activity. Then I created a new folder as admin and created a new textfile within. I shared the folder with my user and added a comment as admin to my user. I did get a notification on all devices instant -ONCE. The DB entry looks normal to me, but I do get this one:

[activity] Fehler: Object for placeholder file is invalid, value 243822 for key id is not a string
	GET /ocs/v2.php/apps/dashboard/api/v2/widget-items?widgets%5B%5D=activity
	von XXXum 13.03.2025, 08:22:17

which lead to a notification mail with

Rich subject or a parameter for "{author} hat {file} kommentiert" is malformed

and this is the full error

{
  "reqId": "CxDjUJdMl1PGfyzgy4RN",
  "level": 3,
  "time": "2025-03-13T07:22:17+00:00",
  "remoteAddr": "77.20.2.109",
  "user": "XXX",
  "app": "activity",
  "method": "GET",
  "url": "/ocs/v2.php/apps/dashboard/api/v2/widget-items?widgets%5B%5D=activity",
  "message": "Object for placeholder file is invalid, value 243822 for key id is not a string",
  "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:129.0) Gecko/20100101 Firefox/129.0",
  "version": "31.0.1.1",
  "exception": {
    "Exception": "OCP\\RichObjectStrings\\InvalidObjectExeption",
    "Message": "Object for placeholder file is invalid, value 243822 for key id is not a string",
    "Code": 0,
    "Trace": [
      {
        "file": "/usr/local/www/apache24/noexec/XXX/lib/private/RichObjectStrings/Validator.php",
        "line": 59,
        "function": "validateParameter",
        "class": "OC\\RichObjectStrings\\Validator",
        "type": "->"
      },
      {
        "file": "/usr/local/www/apache24/noexec/XXX/apps/activity/lib/GroupHelper.php",
        "line": 74,
        "function": "validate",
        "class": "OC\\RichObjectStrings\\Validator",
        "type": "->"
      },
      {
        "file": "/usr/local/www/apache24/noexec/XXX/apps/activity/lib/GroupHelper.php",
        "line": 46,
        "function": "addEvent",
        "class": "OCA\\Activity\\GroupHelper",
        "type": "->"
      },
      {
        "file": "/usr/local/www/apache24/noexec/XXX/apps/activity/lib/Data.php",
        "line": 231,
        "function": "addActivity",
        "class": "OCA\\Activity\\GroupHelper",
        "type": "->"
      },
      {
        "file": "/usr/local/www/apache24/noexec/XXX/apps/activity/lib/Dashboard/ActivityWidget.php",
        "line": 136,
        "function": "get",
        "class": "OCA\\Activity\\Data",
        "type": "->"
      },
      {
        "file": "/usr/local/www/apache24/noexec/XXX/apps/dashboard/lib/Controller/DashboardApiController.php",
        "line": 119,
        "function": "getItemsV2",
        "class": "OCA\\Activity\\Dashboard\\ActivityWidget",
        "type": "->"
      },
      {
        "file": "/usr/local/www/apache24/noexec/XXX/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 200,
        "function": "getWidgetItemsV2",
        "class": "OCA\\Dashboard\\Controller\\DashboardApiController",
        "type": "->"
      },
      {
        "file": "/usr/local/www/apache24/noexec/XXX/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 114,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/usr/local/www/apache24/noexec/XXX/lib/private/AppFramework/App.php",
        "line": 161,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/usr/local/www/apache24/noexec/XXX/lib/private/Route/Router.php",
        "line": 307,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::"
      },
      {
        "file": "/usr/local/www/apache24/noexec/XXX/ocs/v1.php",
        "line": 49,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->"
      },
      {
        "file": "/usr/local/www/apache24/noexec/XXX/ocs/v2.php",
        "line": 7,
        "args": [
          "/usr/local/www/apache24/noexec/XXX/ocs/v1.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/usr/local/www/apache24/noexec/XXX/lib/private/RichObjectStrings/Validator.php",
    "Line": 85,
    "message": "Object for placeholder file is invalid, value 243822 for key id is not a string",
    "exception": [],
    "CustomMessage": "Object for placeholder file is invalid, value 243822 for key id is not a string"
  },
  "id": "67d287ae18b04"
}

Now the log gets flooded with that even if I delete the file from the Webinterface. (maybe a good idea prevent that in the future as well; If a resource is marked deleted do not try to execute jobs on them or related to them)

Image

Truncating the activity table stops the execution and production of the error.

DrDBanner avatar Mar 13 '25 07:03 DrDBanner

Thanks! I won't get to it this week, but with this information I should be able to find the source of the error.

provokateurin avatar Mar 13 '25 07:03 provokateurin

@DrDBanner I found it: https://github.com/nextcloud/server/pull/51512

provokateurin avatar Mar 17 '25 05:03 provokateurin

unfortunately issue still exist:

log entry: Fout | activity | InvalidObjectExeption Object is invalid, value 57280 is not a string

Raw log entry

{ "reqId": "R7hAIgego1St5uGtG9UV", "level": 3, "time": "2025-03-19T12:14:15+00:00", "remoteAddr": "xxx.xxx.xxx.xxx", "user": "xxxxxxx", "app": "activity", "method": "GET", "url": "/ocs/v2.php/apps/activity/api/v2/activity/self?format=json&previews=true&since=0", "message": "Object is invalid, value 57280 is not a string", "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:136.0) Gecko/20100101 Firefox/136.0", "version": "31.0.1.2", "exception": { "Exception": "OCP\RichObjectStrings\InvalidObjectExeption", "Message": "Object is invalid, value 57280 is not a string", "Code": 0, "Trace": [ { "file": "/var/www/html/lib/private/RichObjectStrings/Validator.php", "line": 59, "function": "validateParameter", "class": "OC\RichObjectStrings\Validator", "type": "->", "args": [ { "type": "file", "id": 57280, "name": "shared", "path": "shared", "link": "https://xxxx.nextcloud.dscloud.me/f/57280" } ] }, { "file": "/var/www/html/apps/activity/lib/GroupHelper.php", "line": 74, "function": "validate", "class": "OC\RichObjectStrings\Validator", "type": "->", "args": [ "Je deelde {file} met {email} per mail", { "file": { "type": "file", "id": 57280, "name": "shared", "path": "shared", "link": "https://nctest.maartnextcloud.dscloud.me/f/57280" }, "email": { "type": "email", "id": "[email protected]", "name": "[email protected]" } } ] }, { "file": "/var/www/html/apps/activity/lib/GroupHelper.php", "line": 46, "function": "addEvent", "class": "OCA\Activity\GroupHelper", "type": "->", "args": [ 300, { "class": "OC\Activity\Event" } ] }, { "file": "/var/www/html/apps/activity/lib/Data.php", "line": 231, "function": "addActivity", "class": "OCA\Activity\GroupHelper", "type": "->", "args": [ { "0": "And 10 more entries, set log level to debug to see all entries", "activity_id": 300, "timestamp": 1738751953, "priority": 30, "type": "shared", "user": "xxxxxxxx" } ] }, { "file": "/var/www/html/apps/activity/lib/Controller/APIv2Controller.php", "line": 189, "function": "get", "class": "OCA\Activity\Data", "type": "->", "args": [ { "class": "OCA\Activity\GroupHelper" }, { "class": "OCA\Activity\UserSettings" }, "adminhrl", 0, 7, "desc", "self", "", 0 ] }, { "file": "/var/www/html/apps/activity/lib/Controller/APIv2Controller.php", "line": 136, "function": "get", "class": "OCA\Activity\Controller\APIv2Controller", "type": "->", "args": [ "self", 0, 50, true, "", 0, "desc" ] }, { "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php", "line": 200, "function": "getFilter", "class": "OCA\Activity\Controller\APIv2Controller", "type": "->", "args": [ "self", 0, 50, true, "", 0, "desc" ] }, { "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php", "line": 114, "function": "executeController", "class": "OC\AppFramework\Http\Dispatcher", "type": "->", "args": [ { "class": "OCA\Activity\Controller\APIv2Controller" }, "getFilter" ] }, { "file": "/var/www/html/lib/private/AppFramework/App.php", "line": 161, "function": "dispatch", "class": "OC\AppFramework\Http\Dispatcher", "type": "->", "args": [ { "class": "OCA\Activity\Controller\APIv2Controller" }, "getFilter" ] }, { "file": "/var/www/html/lib/private/Route/Router.php", "line": 307, "function": "main", "class": "OC\AppFramework\App", "type": "::", "args": [ "OCA\Activity\Controller\APIv2Controller", "getFilter", { "class": "OC\AppFramework\DependencyInjection\DIContainer" }, { "filter": "self", "_route": "ocs.activity.apiv2.getfilter" } ] }, { "file": "/var/www/html/ocs/v1.php", "line": 49, "function": "match", "class": "OC\Route\Router", "type": "->", "args": [ "/ocsapp/apps/activity/api/v2/activity/self" ] }, { "file": "/var/www/html/ocs/v2.php", "line": 7, "args": [ "/var/www/html/ocs/v1.php" ], "function": "require_once" } ], "File": "/var/www/html/lib/private/RichObjectStrings/Validator.php", "Line": 85, "message": "Object is invalid, value 57280 is not a string", "exception": [], "CustomMessage": "Object is invalid, value 57280 is not a string" }, "id": "67dab55ae5f6e"

HRL62 avatar Mar 19 '25 12:03 HRL62

Yes, because the fix is not released yet.

provokateurin avatar Mar 19 '25 13:03 provokateurin

I saw a new version of nextcloud (31.0.2) was released, but still receiving the same error when going to 'Activity' the error message is a little different, am I correct to assume fix still not released:

Fout | activity | InvalidObjectExeption Object for placeholder file is invalid, value 57280 for key id is not a string (iso Object is invalid, value 57280 is not a string)

Raw log entry

{ "reqId": "JrZ3PSGmZ9Q6fCS6JFtj", "level": 3, "time": "2025-03-20T17:26:24+00:00", "remoteAddr": "xxx.xxx.xxx.xxx", "user": "xxxxxxxx", "app": "activity", "method": "GET", "url": "/ocs/v2.php/apps/activity/api/v2/activity/all?format=json&previews=true&since=0", "message": "Object for placeholder file is invalid, value 57280 for key id is not a string", "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:136.0) Gecko/20100101 Firefox/136.0", "version": "31.0.2.1", "exception": { "Exception": "OCP\RichObjectStrings\InvalidObjectExeption", "Message": "Object for placeholder file is invalid, value 57280 for key id is not a string", "Code": 0, "Trace": [ { "file": "/var/www/html/lib/private/RichObjectStrings/Validator.php", "line": 59, "function": "validateParameter", "class": "OC\RichObjectStrings\Validator", "type": "->", "args": [ "file", { "type": "file", "id": 57280, "name": "shared", "path": "shared", "link": "https://nctest.maartnextcloud.dscloud.me/f/57280" } ] }, { "file": "/var/www/html/apps/activity/lib/GroupHelper.php", "line": 75, "function": "validate", "class": "OC\RichObjectStrings\Validator", "type": "->", "args": [ "Je deelde {file} met {email} per mail", { "file": { "type": "file", "id": 57280, "name": "shared", "path": "shared", "link": "https://xxxxxx.maartnextcloud.dscloud.me/f/57280" }, "email": { "type": "email", "id": "[email protected]", "name": "[email protected]" } } ] }, { "file": "/var/www/html/apps/activity/lib/GroupHelper.php", "line": 47, "function": "addEvent", "class": "OCA\Activity\GroupHelper", "type": "->", "args": [ 300, { "class": "OC\Activity\Event" } ] }, { "file": "/var/www/html/apps/activity/lib/Data.php", "line": 232, "function": "addActivity", "class": "OCA\Activity\GroupHelper", "type": "->", "args": [ { "0": "And 10 more entries, set log level to debug to see all entries", "activity_id": 300, "timestamp": 1738751953, "priority": 30, "type": "shared", "user": "xxxxxxx" } ] }, { "file": "/var/www/html/apps/activity/lib/Controller/APIv2Controller.php", "line": 190, "function": "get", "class": "OCA\Activity\Data", "type": "->", "args": [ { "class": "OCA\Activity\GroupHelper" }, { "class": "OCA\Activity\UserSettings" }, "xxxxxxxxx", 0, 2, "desc", "all", "", 0 ] }, { "file": "/var/www/html/apps/activity/lib/Controller/APIv2Controller.php", "line": 137, "function": "get", "class": "OCA\Activity\Controller\APIv2Controller", "type": "->", "args": [ "all", 0, 50, true, "", 0, "desc" ] }, { "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php", "line": 200, "function": "getFilter", "class": "OCA\Activity\Controller\APIv2Controller", "type": "->", "args": [ "all", 0, 50, true, "", 0, "desc" ] }, { "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php", "line": 114, "function": "executeController", "class": "OC\AppFramework\Http\Dispatcher", "type": "->", "args": [ { "class": "OCA\Activity\Controller\APIv2Controller" }, "getFilter" ] }, { "file": "/var/www/html/lib/private/AppFramework/App.php", "line": 161, "function": "dispatch", "class": "OC\AppFramework\Http\Dispatcher", "type": "->", "args": [ { "class": "OCA\Activity\Controller\APIv2Controller" }, "getFilter" ] }, { "file": "/var/www/html/lib/private/Route/Router.php", "line": 307, "function": "main", "class": "OC\AppFramework\App", "type": "::", "args": [ "OCA\Activity\Controller\APIv2Controller", "getFilter", { "class": "OC\AppFramework\DependencyInjection\DIContainer" }, { "filter": "all", "_route": "ocs.activity.apiv2.getfilter" } ] }, { "file": "/var/www/html/ocs/v1.php", "line": 49, "function": "match", "class": "OC\Route\Router", "type": "->", "args": [ "/ocsapp/apps/activity/api/v2/activity/all" ] }, { "file": "/var/www/html/ocs/v2.php", "line": 7, "args": [ "/var/www/html/ocs/v1.php" ], "function": "require_once" } ], "File": "/var/www/html/lib/private/RichObjectStrings/Validator.php", "Line": 85, "message": "Object for placeholder file is invalid, value 57280 for key id is not a string", "exception": [], "CustomMessage": "Object for placeholder file is invalid, value 57280 for key id is not a string" }, "id": "67dc4fd8aa9f7"

HRL62 avatar Mar 20 '25 17:03 HRL62

Btw, the same error exists when adding files as "favorite":

In the WI under "Activity" you see this: "Rich subject or a parameter for "You added {file} to your favorites" is malformed

After changing line 141 in apps/files/lib/Activity/FavoriteProvider.php:

- 'id' => $subjectParams['id'],
+ 'id' => (string)$subjectParams['id'],

at least the logfile spam stops and in the WI the message is now:

"You added * to your favorites"

The * is the home aka house icon instead of the file you added as favorite, since the entry in the activity table in the database is wrong (missing file name and file location).

Should this be reported as a new issue or should we reopen this one here?

DaleBCooper avatar Mar 20 '25 20:03 DaleBCooper

@DaleBCooper Yeah we have many places that trigger such an error. Since you already found the root cause, can you maybe create a PR for it? Otherwise please open a new issue if it is not the exact same error.

provokateurin avatar Mar 20 '25 21:03 provokateurin

any news when this issue will be fixed? I only encounter this issue when upgrade to NC 31.0.1 or 31.0.2 was done (version 31.0.0 has not this issue)

HRL62 avatar Mar 25 '25 11:03 HRL62

@HRL62 https://github.com/nextcloud/server/pull/51552 ... It's merged. So, make sure you are on the RC1 ...

DrDBanner avatar Mar 25 '25 11:03 DrDBanner

my environment is running 31.0.2 (released at 19 march by Docker) ; not sure if this is RC1 (or not) ; no newer version available (in docker)

I am almost sure I am running the latest version (including the suppost fixes), but my issue still exists :-(

HRL62 avatar Mar 25 '25 12:03 HRL62

I just saw this error on my own server running 31.0.2:

{
  "Exception": "OCP\\RichObjectStrings\\InvalidObjectExeption",
  "Message": "Object for placeholder user is invalid, value 0 for key id is not a string",
  "Code": 0,
  "Trace": [
    {
      "file": "/nix/store/r76b8g2yhi4v37jm6vp4hi0r2hn1gk47-nextcloud-31.0.2/lib/private/RichObjectStrings/Validator.php",
      "line": 59,
      "function": "validateParameter",
      "class": "OC\\RichObjectStrings\\Validator",
      "type": "->"
    },
    {
      "file": "/nix/store/r76b8g2yhi4v37jm6vp4hi0r2hn1gk47-nextcloud-31.0.2/apps/activity/lib/GroupHelper.php",
      "line": 75,
      "function": "validate",
      "class": "OC\\RichObjectStrings\\Validator",
      "type": "->"
    },
    {
      "file": "/nix/store/r76b8g2yhi4v37jm6vp4hi0r2hn1gk47-nextcloud-31.0.2/apps/activity/lib/GroupHelper.php",
      "line": 47,
      "function": "addEvent",
      "class": "OCA\\Activity\\GroupHelper",
      "type": "->"
    },
    {
      "file": "/nix/store/r76b8g2yhi4v37jm6vp4hi0r2hn1gk47-nextcloud-31.0.2/apps/activity/lib/Data.php",
      "line": 232,
      "function": "addActivity",
      "class": "OCA\\Activity\\GroupHelper",
      "type": "->"
    },
    {
      "file": "/nix/store/r76b8g2yhi4v37jm6vp4hi0r2hn1gk47-nextcloud-31.0.2/apps/activity/lib/Controller/APIv2Controller.php",
      "line": 190,
      "function": "get",
      "class": "OCA\\Activity\\Data",
      "type": "->"
    },
    {
      "file": "/nix/store/r76b8g2yhi4v37jm6vp4hi0r2hn1gk47-nextcloud-31.0.2/apps/activity/lib/Controller/APIv2Controller.php",
      "line": 137,
      "function": "get",
      "class": "OCA\\Activity\\Controller\\APIv2Controller",
      "type": "->"
    },
    {
      "file": "/nix/store/r76b8g2yhi4v37jm6vp4hi0r2hn1gk47-nextcloud-31.0.2/lib/private/AppFramework/Http/Dispatcher.php",
      "line": 200,
      "function": "getFilter",
      "class": "OCA\\Activity\\Controller\\APIv2Controller",
      "type": "->"
    },
    {
      "file": "/nix/store/r76b8g2yhi4v37jm6vp4hi0r2hn1gk47-nextcloud-31.0.2/lib/private/AppFramework/Http/Dispatcher.php",
      "line": 114,
      "function": "executeController",
      "class": "OC\\AppFramework\\Http\\Dispatcher",
      "type": "->"
    },
    {
      "file": "/nix/store/r76b8g2yhi4v37jm6vp4hi0r2hn1gk47-nextcloud-31.0.2/lib/private/AppFramework/App.php",
      "line": 161,
      "function": "dispatch",
      "class": "OC\\AppFramework\\Http\\Dispatcher",
      "type": "->"
    },
    {
      "file": "/nix/store/r76b8g2yhi4v37jm6vp4hi0r2hn1gk47-nextcloud-31.0.2/lib/private/Route/Router.php",
      "line": 307,
      "function": "main",
      "class": "OC\\AppFramework\\App",
      "type": "::"
    },
    {
      "file": "/nix/store/r76b8g2yhi4v37jm6vp4hi0r2hn1gk47-nextcloud-31.0.2/ocs/v1.php",
      "line": 49,
      "function": "match",
      "class": "OC\\Route\\Router",
      "type": "->"
    },
    {
      "file": "/nix/store/r76b8g2yhi4v37jm6vp4hi0r2hn1gk47-nextcloud-31.0.2/ocs/v2.php",
      "line": 7,
      "args": [
        "/nix/store/r76b8g2yhi4v37jm6vp4hi0r2hn1gk47-nextcloud-31.0.2/ocs/v1.php"
      ],
      "function": "require_once"
    }
  ],
  "File": "/nix/store/r76b8g2yhi4v37jm6vp4hi0r2hn1gk47-nextcloud-31.0.2/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"
}

It's different from the one I already fixed.

I will take another look, but unfortunately these errors are hard to debug because the real source is not shown here.

provokateurin avatar Mar 27 '25 13:03 provokateurin

my issue is located when I share directories and or file(s) (via email ; not defined in nextcloud) with others. In Activity I get the message: Rich subject or a parameter for "Je deelde {file} met {email} per mail" is malformed

HRL62 avatar Mar 29 '25 08:03 HRL62

Seems to happen for me when storing files in E2EE folders which create a) this log entries and b) this in the activity app "Rich subject or a parameter for "Du hast {oldfile} in {newfile} umbenannt" is malformed" (https://github.com/nextcloud/server/issues/52136, https://github.com/nextcloud/server/pull/52575)

NC 31.0.4.1

bcutter avatar May 11 '25 14:05 bcutter

@bcutter that particular one was fixed in https://github.com/nextcloud/server/pull/52630 and will be released in 31.0.5.

provokateurin avatar May 11 '25 14:05 provokateurin