Error message when activating ‘polls’ after update

After updating to NC29, I can no longer activate polls. Removing and installing works, when activating the error appears

Cannot assign null to property OCA\Polls\Db\EntityWithUser::$anonymised of type int

How can I fix the problem? Thanks for your help!

Nextcloud version: 29.0.6.1
Operating system and version : Linux Shared hosting
PHP version: 8.2

Post the entire stack trace / raw log entry.

What version of the polls app?

Tried to update to version 7.2.2 – changelog file means 7.2.2, activation still results in the same error message

Thank you for your answer - is that what you need?

Download Raw-Log

Your nextcloud.log entry that contains the above error. And possibly an entry or two just before it.

int","Code":0,"Trace":[{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/public/AppFramework/Db/Entity.php","line":167,"function":"setter","class":"OCP\\AppFramework\\Db\\Entity","type":"->","args":["anonymized",[null]]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/public/AppFramework/Db/Entity.php","line":75,"function":"__call","class":"OCP\\AppFramework\\Db\\Entity","type":"->","args":["setAnonymized",[null]]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/public/AppFramework/Db/QBMapper.php","line":321,"function":"fromRow","class":"OCP\\AppFramework\\Db\\Entity","type":"::","args":[[16,3,"ex_jEzV0avo",47,"2023-02-16T14:00:00+00:00","And 8 more entries, set log level to debug to see all entries"]]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/public/AppFramework/Db/QBMapper.php","line":361,"function":"mapRowToEntity","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->","args":[[16,3,"ex_jEzV0avo",47,"2023-02-16T14:00:00+00:00","And 8 more entries, set log level to debug to see all entries"]]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/apps/polls/lib/Db/VoteMapper.php","line":155,"function":"findEntity","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->","args":[["OC\\DB\\QueryBuilder\\QueryBuilder"]]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/apps/polls/lib/Db/VoteMapper.php","line":36,"function":"find","class":"OCA\\Polls\\Db\\VoteMapper","type":"->","args":[16]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/apps/polls/lib/Db/TableManager.php","line":409,"function":"update","class":"OCA\\Polls\\Db\\VoteMapper","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/apps/polls/lib/Migration/RepairSteps/UpdateHashes.php","line":34,"function":"migrateOptionsToHash","class":"OCA\\Polls\\Db\\TableManager","type":"->","args":[]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/private/Repair.php","line":126,"function":"run","class":"OCA\\Polls\\Migration\\RepairSteps\\UpdateHashes","type":"->","args":[["OC\\Repair"]]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/private/legacy/OC_App.php","line":838,"function":"run","class":"OC\\Repair","type":"->","args":[]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/private/legacy/OC_App.php","line":779,"function":"executeRepairSteps","class":"OC_App","type":"::","args":["*** sensitive parameters replaced ***",["OCA\\Polls\\Migration\\RepairSteps\\DropOrphanedTables","OCA\\Polls\\Migration\\RepairSteps\\DropOrphanedColumns","OCA\\Polls\\Migration\\RepairSteps\\UpdateHashes","OCA\\Polls\\Migration\\RepairSteps\\DeleteInvalidRecords","OCA\\Polls\\Migration\\RepairSteps\\CreateIndices"]]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/private/Installer.php","line":184,"function":"updateApp","class":"OC_App","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/apps/settings/lib/Controller/AppSettingsController.php","line":605,"function":"updateAppstoreApp","class":"OC\\Installer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":232,"function":"updateApp","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":138,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Settings\\Controller\\AppSettingsController"],"updateApp"]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Settings\\Controller\\AppSettingsController"],"updateApp"]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/private/Route/Router.php","line":331,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Settings\\Controller\\AppSettingsController","updateApp",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["*** sensitive parameters replaced ***","settings.appsettings.updateapp"]]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/base.php","line":1058,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/settings/apps/update/polls"]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/index.php","line":49,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/public/AppFramework/Db/Entity.php","Line":136},"message":"Cannot assign null to property OCA\\Polls\\Db\\EntityWithUser::$anonymized of type int in file '/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/public/AppFramework/Db/Entity.php' line 136","exception":{},"CustomMessage":"Cannot assign null to property OCA\\Polls\\Db\\EntityWithUser::$anonymized of type int in file '/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/public/AppFramework/Db/Entity.php' line 136"}}
{"reqId":"aafow2uyfwfMBL9X3657","level":3,"time":"2024-09-09T10:05:43+00:00","remoteAddr":"2a00:d420:11b:7b00:68e6:1fef:b155:5744","user":"admin","app":"settings","method":"POST","url":"/index.php/settings/apps/enable","message":"could not enable apps","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36","version":"29.0.6.1","exception":{"Exception":"TypeError","Message":"Cannot assign null to property OCA\\Polls\\Db\\EntityWithUser::$anonymized of type int","Code":0,"Trace":[{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/public/AppFramework/Db/Entity.php","line":167,"function":"setter","class":"OCP\\AppFramework\\Db\\Entity","type":"->","args":["anonymized",[null]]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/public/AppFramework/Db/Entity.php","line":75,"function":"__call","class":"OCP\\AppFramework\\Db\\Entity","type":"->","args":["setAnonymized",[null]]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/public/AppFramework/Db/QBMapper.php","line":321,"function":"fromRow","class":"OCP\\AppFramework\\Db\\Entity","type":"::","args":[[16,3,"ex_jEzV0avo",47,"2023-02-16T14:00:00+00:00","And 8 more entries, set log level to debug to see all entries"]]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/public/AppFramework/Db/QBMapper.php","line":361,"function":"mapRowToEntity","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->","args":[[16,3,"ex_jEzV0avo",47,"2023-02-16T14:00:00+00:00","And 8 more entries, set log level to debug to see all entries"]]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/apps/polls/lib/Db/VoteMapper.php","line":155,"function":"findEntity","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->","args":[["OC\\DB\\QueryBuilder\\QueryBuilder"]]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/apps/polls/lib/Db/VoteMapper.php","line":36,"function":"find","class":"OCA\\Polls\\Db\\VoteMapper","type":"->","args":[16]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/apps/polls/lib/Db/TableManager.php","line":409,"function":"update","class":"OCA\\Polls\\Db\\VoteMapper","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/apps/polls/lib/Migration/RepairSteps/UpdateHashes.php","line":34,"function":"migrateOptionsToHash","class":"OCA\\Polls\\Db\\TableManager","type":"->","args":[]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/private/Repair.php","line":126,"function":"run","class":"OCA\\Polls\\Migration\\RepairSteps\\UpdateHashes","type":"->","args":[["OC\\Repair"]]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/private/legacy/OC_App.php","line":838,"function":"run","class":"OC\\Repair","type":"->","args":[]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/private/Installer.php","line":141,"function":"executeRepairSteps","class":"OC_App","type":"::","args":["polls",["OCA\\Polls\\Migration\\RepairSteps\\DropOrphanedTables","OCA\\Polls\\Migration\\RepairSteps\\DropOrphanedColumns","OCA\\Polls\\Migration\\RepairSteps\\UpdateHashes","OCA\\Polls\\Migration\\RepairSteps\\DeleteInvalidRecords","OCA\\Polls\\Migration\\RepairSteps\\CreateIndices"]]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/apps/settings/lib/Controller/AppSettingsController.php","line":521,"function":"installApp","class":"OC\\Installer","type":"->","args":["polls"]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":232,"function":"enableApps","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->","args":[["polls"],[]]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":138,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Settings\\Controller\\AppSettingsController"],"enableApps"]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Settings\\Controller\\AppSettingsController"],"enableApps"]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/private/Route/Router.php","line":331,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Settings\\Controller\\AppSettingsController","enableApps",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["settings.appsettings.enableapps"]]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/base.php","line":1058,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/settings/apps/enable"]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/index.php","line":49,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/public/AppFramework/Db/Entity.php","Line":136,"message":"could not enable apps","exception":{},"CustomMessage":"could not enable apps"}}
{"reqId":"5JRh5WbqewslbIdz1bQM","level":2,"time":"2024-09-09T11:39:59+00:00","remoteAddr":"2a00:d420:11b:7b00:68e6:1fef:b155:5744","user":"damian","app":"core","method":"POST","url":"/index.php/login/confirm","message":"Login failed: 'damian' (Remote IP: '2a00:d420:11b:7b00:68e6:1fef:b155:5744')","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.6 Safari/605.1.15","version":"29.0.6.1","data":{"app":"core"}}
{"reqId":"Mn82sGSksgDk824SgW18","level":3,"time":"2024-09-09T11:40:09+00:00","remoteAddr":"2a00:d420:11b:7b00:68e6:1fef:b155:5744","user":"damian","app":"settings","method":"POST","url":"/index.php/settings/apps/enable","message":"could not enable apps","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.6 Safari/605.1.15","version":"29.0.6.1","exception":{"Exception":"TypeError","Message":"Cannot assign null to property OCA\\Polls\\Db\\EntityWithUser::$anonymized of type int","Code":0,"Trace":[{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/public/AppFramework/Db/Entity.php","line":167,"function":"setter","class":"OCP\\AppFramework\\Db\\Entity","type":"->","args":["anonymized",[null]]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/public/AppFramework/Db/Entity.php","line":75,"function":"__call","class":"OCP\\AppFramework\\Db\\Entity","type":"->","args":["setAnonymized",[null]]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/public/AppFramework/Db/QBMapper.php","line":321,"function":"fromRow","class":"OCP\\AppFramework\\Db\\Entity","type":"::","args":[[16,3,"ex_jEzV0avo",47,"2023-02-16T14:00:00+00:00","And 8 more entries, set log level to debug to see all entries"]]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/public/AppFramework/Db/QBMapper.php","line":361,"function":"mapRowToEntity","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->","args":[[16,3,"ex_jEzV0avo",47,"2023-02-16T14:00:00+00:00","And 8 more entries, set log level to debug to see all entries"]]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/apps/polls/lib/Db/VoteMapper.php","line":155,"function":"findEntity","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->","args":[["OC\\DB\\QueryBuilder\\QueryBuilder"]]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/apps/polls/lib/Db/VoteMapper.php","line":36,"function":"find","class":"OCA\\Polls\\Db\\VoteMapper","type":"->","args":[16]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/apps/polls/lib/Db/TableManager.php","line":409,"function":"update","class":"OCA\\Polls\\Db\\VoteMapper","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/apps/polls/lib/Migration/RepairSteps/UpdateHashes.php","line":34,"function":"migrateOptionsToHash","class":"OCA\\Polls\\Db\\TableManager","type":"->","args":[]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/private/Repair.php","line":126,"function":"run","class":"OCA\\Polls\\Migration\\RepairSteps\\UpdateHashes","type":"->","args":[["OC\\Repair"]]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/private/legacy/OC_App.php","line":838,"function":"run","class":"OC\\Repair","type":"->","args":[]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/private/Installer.php","line":141,"function":"executeRepairSteps","class":"OC_App","type":"::","args":["polls",["OCA\\Polls\\Migration\\RepairSteps\\DropOrphanedTables","OCA\\Polls\\Migration\\RepairSteps\\DropOrphanedColumns","OCA\\Polls\\Migration\\RepairSteps\\UpdateHashes","OCA\\Polls\\Migration\\RepairSteps\\DeleteInvalidRecords","OCA\\Polls\\Migration\\RepairSteps\\CreateIndices"]]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/apps/settings/lib/Controller/AppSettingsController.php","line":521,"function":"installApp","class":"OC\\Installer","type":"->","args":["polls"]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":232,"function":"enableApps","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->","args":[["polls"],[]]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":138,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Settings\\Controller\\AppSettingsController"],"enableApps"]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Settings\\Controller\\AppSettingsController"],"enableApps"]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/private/Route/Router.php","line":331,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Settings\\Controller\\AppSettingsController","enableApps",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["settings.appsettings.enableapps"]]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/base.php","line":1058,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/settings/apps/enable"]},{"file":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/index.php","line":49,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/home/damianm1/public_html/cloud.damianmusic.ch/nextcloud/lib/public/AppFramework/Db/Entity.php","Line":136,"message":"could not enable apps","exception":{},"CustomMessage":"could not enable apps"}}

I don’t see an obvious cause offhand. And I don’t see any similar recent reports. You can report it as a possible bug here: Issues · nextcloud/polls · GitHub

Make sure to provide the context (what version of Nextcloud you upgraded from, what database you’re using).

Was Polls active before the upgrade?

Yes, Polls was active and in use. We upgraded step by step from NC23 to 29 – but I can’t tell from which version it stopped working.