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]: Error when updating to Nextcloud Version 29: InvalidArgumentException: Index name "share_id_index" for table "oc_onlyoffice_permissions" collides with the constraint on table "oc_federated_reshares". #45271

Closed
5 of 8 tasks
ChangnamOfMyr opened this issue May 11, 2024 · 5 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug

Comments

@ChangnamOfMyr
Copy link

ChangnamOfMyr commented May 11, 2024

⚠️ This issue respects the following points: ⚠️

Bug description

I tried to update Nextloud to Version 29 via the Nexcloud Webinterface.
Then i got the following Error and the Updater said i should report this Error to this Community.

Update vorbereiten
Log-Level auf "debug" gesetzt
Wartungsmodus eingeschaltet
Reparaturschritt: Repair MySQL collation
Reparaturinformation: All tables already have the correct collation -> nothing to do
Reparaturschritt: Copy data from accounts table when migrating from ownCloud
Reparaturschritt: Drop account terms table when migrating from ownCloud
Das Datenbankschema wird aktualisiert
Datenbank aktualisiert
InvalidArgumentException: Index name "share_id_index" for table "oc_onlyoffice_permissions" collides with the constraint on table "oc_federated_reshares".

I saw a sililar post regarding an upgrade to Version 28 and tried to drop the index from the Database tables but the tables "oc_onlyoffice_permissions" and "oc_federated_reshares" seem to be empty.

Steps to reproduce

  1. Go to Nextcloud Settings
  2. Click on Update

Expected behavior

Updating successfully to version 29.

Installation method

Community Web installer on a VPS or web space

Nextcloud Server version

28

Operating system

None

PHP engine version

PHP 8.1

Web server

None

Database engine version

MySQL

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

Upgraded to a MAJOR version (ex. 22 to 23)

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

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

Configuration report

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

This form wants me to add a Configuration report and a list of activated apps, but i dont know how to get them as i dont have admin permissions on the Webserver.
The nextcloud Log is a 300Mb txt file and i cant copy it to this form as the Website crashes when i try to paste it here.

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

joshtrichards commented May 11, 2024

Since this is in the OnlyOffice integration app you'll need to report this to them:

https://github.com/ONLYOFFICE/onlyoffice-nextcloud

It does look like they attempted to replace this overlapping index name, but I see the old one in a prior migration so maybe there's more to it. I didn't look too closely:

https://github.com/search?q=repo%3AONLYOFFICE%2Fonlyoffice-nextcloud%20share_id_index&type=code

This form wants me to add a Configuration report and a list of activated apps, but i dont know how to get them as i dont have admin permissions on the Webserver.

That's fine since we likely won't need them now in this case, but for future reference the easiest way to do this is from the command line via the occ command. See https://docs.nextcloud.com.

@joshtrichards joshtrichards closed this as not planned Won't fix, can't repro, duplicate, stale May 11, 2024
@joshtrichards
Copy link
Member

Meant to add: If you need help cleaning up the database tables/indexes post a query on the Community Help Forum

@AndreasB92
Copy link

Could you maybe tell me in very simple language what I have to do here? I get the same error when I want to update to version 29. I don't even want to use Only Office App and deleted it but I still get that error and can only load previous backups.

@joshtrichards
Copy link
Member

joshtrichards commented May 14, 2024

@AndreasB92 If you need help cleaning up the database tables/indexes post a query on the Community Help Forum

@p4ck3t0
Copy link

p4ck3t0 commented May 19, 2024

Hi @AndreasB92 ,

I had the exact same issue. I resolved it by running the following query against my database (MariaDB):

DROP INDEX share_id_index ON oc_onlyoffice_permissions;

This query, drops the index for table oc_onlyoffice_permissions. Afterwards the migration runs through and everything seems to work.

Hope that helps.

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

4 participants