nextcloud / circles

👪 Create groups with other users on a Nextcloud instance and share with them
GNU Affero General Public License v3.0
145 stars 48 forks source link

Circles fails to uppgrade when upgrading from nextcloud 16.0.5 to 17.0.1 #357

Closed ArmyOfMonkies closed 4 months ago

ArmyOfMonkies commented 4 years ago

When doing an uppgrade from nextcloud 16.0.5 to 17.0.1 using the web based uppdater circles refuse to upgrade and cant be used in the upgraded nextcloud 17.0.1 instance.

A possible issue is that the web based uppgrader flagged 16.0.6 to be available when i started it. And i was expecting to get 16.0.6 but the updater then proceeded to install 17.0.1

After upgrade and me manualy disabling circles from the command line nextcloud 17.0.1 starts and works as expected. But circles can not be enabled.

Currenctly the web interface repports Circles 0.17.10 to be installed but disabled. If i try to enable it i get the following error.

An exception occurred while executing 'CREATE TABLE oc_circles_links ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, status SMALLINT NOT NULL, unique_id VARCHAR(64) DEFAULT NULL COLLATE BINARY, address VARCHAR(128) NOT NULL COLLATE BINARY, token VARCHAR(64) NOT NULL COLLATE BINARY, "key" VARCHAR(64) NOT NULL COLLATE BINARY, creation DATETIME DEFAULT NULL, circle_id VARCHAR(64) NOT NULL COLLATE BINARY, PRIMARY KEY(id))': SQLSTATE[HY000]: General error: 1 table "oc_circles_links" has more than one primary key

I have tried the barbarian error resolving procedure ( click remove, reinstall and hope for the best ) but no luck.

I have grabbed the current oc_cricles_links table schema from the database in case that might be of help diagnosing the issue.

sqlite> .schema oc_circles_links
CREATE TABLE oc_circles_links (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, status SMALLINT NOT NULL, unique_id VARCHAR(64) DEFAULT NULL COLLATE BINARY, address VARCHAR(128) NOT NULL COLLATE BINARY, token VARCHAR(64) NOT NULL COLLATE BINARY, "key" VARCHAR(64) NOT NULL COLLATE BINARY, creation DATETIME DEFAULT NULL, circle_id VARCHAR(64) NOT NULL COLLATE BINARY);
sqlite> ^C

The basic server config as following ( grabbed from within nextcloud )

Server configuration detail

Operating system: Linux 4.15.0-66-generic #75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019 x86_64

Webserver: Apache/2.4.29 (Ubuntu) (apache2handler)

Database: sqlite3 3.22.0

PHP version: 7.2.24-0ubuntu0.18.04.1

Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, sodium, session, standard, apache2handler, PDO, xml, apcu, apc, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, iconv, imagick, intl, json, ldap, exif, pdo_sqlite, Phar, posix, readline, shmop, SimpleXML, sockets, sqlite3, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlwriter, xsl, zip, Zend OPcache

Nextcloud version: 17.0.1 - 17.0.1.1

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from: unknown

<details><summary>Signing status</summary>

Array ( )

</details>

<details><summary>List of activated apps</summary>

Enabled:
 - accessibility: 1.3.0
 - activity: 2.10.1
 - admin_audit: 1.7.0
 - apporder: 0.8.0
 - audioplayer: 2.8.4
 - bookmarks: 2.3.1
 - bruteforcesettings: 1.4.0
 - calendar: 1.7.1
 - carnet: 0.18.7
 - cloud_federation_api: 1.0.0
 - comments: 1.7.0
 - contacts: 3.1.6
 - dav: 1.13.0
 - encryption: 2.5.0
 - federatedfilesharing: 1.7.0
 - federation: 1.7.0
 - files: 1.12.0
 - files_downloadactivity: 1.6.0
 - files_mindmap: 0.0.15
 - files_pdfviewer: 1.6.0
 - files_rightclick: 0.15.1
 - files_sharing: 1.9.0
 - files_trashbin: 1.7.0
 - files_versions: 1.10.0
 - files_videoplayer: 1.6.0
 - firstrunwizard: 2.6.0
 - gallery: 18.4.0
 - gpxpod: 4.1.0
 - logreader: 2.2.0
 - lookup_server_connector: 1.5.0
 - metadata: 0.10.0
 - news: 14.0.1
 - nextcloud_announcements: 1.6.0
 - notes: 3.0.3
 - notifications: 2.5.0
 - oauth2: 1.5.0
 - ocr: 4.4.16
 - onlyoffice: 3.0.2
 - ownbackup: 19.9.0
 - password_policy: 1.7.0
 - passwords: 2019.11.1
 - privacy: 1.1.0
 - provisioning_api: 1.7.0
 - qownnotesapi: 19.9.0
 - quicknotes: 0.2.1
 - recommendations: 0.5.0
 - serverinfo: 1.7.0
 - sharebymail: 1.7.0
 - social: 0.2.101
 - spreed: 7.0.2
 - support: 1.0.1
 - survey_client: 1.5.0
 - systemtags: 1.7.0
 - tasks: 0.11.3
 - text: 1.1.1
 - theming: 1.8.0
 - twofactor_backupcodes: 1.6.0
 - twofactor_totp: 4.0.0
 - updatenotification: 1.7.0
 - user_ldap: 1.7.0
 - viewer: 1.2.0
 - workflowengine: 1.7.0
Disabled:
 - circles
 - deck
 - external
 - files_accesscontrol
 - files_automatedtagging
 - files_ebookreader
 - files_external
 - files_opds
 - files_retention
 - groupfolders
 - music
 - twofactor_u2f

</details>

<details><summary>Configuration (config/config.php)</summary>

{
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "localhost",
        "myhost",
        "mydomain.com",
        "mydomain2.com"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "sqlite3",
    "version": "17.0.1.1",
    "installed": true,
    "forcessl": true,
    "appcodechecker": false,
    "theme": "",
    "maintenance": false,
    "secret": "***REMOVED SENSITIVE VALUE***",
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpmode": "smtp",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "appstore.experimental.enabled": true,
    "loglevel": 0,
    "trashbin_retention_obligation": "auto",
    "enabledPreviewProviders": [
        "OC\\Preview\\Image",
        "OC\\Preview\\MP3",
        "OC\\Preview\\TXT",
        "OC\\Preview\\MarkDown",
        "OC\\Preview\\Epub",
        "OC\\Preview\\PDF"
    ],
    "updatechecker": false,
    "overwrite.cli.url": "https:\/\/mydomain.com",
    "ldapIgnoreNamingRules": false,
    "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
    "memcache.local": "\\OC\\Memcache\\APCu",
    "app_install_overwrite": [
        "files_opds"
    ],
    "has_rebuilt_cache": true,
    "updater.secret": "***REMOVED SENSITIVE VALUE***"
}

</details>

External storages: files_external is disabled

Encryption: no

User-backends:

OC\User\Database

Browser: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36
joshtrichards commented 4 months ago

Fixed in #355