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

[Bug]: 28.0.10 to 29.0.7 upgrade fails with index collision #48263

Closed
5 of 8 tasks
zaggynl opened this issue Sep 21, 2024 · 1 comment
Closed
5 of 8 tasks

[Bug]: 28.0.10 to 29.0.7 upgrade fails with index collision #48263

zaggynl opened this issue Sep 21, 2024 · 1 comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug

Comments

@zaggynl
Copy link

zaggynl commented Sep 21, 2024

⚠️ This issue respects the following points: ⚠️

Bug description

Upgrade from Nextcloud server 28.0.10 to 29.0.7 fails with:

sudo -u www-data php 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
Turned on maintenance mode
Updating database schema
Updated database
Disabled incompatible app: bookmarks
Disabled incompatible app: calendar
Disabled incompatible app: cfg_share_links
Disabled incompatible app: checksum
Disabled incompatible app: contacts
Disabled incompatible app: keeweb
Disabled incompatible app: maps
Disabled incompatible app: music
Disabled incompatible app: notes
Disabled incompatible app: onlyoffice
Disabled incompatible app: phonetrack
Disabled incompatible app: riotchat
Disabled incompatible app: spreed
Disabled incompatible app: twofactor_nextcloud_notification
Updating <federation> ...
Updated <federation> to 1.19.0
Updating <lookup_server_connector> ...
Updated <lookup_server_connector> to 1.17.0
Updating <oauth2> ...
Updated <oauth2> to 1.17.1
Updating <password_policy> ...
Updated <password_policy> to 1.19.0
Updating <photos> ...
Updated <photos> to 2.5.0
Updating <suspicious_login> ...
Updated <suspicious_login> to 7.0.0
Updating <files> ...
Updated <files> to 2.1.1
Updating <activity> ...
Updated <activity> to 2.21.1
Updating <cloud_federation_api> ...
Updated <cloud_federation_api> to 1.12.0
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
    0/0 [----->----------------------]   0%
Updated <dav> to 1.30.1
Updating <files_external> ...
Updated <files_external> to 1.21.0
Updating <files_sharing> ...
Fix broken values of calendar objects
 Done
    0/0 [--------->------------------]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
    0/0 [------------->--------------]   0%
Updated <files_sharing> to 1.21.0
Updating <files_trashbin> ...
Updated <files_trashbin> to 1.19.0
Updating <files_versions> ...
Updated <files_versions> to 1.22.0
Updating <sharebymail> ...
Updated <sharebymail> to 1.19.0
Updating <workflowengine> ...
Fix broken values of calendar objects
 Done
    0/0 [---------------->-----------]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
    0/0 [-------------------->-------]   0%
Updated <workflowengine> to 2.11.0
Updating <admin_audit> ...
Updated <admin_audit> to 1.19.0
Updating <comments> ...
Updated <comments> to 1.19.0
Updating <firstrunwizard> ...
Updated <firstrunwizard> to 2.18.0
Updating <logreader> ...
Updated <logreader> to 2.14.0
Updating <nextcloud_announcements> ...
Updated <nextcloud_announcements> to 1.18.0
Updating <notifications> ...
Updated <notifications> to 2.17.0
Updating <systemtags> ...
Updated <systemtags> to 1.19.0
Updating <theming> ...
Fix broken values of calendar objects
 Done
    0/0 [------------------------>---]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
    0/0 [>---------------------------]   0%
Updated <theming> to 2.4.0
Updating <bruteforcesettings> ...
Updated <bruteforcesettings> to 2.9.0
Updating <contactsinteraction> ...
Updated <contactsinteraction> to 1.10.0
Updating <dashboard> ...
Updated <dashboard> to 7.9.0
Updating <federatedfilesharing> ...
Updated <federatedfilesharing> to 1.19.0
Updating <files_pdfviewer> ...
Updated <files_pdfviewer> to 2.10.0
Updating <files_reminders> ...
Updated <files_reminders> to 1.2.0
Updating <privacy> ...
Updated <privacy> to 1.13.0
Updating <provisioning_api> ...
Updated <provisioning_api> to 1.19.0
Updating <recommendations> ...
Updated <recommendations> to 2.1.0
Updating <related_resources> ...
Updated <related_resources> to 1.4.0
Updating <serverinfo> ...
Updated <serverinfo> to 1.19.0
Updating <settings> ...
Updated <settings> to 1.12.0
Updating <support> ...
Fix broken values of calendar objects
 Done
    0/0 [--->------------------------]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
    0/0 [------->--------------------]   0%
Updated <support> to 1.12.0
Updating <survey_client> ...
Fix broken values of calendar objects
 Done
    0/0 [----------->----------------]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
    0/0 [-------------->-------------]   0%
Updated <survey_client> to 1.17.0
Updating <text> ...
Fix broken values of calendar objects
 Done
    0/0 [------------------>---------]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
    0/0 [---------------------->-----]   0%
Updated <text> to 3.10.1
Updating <twofactor_backupcodes> ...
Fix broken values of calendar objects
 Done
    0/0 [-------------------------->-]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
    0/0 [->--------------------------]   0%
Updated <twofactor_backupcodes> to 1.18.0
Updating <twofactor_totp> ...
Updated <twofactor_totp> to 11.0.0-dev
Updating <updatenotification> ...
Updated <updatenotification> to 1.19.1
Updating <user_status> ...
Updated <user_status> to 1.9.0
Updating <viewer> ...
Updated <viewer> to 2.3.0
Updating <weather_status> ...
Updated <weather_status> to 1.9.0
Fix broken values of calendar objects
 Done
    0/0 [----->----------------------]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
    0/0 [--------->------------------]   0%
Fix broken values of calendar objects
 Done
    0/0 [------------->--------------]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
    0/0 [---------------->-----------]   0%
Fix broken values of calendar objects
 Done
    0/0 [-------------------->-------]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
    0/0 [------------------------>---]   0%
Fix broken values of calendar objects
 Done
    0/0 [>---------------------------]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
    0/0 [--->------------------------]   0%
Fix broken values of calendar objects
 Done
    0/0 [------->--------------------]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
    0/0 [----------->----------------]   0%
Fix broken values of calendar objects
 Done
    0/0 [-------------->-------------]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
    0/0 [------------------>---------]   0%
Fix broken values of calendar objects
 Done
    0/0 [---------------------->-----]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
    0/0 [-------------------------->-]   0%
Fix broken values of calendar objects
 Done
    0/0 [->--------------------------]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
    0/0 [----->----------------------]   0%
Fix broken values of calendar objects
 Done
    0/0 [--------->------------------]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
    0/0 [------------->--------------]   0%
InvalidArgumentException: Index name "nid" for table "oc_social_3_stream" collides with the constraint on table "oc_social_3_cache_actor".
Update failed

Steps to reproduce

1.manually upgrade from nextcloud 28.0.10 to 29.0.7 with these steps: https://docs.nextcloud.com/server/28/admin_manual/maintenance/manual_upgrade.html?highlight=upgrade
2.observe error
3.roll back vm snapshot and nextcloud data snapshot (hurray for snapshots and backups!)

Expected behavior

Upgrade to NC 29, fix some indices maybe.

Nextcloud Server version

28

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.1

Web server

Nginx

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Upgraded to a MAJOR version (ex. 28 to 29)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

sudo -u www-data php 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
Turned on maintenance mode
Updating database schema
Updated database
Disabled incompatible app: bookmarks
Disabled incompatible app: calendar
Disabled incompatible app: cfg_share_links
Disabled incompatible app: checksum
Disabled incompatible app: contacts
Disabled incompatible app: keeweb
Disabled incompatible app: maps
Disabled incompatible app: music
Disabled incompatible app: notes
Disabled incompatible app: onlyoffice
Disabled incompatible app: phonetrack
Disabled incompatible app: riotchat
Disabled incompatible app: spreed
Disabled incompatible app: twofactor_nextcloud_notification
Updating <federation> ...
Updated <federation> to 1.19.0
Updating <lookup_server_connector> ...
Updated <lookup_server_connector> to 1.17.0
Updating <oauth2> ...
Updated <oauth2> to 1.17.1
Updating <password_policy> ...
Updated <password_policy> to 1.19.0
Updating <photos> ...
Updated <photos> to 2.5.0
Updating <suspicious_login> ...
Updated <suspicious_login> to 7.0.0
Updating <files> ...
Updated <files> to 2.1.1
Updating <activity> ...
Updated <activity> to 2.21.1
Updating <cloud_federation_api> ...
Updated <cloud_federation_api> to 1.12.0
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
    0/0 [----->----------------------]   0%
Updated <dav> to 1.30.1
Updating <files_external> ...
Updated <files_external> to 1.21.0
Updating <files_sharing> ...
Fix broken values of calendar objects
 Done
    0/0 [--------->------------------]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
    0/0 [------------->--------------]   0%
Updated <files_sharing> to 1.21.0
Updating <files_trashbin> ...
Updated <files_trashbin> to 1.19.0
Updating <files_versions> ...
Updated <files_versions> to 1.22.0
Updating <sharebymail> ...
Updated <sharebymail> to 1.19.0
Updating <workflowengine> ...
Fix broken values of calendar objects
 Done
    0/0 [---------------->-----------]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
    0/0 [-------------------->-------]   0%
Updated <workflowengine> to 2.11.0
Updating <admin_audit> ...
Updated <admin_audit> to 1.19.0
Updating <comments> ...
Updated <comments> to 1.19.0
Updating <firstrunwizard> ...
Updated <firstrunwizard> to 2.18.0
Updating <logreader> ...
Updated <logreader> to 2.14.0
Updating <nextcloud_announcements> ...
Updated <nextcloud_announcements> to 1.18.0
Updating <notifications> ...
Updated <notifications> to 2.17.0
Updating <systemtags> ...
Updated <systemtags> to 1.19.0
Updating <theming> ...
Fix broken values of calendar objects
 Done
    0/0 [------------------------>---]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
    0/0 [>---------------------------]   0%
Updated <theming> to 2.4.0
Updating <bruteforcesettings> ...
Updated <bruteforcesettings> to 2.9.0
Updating <contactsinteraction> ...
Updated <contactsinteraction> to 1.10.0
Updating <dashboard> ...
Updated <dashboard> to 7.9.0
Updating <federatedfilesharing> ...
Updated <federatedfilesharing> to 1.19.0
Updating <files_pdfviewer> ...
Updated <files_pdfviewer> to 2.10.0
Updating <files_reminders> ...
Updated <files_reminders> to 1.2.0
Updating <privacy> ...
Updated <privacy> to 1.13.0
Updating <provisioning_api> ...
Updated <provisioning_api> to 1.19.0
Updating <recommendations> ...
Updated <recommendations> to 2.1.0
Updating <related_resources> ...
Updated <related_resources> to 1.4.0
Updating <serverinfo> ...
Updated <serverinfo> to 1.19.0
Updating <settings> ...
Updated <settings> to 1.12.0
Updating <support> ...
Fix broken values of calendar objects
 Done
    0/0 [--->------------------------]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
    0/0 [------->--------------------]   0%
Updated <support> to 1.12.0
Updating <survey_client> ...
Fix broken values of calendar objects
 Done
    0/0 [----------->----------------]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
    0/0 [-------------->-------------]   0%
Updated <survey_client> to 1.17.0
Updating <text> ...
Fix broken values of calendar objects
 Done
    0/0 [------------------>---------]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
    0/0 [---------------------->-----]   0%
Updated <text> to 3.10.1
Updating <twofactor_backupcodes> ...
Fix broken values of calendar objects
 Done
    0/0 [-------------------------->-]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
    0/0 [->--------------------------]   0%
Updated <twofactor_backupcodes> to 1.18.0
Updating <twofactor_totp> ...
Updated <twofactor_totp> to 11.0.0-dev
Updating <updatenotification> ...
Updated <updatenotification> to 1.19.1
Updating <user_status> ...
Updated <user_status> to 1.9.0
Updating <viewer> ...
Updated <viewer> to 2.3.0
Updating <weather_status> ...
Updated <weather_status> to 1.9.0
Fix broken values of calendar objects
 Done
    0/0 [----->----------------------]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
    0/0 [--------->------------------]   0%
Fix broken values of calendar objects
 Done
    0/0 [------------->--------------]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
    0/0 [---------------->-----------]   0%
Fix broken values of calendar objects
 Done
    0/0 [-------------------->-------]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
    0/0 [------------------------>---]   0%
Fix broken values of calendar objects
 Done
    0/0 [>---------------------------]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
    0/0 [--->------------------------]   0%
Fix broken values of calendar objects
 Done
    0/0 [------->--------------------]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
    0/0 [----------->----------------]   0%
Fix broken values of calendar objects
 Done
    0/0 [-------------->-------------]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
    0/0 [------------------>---------]   0%
Fix broken values of calendar objects
 Done
    0/0 [---------------------->-----]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
    0/0 [-------------------------->-]   0%
Fix broken values of calendar objects
 Done
    0/0 [->--------------------------]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
    0/0 [----->----------------------]   0%
Fix broken values of calendar objects
 Done
    0/0 [--------->------------------]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
    0/0 [------------->--------------]   0%
InvalidArgumentException: Index name "nid" for table "oc_social_3_stream" collides with the constraint on table "oc_social_3_cache_actor".
Update failed

List of activated Apps

Enabled:
  - activity: 2.20.0
  - admin_audit: 1.18.0
  - bookmarks: 14.2.5
  - bruteforcesettings: 2.8.0
  - calendar: 4.7.16
  - cfg_share_links: 5.1.3
  - checksum: 1.2.4
  - cloud_federation_api: 1.11.0
  - comments: 1.18.0
  - contacts: 5.5.3
  - contactsinteraction: 1.9.0
  - dashboard: 7.8.0
  - dav: 1.29.2
  - federatedfilesharing: 1.18.0
  - federation: 1.18.0
  - files: 2.0.0
  - files_external: 1.20.0
  - files_pdfviewer: 2.9.0
  - files_reminders: 1.1.0
  - files_sharing: 1.20.0
  - files_trashbin: 1.18.0
  - files_versions: 1.21.0
  - firstrunwizard: 2.17.0
  - keeweb: 0.6.19
  - logreader: 2.13.0
  - lookup_server_connector: 1.16.0
  - maps: 1.4.0
  - music: 2.0.1
  - nextcloud_announcements: 1.17.0
  - notes: 4.11.0
  - notifications: 2.16.0
  - oauth2: 1.16.4
  - onlyoffice: 9.4.0
  - password_policy: 1.18.0
  - phonetrack: 0.8.1
  - photos: 2.4.0
  - privacy: 1.12.0
  - provisioning_api: 1.18.0
  - recommendations: 2.0.0
  - related_resources: 1.3.0
  - riotchat: 0.18.0
  - serverinfo: 1.18.0
  - settings: 1.10.1
  - sharebymail: 1.18.0
  - spreed: 18.0.11
  - support: 1.11.1
  - survey_client: 1.16.0
  - suspicious_login: 6.0.0
  - systemtags: 1.18.0
  - text: 3.9.2
  - theming: 2.3.0
  - twofactor_backupcodes: 1.17.0
  - twofactor_nextcloud_notification: 3.9.0
  - twofactor_totp: 10.0.0-beta.2
  - updatenotification: 1.18.0
  - user_status: 1.8.1
  - viewer: 2.2.0
  - weather_status: 1.8.0
  - workflowengine: 2.10.0
Disabled:
  - circles: 28.0.0 (installed 0.21.2)
  - encryption: 2.16.0 (installed 2.3.0)
  - user_ldap: 1.19.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

No response

Additional info

No response

@zaggynl zaggynl added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Sep 21, 2024
@joshtrichards
Copy link
Member

InvalidArgumentException: Index name "nid" for table "oc_social_3_stream" collides with the constraint on table "oc_social_3_cache_actor".

This appears to be a remnant of some long forgotten prior installation of the social app in your environment. That's not even the current name of the db tables used by that app.

You'll need to drop the social_3_* table(s). See:

Or search the help forum: https://help.nextcloud.com

@joshtrichards joshtrichards closed this as not planned Won't fix, can't repro, duplicate, stale Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug
Projects
None yet
Development

No branches or pull requests

2 participants