Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception: Call to a member function getTimestamp() on bool #829

Closed
redwanz opened this issue Oct 18, 2021 · 4 comments · Fixed by #1298
Closed

Exception: Call to a member function getTimestamp() on bool #829

redwanz opened this issue Oct 18, 2021 · 4 comments · Fixed by #1298

Comments

@redwanz
Copy link

redwanz commented Oct 18, 2021

After Upgrade to NC 22.2.0 i have to deactivate circles, otherwise NC is not running

Bildschirmfoto 2021-10-18 um 18 40 53

@solracsf
Copy link
Member

solracsf commented Apr 1, 2022

Same issue here, reported by cron.

  • Nextcloud 22.2.5
  • PostgreSQL
Error: Call to a member function getTimestamp() on bool in /nextcloud/apps/circles/lib/Model/Circle.php:892
Stack trace:
#0 /nextcloud/apps/circles/lib/Tools/Db/ExtendedQueryBuilder.php(1031): OCA\Circles\Model\Circle->importFromDatabase()
#1 /nextcloud/apps/circles/lib/Tools/Db/ExtendedQueryBuilder.php(1054): OCA\Circles\Tools\Db\ExtendedQueryBuilder->parseSimpleSelectSql()
#2 /nextcloud/apps/circles/lib/Tools/Db/ExtendedQueryBuilder.php(953): OCA\Circles\Tools\Db\ExtendedQueryBuilder->getRow()
#3 /nextcloud/apps/circles/lib/Db/CircleRequestBuilder.php(112): OCA\Circles\Tools\Db\ExtendedQueryBuilder->asItem()
#4 /nextcloud/apps/circles/lib/Db/CircleRequest.php(327): OCA\Circles\Db\CircleRequestBuilder->getItemFromRequest()
#5 /nextcloud/apps/circles/lib/Service/FederatedUserService.php(937): OCA\Circles\Db\CircleRequest->getSingleCircle()
#6 /nextcloud/apps/circles/lib/Service/FederatedUserService.php(904): OCA\Circles\Service\FederatedUserService->getSingleCircle()
#7 /nextcloud/apps/circles/lib/Service/FederatedUserService.php(482): OCA\Circles\Service\FederatedUserService->fillSingleCircleId()
#8 /nextcloud/apps/circles/lib/ShareByCircleProvider.php(553): OCA\Circles\Service\FederatedUserService->getLocalFederatedUser()
#9 /nextcloud/lib/private/Share20/Manager.php(1360): OCA\Circles\ShareByCircleProvider->getSharedWith()
#10 /nextcloud/apps/files_sharing/lib/MountProvider.php(79): OC\Share20\Manager->getSharedWith()
#11 /nextcloud/lib/private/Files/Config/MountProviderCollection.php(118): OCA\Files_Sharing\MountProvider->getMountsForUser()
#12 /nextcloud/lib/private/Files/Filesystem.php(429): OC\Files\Config\MountProviderCollection->addMountForUser()
#13 /nextcloud/lib/private/Files/Filesystem.php(354): OC\Files\Filesystem::initMountPoints()
#14 /nextcloud/lib/private/legacy/OC_Util.php(325): OC\Files\Filesystem::init()
#15 /nextcloud/apps/quota_warning/lib/CheckQuota.php(312): OC_Util::setupFS()
#16 /nextcloud/apps/quota_warning/lib/CheckQuota.php(129): OCA\QuotaWarning\CheckQuota->getStorageInfo()
#17 /nextcloud/apps/quota_warning/lib/CheckQuota.php(89): OCA\QuotaWarning\CheckQuota->getRelativeQuotaUsage()
#18 /nextcloud/apps/quota_warning/lib/Job/User.php(52): OCA\QuotaWarning\CheckQuota->check()
#19 /nextcloud/lib/public/BackgroundJob/Job.php(79): OCA\QuotaWarning\Job\User->run()
#20 /nextcloud/lib/public/BackgroundJob/TimedJob.php(95): OCP\BackgroundJob\Job->execute()
#21 /nextcloud/cron.php(149): OCP\BackgroundJob\TimedJob->execute()
#22 {main}

solracsf added a commit that referenced this issue Apr 1, 2022
ArtificialOwl pushed a commit that referenced this issue Apr 5, 2022
@thexperiments
Copy link

Had a similar problem after migrating my database to postgres.

The problem seems to be that the conversion created "timestamp with time zone" data type columns instead of "timestamp without time zone".

Thus the conversion to a date can not work with the used format string as a +00 is attached.

For now I fixed it by generating alter table statements for all tables to switch to the datatype without timestamp.
In psql execute the following query then copy and paset the resulting alter table statements and apply them.

SELECT 
   'ALTER TABLE '||columns.table_name||' ALTER COLUMN '||columns.column_name||' TYPE timestamp without time zone;'
FROM 
   information_schema.columns
WHERE 
  columns.table_catalog = 'nextcloud' AND 
  columns.table_schema = 'nextcloud' AND 
  columns.data_type = 'timestamp with time zone';

@dodancs
Copy link

dodancs commented Jul 1, 2023

@thexperiments Your answer actually helped me, thank you! I was also migrating from an old MySQL server to PostgreSQL. The only thing I needed to change in your query was the table_schema condition since mine is called public not nextcloud.

@SNThrailkill
Copy link

@thexperiments a huge thank you for saving me from days of headaches. That was exactly the answer!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants