Nextcloud 23 upgrade problem: dav app

Hi,

I tried to update my nextcloud to the new version 23, but I cannot upgrade successfully. I´ve tried the command line, but this php error is thrown:

Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Setting log level to debug
Updating database schema
Updated database
Updating <dav> ...
Fix broken values of calendar objects

 Done
    0/0 [->--------------------------]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
 6/6 [============================] 100%
An unhandled exception has been thrown:
TypeError: OCA\DAV\Migration\RemoveDeletedUsersCalendarSubscriptions::deleteOrphanSubscription(): Argument #1 ($orphanSubscriptionID) must be of type int, string given, called in /var/kunden/feuer/httpdocs/nextcloud/apps/dav/lib/Migration/RemoveDeletedUsersCalendarSubscriptions.php on line 126 and defined in /var/kunden/feuer/httpdocs/nextcloud/apps/dav/lib/Migration/RemoveDeletedUsersCalendarSubscriptions.php:133
Stack trace:
#0 /var/kunden/feuer/httpdocs/nextcloud/apps/dav/lib/Migration/RemoveDeletedUsersCalendarSubscriptions.php(126): OCA\DAV\Migration\RemoveDeletedUsersCalendarSubscriptions->deleteOrphanSubscription()
#1 /var/kunden/feuer/httpdocs/nextcloud/apps/dav/lib/Migration/RemoveDeletedUsersCalendarSubscriptions.php(75): OCA\DAV\Migration\RemoveDeletedUsersCalendarSubscriptions->deleteOrphanSubscriptions()
#2 /var/kunden/feuer/httpdocs/nextcloud/lib/private/Repair.php(123): OCA\DAV\Migration\RemoveDeletedUsersCalendarSubscriptions->run()
#3 /var/kunden/feuer/httpdocs/nextcloud/lib/private/legacy/OC_App.php(1071): OC\Repair->run()
#4 /var/kunden/feuer/httpdocs/nextcloud/lib/private/legacy/OC_App.php(1013): OC_App::executeRepairSteps()
#5 /var/kunden/feuer/httpdocs/nextcloud/lib/private/Updater.php(353): OC_App::updateApp()
#6 /var/kunden/feuer/httpdocs/nextcloud/lib/private/Updater.php(265): OC\Updater->doAppUpgrade()
#7 /var/kunden/feuer/httpdocs/nextcloud/lib/private/Updater.php(133): OC\Updater->doUpgrade()
#8 /var/kunden/feuer/httpdocs/nextcloud/core/Command/Upgrade.php(235): OC\Updater->upgrade()
#9 /var/kunden/feuer/httpdocs/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\Upgrade->execute()
#10 /var/kunden/feuer/httpdocs/nextcloud/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#11 /var/kunden/feuer/httpdocs/nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#12 /var/kunden/feuer/httpdocs/nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#13 /var/kunden/feuer/httpdocs/nextcloud/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run()
#14 /var/kunden/feuer/httpdocs/nextcloud/console.php(99): OC\Console\Application->run()
#15 /var/kunden/feuer/httpdocs/nextcloud/occ(11): require_once('...')

Has anyone a hint?

sadly you haven’t added enough details and infos about your instance… :frowning:

Nextcloud version: 22.2.3
Operating system and version: debian 11
nginx version: 1.20.2
PHP version: 7.3

App list:

Enabled:
  - accessibility: 1.8.0
  - activity: 2.15.0
  - calendar: 3.0.0
  - circles: 22.1.1
  - cloud_federation_api: 1.5.0
  - comments: 1.12.0
  - contacts: 4.0.6
  - contactsinteraction: 1.3.0
  - dashboard: 7.2.0
  - dav: 1.19.0
  - federatedfilesharing: 1.12.0
  - federation: 1.12.0
  - files: 1.17.0
  - files_pdfviewer: 2.3.1
  - files_rightclick: 1.1.0
  - files_sharing: 1.14.0
  - files_trashbin: 1.12.0
  - files_versions: 1.15.0
  - files_videoplayer: 1.11.0
  - firstrunwizard: 2.11.0
  - logreader: 2.7.0
  - lookup_server_connector: 1.10.0
  - nextcloud_announcements: 1.11.0
  - notifications: 2.10.1
  - oauth2: 1.10.0
  - password_policy: 1.12.0
  - photos: 1.4.0
  - privacy: 1.6.0
  - provisioning_api: 1.12.0
  - recommendations: 1.1.0
  - richdocuments: 4.2.3
  - serverinfo: 1.12.0
  - settings: 1.4.0
  - sharebymail: 1.12.0
  - support: 1.5.0
  - survey_client: 1.10.0
  - systemtags: 1.12.0
  - text: 3.3.0
  - theming: 1.13.0
  - twofactor_backupcodes: 1.11.0
  - updatenotification: 1.12.0
  - user_status: 1.2.0
  - viewer: 1.6.0
  - weather_status: 1.2.0
  - workflowengine: 2.4.0
Disabled:
  - admin_audit
  - bruteforcesettings
  - encryption
  - files_external
  - files_markdown
  - mail
  - polls
  - user_ldap

how and where is it hosted?

On my vm / root server at netcup.

For info, I have the same issue.

Nextcloud (was) version: 22.2.3
Upgrading to: 23.0.0
OS: Fedora 35
Web server: apache
PHP: v8.0.13

App list enabled:

  • accessibility: 1.8.0
  • activity: 2.15.0
  • admin_audit: 1.12.0
  • announcementcenter: 6.1.1
  • apporder: 0.13.0
  • bookmarks: 10.0.2
  • bruteforcesettings: 2.2.0
  • calendar: 2.3.4
  • camerarawpreviews: 0.7.13
  • checksum: 1.1.2
  • circles: 22.1.1
  • cloud_federation_api: 1.5.0
  • comments: 1.12.0
  • contacts: 4.0.6
  • contactsinteraction: 1.3.0
  • dashboard: 7.2.0
  • dav: 1.19.0
  • deck: 1.5.5
  • documentserver_community: 0.1.11
  • drawio: 1.0.1
  • event_update_notification: 1.3.0
  • federatedfilesharing: 1.12.0
  • federation: 1.12.0
  • files: 1.17.0
  • files_downloadactivity: 1.11.1
  • files_pdfviewer: 2.3.1
  • files_rightclick: 1.1.0
  • files_sharing: 1.14.0
  • files_trashbin: 1.12.0
  • files_versions: 1.15.0
  • files_videoplayer: 1.11.0
  • firstrunwizard: 2.11.0
  • gpxpod: 4.3.0
  • integration_dropbox: 1.0.4
  • integration_mastodon: 1.0.2
  • lookup_server_connector: 1.10.0
  • mail: 1.10.5
  • maps: 0.1.9
  • metadata: 0.14.0
  • news: 16.2.1
  • nextcloud_announcements: 1.11.0
  • notifications: 2.10.1
  • oauth2: 1.10.0
  • password_policy: 1.12.0
  • passwords: 2021.11.20
  • photos: 1.4.0
  • privacy: 1.6.0
  • provisioning_api: 1.12.0
  • ransomware_protection: 1.11.0
  • recognize: 1.6.10
  • recommendations: 1.1.0
  • riotchat: 0.9.10
  • serverinfo: 1.12.0
  • settings: 1.4.0
  • sharebymail: 1.12.0
  • spreed: 12.1.2
  • systemtags: 1.12.0
  • talk_matterbridge: 1.22.4
  • text: 3.3.0
  • theming: 1.13.0
  • twofactor_backupcodes: 1.11.0
  • twofactor_email: 2.1.1
  • twofactor_nextcloud_notification: 3.3.1
  • twofactor_totp: 6.1.0
  • twofactor_u2f: 6.2.0
  • updatenotification: 1.12.0
  • user_pwauth: 2.7.2
  • user_status: 1.2.0
  • viewer: 1.6.0
  • weather_status: 1.2.0
  • workflowengine: 2.4.0

occ upgrade
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Setting log level to debug
Updating database schema
Updated database
Updating …
Fix broken values of calendar objects

Done
0/0 [->--------------------------] 0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
Done
1/1 [============================] 100%
An unhandled exception has been thrown:
TypeError: OCA\DAV\Migration\RemoveDeletedUsersCalendarSubscriptions::deleteOrphanSubscription(): Argument #1 ($orphanSubscriptionID) must be of type int, string given, called in /usr/share/nextcloud/apps/dav/lib/Migration/RemoveDeletedUsersCalendarSubscriptions.php on line 126 and defined in /usr/share/nextcloud/apps/dav/lib/Migration/RemoveDeletedUsersCalendarSubscriptions.php:133
Stack trace:
#0 /usr/share/nextcloud/apps/dav/lib/Migration/RemoveDeletedUsersCalendarSubscriptions.php(126): OCA\DAV\Migration\RemoveDeletedUsersCalendarSubscriptions->deleteOrphanSubscription()
#1 /usr/share/nextcloud/apps/dav/lib/Migration/RemoveDeletedUsersCalendarSubscriptions.php(75): OCA\DAV\Migration\RemoveDeletedUsersCalendarSubscriptions->deleteOrphanSubscriptions()
#2 /usr/share/nextcloud/lib/private/Repair.php(123): OCA\DAV\Migration\RemoveDeletedUsersCalendarSubscriptions->run()
#3 /usr/share/nextcloud/lib/private/legacy/OC_App.php(1071): OC\Repair->run()
#4 /usr/share/nextcloud/lib/private/legacy/OC_App.php(1013): OC_App::executeRepairSteps()
#5 /usr/share/nextcloud/lib/private/Updater.php(353): OC_App::updateApp()
#6 /usr/share/nextcloud/lib/private/Updater.php(265): OC\Updater->doAppUpgrade()
#7 /usr/share/nextcloud/lib/private/Updater.php(133): OC\Updater->doUpgrade()
#8 /usr/share/nextcloud/core/Command/Upgrade.php(235): OC\Updater->upgrade()
#9 /usr/share/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\Upgrade->execute()
#10 /usr/share/nextcloud/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#11 /usr/share/nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#12 /usr/share/nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#13 /usr/share/nextcloud/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run()
#14 /usr/share/nextcloud/console.php(99): OC\Console\Application->run()
#15 /usr/share/nextcloud/occ(11): require_once(’/usr/share/next…’)
#16 {main}

Hello, we have the same problems.
Two NC instance update running fine, one this problem?

Hi, i found one entry on **oc_calendarsubscriptions** db tabel, from a deleted user.

I delete it and run repair and upgrade again.

Now it works

I know why this happens. I’ll open a PR.

Cast orphan subscription id to int by ChristophWurst · Pull Request #30001 · nextcloud/server · GitHub will fix this. Thanks for the report.

3 Likes

Hallo, leider bin ich aus den Beiträgen nicht ganz schlau geworden. Gibt es eventuell die Möglichkeit, dass man die Problemlösung in kurzen Zügen beschreibt? Das wäre total hilfreich. Mir ist leider das gleiche beim updaten passiert.

Hello @kuhmic,
go to your phpMyAdmin ( or with what you can edit your databases ) into the right database, search the table “oc_calendarsubscriptions”, in the column “principaluri” can you also see the user names (with very many users, of course, it will be hard).
Now delete the line with which user does not exist anymore (all useres you can find in the table “oc_users”)

3 Likes

@kuhmic

it would be very nice and highly considered polite if you’d keep to the language of thread… which is english… for almost all threads here (except non-english support category… As we are an international forum for users from all over the world.

so I kindly ask you to translate your posting and edit it likewise.

thanks in advance.

1 Like

@steffen

Hallo, vielen lieben Dank für die schnelle Antwort. Du hast mich gerettet. Dein Tipp hat mir sehr geholfen.


@steffen

Hello, thank you very much for the quick reply. You saved me. Your tip helped me a lot.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.