phonetrack icon indicating copy to clipboard operation
phonetrack copied to clipboard

Submitted events of Phonetrack are malformed

Open xTGHHx opened this issue 8 months ago • 7 comments

Phonetrack events generating tons of errors in NC log and events in 'Activity' are look like 'Rich subject or a parameter for "Das PhoneTrack-Gerät „{device}” der Sitzung „{session}” hat den Geofence-Bereich „{geofence}” verlassen" is malformed'.

Error in the NC log:

{"reqId":"RxhCY5WEaf8DeDMObhW4","level":3,"time":"2025-04-14T20:09:07+00:00","remoteAddr":"192.168.1.XXX","user":"XXX","app":"activity","method":"GET","url":"/owncloud/ocs/v2.php/apps/activity/api/v2/activity/phonetrack?format=json&previews=true&since=406189","message":"Object for placeholder user is invalid, value 0 for key id is not a string","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36","version":"31.0.3.2","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":"/var/www/nextcloud/lib/private/RichObjectStrings/Validator.php","line":59,"function":"validateParameter","class":"OC\\RichObjectStrings\\Validator","type":"->"},{"file":"/var/www/nextcloud/apps/activity/lib/GroupHelper.php","line":75,"function":"validate","class":"OC\\RichObjectStrings\\Validator","type":"->"},{"file":"/var/www/nextcloud/apps/activity/lib/GroupHelper.php","line":47,"function":"addEvent","class":"OCA\\Activity\\GroupHelper","type":"->"},{"file":"/var/www/nextcloud/apps/activity/lib/Data.php","line":232,"function":"addActivity","class":"OCA\\Activity\\GroupHelper","type":"->"},{"file":"/var/www/nextcloud/apps/activity/lib/Controller/APIv2Controller.php","line":190,"function":"get","class":"OCA\\Activity\\Data","type":"->"},{"file":"/var/www/nextcloud/apps/activity/lib/Controller/APIv2Controller.php","line":137,"function":"get","class":"OCA\\Activity\\Controller\\APIv2Controller","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":200,"function":"getFilter","class":"OCA\\Activity\\Controller\\APIv2Controller","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":307,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/ocs/v1.php","line":49,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/ocs/v2.php","line":7,"args":["/var/www/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/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":"67fd6c8c24981"}

Phonetrack 0.8.2 NC 31.0.3

xTGHHx avatar Apr 14 '25 20:04 xTGHHx

maybe this gives additional insights: https://github.com/nextcloud/activity/issues/1875#event-17169110287

xTGHHx avatar Apr 15 '25 19:04 xTGHHx

Hy there,

same problem here. NC 31.0.3 and Phonetrack 0.8.2. I am happy to provide logs or more information if needed, but bassically it looks the same at my instance like at @xTGHHx instance.

bknow1452 avatar Apr 17 '25 05:04 bknow1452

Just update from NC 30 to 31 and this error appears.

GAS85 avatar Apr 22 '25 12:04 GAS85

I have the same error Rich subject or a parameter for "The PhoneTrack device '{device}' of session '{session}' has entered the geofence area '{geofence}'" is malformed Rich subject or a parameter for "The PhoneTrack session '{session}' is now shared with {who}" is malformed

toas-koas avatar Nov 04 '25 09:11 toas-koas

This is fixed in 44ddb3d35e823998516c1d3cfb2e994bb4aaf005 and d88a7f7a647d336b49231537f25e1bbaff7df9a0 . Could someone try those changes? (by using the main branch or by applying those changes manually)

julien-nc avatar Nov 08 '25 14:11 julien-nc

I applied the changes manually for testing and will give feedback as soon I'll have new events reported. Tom

xTGHHx avatar Nov 08 '25 19:11 xTGHHx

Seems like there's more to do:

InvalidObjectExeption Object for placeholder device is invalid, value 19 for key id is not a string /var/www/nextcloud/lib/private/RichObjectStrings/Validator.php Zeile 59 OC\RichObjectStrings\Validator->validateParameter() /var/www/nextcloud/apps/activity/lib/GroupHelper.php Zeile 83 OC\RichObjectStrings\Validator->validate() /var/www/nextcloud/apps/activity/lib/GroupHelper.php Zeile 47 OCA\Activity\GroupHelper->addEvent() /var/www/nextcloud/apps/activity/lib/Data.php Zeile 234 OCA\Activity\GroupHelper->addActivity() /var/www/nextcloud/apps/activity/lib/Dashboard/ActivityWidget.php Zeile 147 OCA\Activity\Data->get() /var/www/nextcloud/apps/dashboard/lib/Controller/DashboardApiController.php Zeile 119 OCA\Activity\Dashboard\ActivityWidget->getItemsV2() /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php Zeile 204 OCA\Dashboard\Controller\DashboardApiController->getWidgetItemsV2() /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php Zeile 118 OC\AppFramework\Http\Dispatcher->executeController() /var/www/nextcloud/lib/private/AppFramework/App.php Zeile 153 OC\AppFramework\Http\Dispatcher->dispatch() /var/www/nextcloud/lib/private/Route/Router.php Zeile 321 OC\AppFramework\App::main() /var/www/nextcloud/ocs/v1.php Zeile 61 OC\Route\Router->match() /var/www/nextcloud/ocs/v2.php Zeile 8 undefinedundefinedrequire_once( "/var/www/nextcloud/ocs/v1.php" )

This happens if I call the dashboard. Don't know if this is related to the dashboard or to phonetrack, but error is reported in relation to phonetrack. Let me know if I can supply more info to this.

xTGHHx avatar Nov 09 '25 21:11 xTGHHx