circles icon indicating copy to clipboard operation
circles copied to clipboard

SQLSTATE Exception when sharing a folder with a circle

Open ernieballslinky opened this issue 3 years ago • 1 comments

Describe the bug An exception occurred while executing INSERT INTO oc_circle_circles

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Circle App'
  2. Click on 'Create an new Public Circle?
  3. Add member to the Circle previously created
  4. Create a folder into Nextcloud
  5. Share the folder with the Circle previously created
  6. A pop appears with an exception
  7. After refreshing the browser the folder is correctly shared with the Circle

Expected behavior No exception must appear after sharing a folder with a Circle

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser chrome
  • Version 20

Browser log

Open your console, reload your page and/or do the action leading to this issue and copy/paste the log in this thread.

Additional context Log in Nextcloud [circles] Fatal: {"type":"1","name":"test_upgrade_20","error":"An exception occurred while executing 'INSERT INTO "oc_circle_circles" ("creation", "unique_id", "long_id", "name", "alt_name", "description", "contact_addressbook", "contact_groupname", "settings", "type") VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params ["2021-03-07 14:07:00", "c496283e2cef94", "c496283e2cef94f071275eb8ca9c53edaf152a458bfb74c0", "test_upgrade_20", "", "", 0, "", "[]", 1]:\n\nSQLSTATE[23505]: Unique violation: 7 ERROR: duplicate key value violates unique constraint "oc_circle_circles_pkey"\nDETAIL: Key (id)=(6) already exists."}

PUT /index.php/apps/circles/v1/circles

ernieballslinky avatar Mar 12 '21 08:03 ernieballslinky

We had a user report a similar issue (same conditions) but with the oc_circles_share table instead:

Error creating the share: An exception occurred while executing a query: SQLSTATE[23505]: Unique violation: 7 ERROR: duplicate key value violates unique constraint "oc_circle_shares_pkey" DETAIL: Key (id)=(172) already exists.

We are running postgresq as the back end (and the oc_circles_shares_seq table reports the right value for the next id. I wasn't able to capture the sql statement.

jmcclelland avatar Jul 07 '21 19:07 jmcclelland

Duplicate of #570 (effectively).

joshtrichards avatar Jun 13 '24 21:06 joshtrichards