server icon indicating copy to clipboard operation
server copied to clipboard

OCP\RichObjectStrings\InvalidObjectExeption: Parameter is undefined

Open JochenHWezel opened this issue 7 years ago • 3 comments

The nextcloud log is full with message

[activity] Error: OCP\RichObjectStrings\InvalidObjectExeption: Parameter is undefined at <<closure>>

 0. /var/www/owncloud/apps/activity/lib/GroupHelper.php line 111
    validate("{user} hat das  ... t", {user: {type: "u ... }})
 1. /var/www/owncloud/apps/activity/lib/Data.php line 258
    addActivity({activity_id: "2 ... "})
 2. /var/www/owncloud/apps/activity/lib/Controller/APIv1.php line 90
    get(OCA\Activity\GroupHelper {}, OCA\Activity\UserSettings {}, "jw", 0, 52, "desc", "all")
 3. /var/www/owncloud/lib/private/AppFramework/Http/Dispatcher.php line 166
    get(0, 100)
 4. /var/www/owncloud/lib/private/AppFramework/Http/Dispatcher.php line 99
    executeController(OCA\Activity\Controller\APIv1 {}, "get")
 5. /var/www/owncloud/lib/private/AppFramework/App.php line 118
    dispatch(OCA\Activity\Controller\APIv1 {}, "get")
 6. /var/www/owncloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    main("APIv1Controller", "get", OC\AppFramework\ ... {}, {_route: "ocs.activity.APIv1.get"})
 7. <<closure>>
    __invoke({_route: "ocs.activity.APIv1.get"})
 8. /var/www/owncloud/lib/private/Route/Router.php line 297
    call_user_func(OC\AppFramework\ ... {}, {_route: "ocs.activity.APIv1.get"})
 9. /var/www/owncloud/ocs/v1.php line 82
    match("/ocsapp/cloud/activity")
10. /var/www/owncloud/ocs/v2.php line 24
    require_once("/var/www/owncloud/ocs/v1.php")

GET /cloud/ocs/v2.php/cloud/activity?start=0&count=100&format=json
from 192.168.32.111 by jw at 2018-12-30T18:30:18+00:00

or in raw format:

{"reqId":"3sCoHe6folpkpNz2yxls","level":3,"time":"2018-12-30T18:30:18+00:00","remoteAddr":"192.168.32.111","user":"jw","app":"activity","method":"GET","url":"/cloud/ocs/v2.php/cloud/activity?start=0&count=100&format=json","message":{"Exception":"OCP\\RichObjectStrings\\InvalidObjectExeption","Message":"Parameter is undefined","Code":0,"Trace":[{"file":"/var/www/owncloud/apps/activity/lib/GroupHelper.php","line":111,"function":"validate","class":"OC\\RichObjectStrings\\Validator","type":"->","args":["{user} hat das Board {board} mit {sharee} geteilt",{"user":{"type":"user","id":"bei-admin","name":"BEI Admin"},"board":{"type":"highlight","id":9,"name":"BEI Projekt-Board","link":"https://cloud.beitelisrael.de/cloud/index.php/apps/deck/#!/board/9/"},"acl":{"type":"highlight","id":"BEI Diakone","name":"BEI Diakone"}}]},{"file":"/var/www/owncloud/apps/activity/lib/Data.php","line":258,"function":"addActivity","class":"OCA\\Activity\\GroupHelper","type":"->","args":[{"activity_id":"269517","timestamp":"1546183188","priority":"30","type":"deck","user":"bei-admin","affecteduser":"jw","app":"deck","subject":"board_share","subjectparams":"{\"acl\":{\"participant\":\"BEI Diakone\",\"type\":1,\"boardId\":9,\"permissionEdit\":true,\"permissionShare\":false,\"permissionManage\":false,\"owner\":false,\"id\":8},\"board\":{\"title\":\"BEI Projekt-Board\",\"owner\":\"bei-admin\",\"color\":\"0082c9\",\"archived\":false,\"labels\":[],\"acl\":[],\"permissions\":[],\"users\":[],\"deletedAt\":0,\"lastModified\":1546183181,\"id\":9},\"author\":\"bei-admin\"}","message":"","messageparams":"[]","file":"BEI Projekt-Board","link":"","object_type":"deck_board","object_id":"9"}]},{"file":"/var/www/owncloud/apps/activity/lib/Controller/APIv1.php","line":90,"function":"get","class":"OCA\\Activity\\Data","type":"->","args":[{"__class__":"OCA\\Activity\\GroupHelper"},{"__class__":"OCA\\Activity\\UserSettings"},"jw",0,52,"desc","all"]},{"file":"/var/www/owncloud/lib/private/AppFramework/Http/Dispatcher.php","line":166,"function":"get","class":"OCA\\Activity\\Controller\\APIv1","type":"->","args":[0,100]},{"file":"/var/www/owncloud/lib/private/AppFramework/Http/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Activity\\Controller\\APIv1"},"get"]},{"file":"/var/www/owncloud/lib/private/AppFramework/App.php","line":118,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Activity\\Controller\\APIv1"},"get"]},{"file":"/var/www/owncloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["APIv1Controller","get",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"ocs.activity.APIv1.get"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"_route":"ocs.activity.APIv1.get"}]},{"file":"/var/www/owncloud/lib/private/Route/Router.php","line":297,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"_route":"ocs.activity.APIv1.get"}]},{"file":"/var/www/owncloud/ocs/v1.php","line":82,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/ocsapp/cloud/activity"]},{"file":"/var/www/owncloud/ocs/v2.php","line":24,"args":["/var/www/owncloud/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/owncloud/lib/private/RichObjectStrings/Validator.php","Line":73,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows) mirall/2.5.1final (build 20181204) (Nextcloud)","version":"15.0.0.10","id":"5c290ebb0af0c"}

Steps to reproduce

nothing special

maybe a hint: recently, I moved my nextcloud dir from /owncloud/ to /cloud/ but kept /owncloud/ in place as a symbolic link directory (for compatibility with clients configured to the old directory)

Expected behaviour

No error

Actual behaviour

Several messages every few minutes

Server configuration

Operating system: Ubuntu 18.04

Web server: Apache

Database: MySql

PHP version: 7.2

Nextcloud version: (see Nextcloud admin page) 15.0

Updated from an older Nextcloud/ownCloud or fresh install: migrated from owncloud 10

Nextcloud configuration:

Config report
{
    "system": {
        "updatechecker": false,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "beiweb01.ad.kohelet-network.org",
            "owncloud.beitelisrael.de",
            "cloud.beitelisrael.de"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "filelocking.enabled": true,
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379,
            "timeout": 0,
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "overwrite.cli.url": "https:\/\/cloud.beitelisrael.de\/cloud",
        "dbtype": "mysql",
        "version": "15.0.0.10",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "ldapIgnoreNamingRules": false,
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "mail_smtpsecure": "tls",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "loglevel": 3,
        "maintenance": false,
        "theme": "",
        "htaccess.RewriteBase": "\/cloud",
        "singleuser": false,
        "updater.release.channel": "stable"
    }
}

JochenHWezel avatar Dec 30 '18 18:12 JochenHWezel

Hello,

i can also confirm this error that JochenHWezel said. In addition, I got this error with logged in user, which will be removed with user deletion. see appendix below:

grafik

Can anyone confirm?

best regards

angawest

angawest avatar Jan 16 '19 12:01 angawest

Thank you for reporting this issue :+1:

@JochenHWezel

error is related to https://github.com/nextcloud/deck/blob/6298e0f1070fc435ff3d2385396d30ea5c3cfed5/lib/Activity/ActivityManager.php#L145

{user} has shared the board {board} with {sharee} is not a valid RichObjectString because {sharee} is not a valid definition as per Definitions.php. @juliushaertl :ping_pong:

@angawest

please share your logs. i suppose your case is not related to deck app :thinking:

kesselb avatar Jan 29 '19 20:01 kesselb

@JochenHWezel Thanks for reporting, this is actually a bug in deck since we add the parameter sharee in the string but it is named acl in the list of parameters. https://github.com/nextcloud/deck/issues/869

juliusknorr avatar Jan 30 '19 08:01 juliusknorr