Update error after upgrading from NC 27 to 28beta

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 28.0.0 beta 1
Operating system and version (eg, Ubuntu 20.04): Debian 11 Bullseye x64
Apache or nginx version (eg, Apache 2.4.25): NGINX 1.18.0
PHP version (eg, 7.4): 8.1

The issue you are facing:
Following error after updating from NC 2.7 to 28.

Exception: Database error when running migration 28000Date20230906104802 for app core Index name "sat" for table "oc_social_3_stream_dest" collides with the constraint on table "oc_social_stream_dest".

Is this the first time you’ve seen this error? (Y/N):Y

Steps to replicate it:

  1. Run update command on CLI
  2. Running update from the web
  3. N/A

The output of your config.php file in /path/to/nextcloud:

<?php
$CONFIG = array (
  'instanceid' => 'REMOVED',
  'passwordsalt' => 'REMOVED',
  'secret' => 'REMOVED',
  'trusted_domains' => 
  array (
    0 => 'cloud.myserver.net',
  ),
  'datadirectory' => '/usr/share/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '27.1.3.2',
  'overwrite.cli.url' => 'https://cloud.myserver.net',
  'overwriteprotocol' => 'https',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'REMOVED',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_smtphost' => 'mail.myserver.net',
  'mail_smtpport' => '465',
  'mail_from_address' => 'no-reply',
  'mail_domain' => 'myserver.net',
  'theme' => '',
  'default_phone_region' => 'US',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '127.0.0.1',
    'port' => 6379,
  ),
  'filelocking.enabled' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'app_install_overwrite' => 
  array (
    0 => 'drawio',
    1 => 'dropit',
    2 => 'printer',
    3 => 'transmission',
    4 => 'checksum',
    5 => 'files_external_gdrive',
    6 => 'ocsms',
    7 => 'radio',
    8 => 'uploaddetails',
    9 => 'files_frommail',
    10 => 'ocr',
    11 => 'occweb',
    12 => 'passwords',
    13 => 'socialsharing_email',
    14 => 'bruteforcesettings',
    15 => 'richdocuments',
    16 => 'contacts',
    17 => 'theming_customcss',
    18 => 'side_menu',
    19 => 'extract',
    20 => 'forms',
    21 => 'fulltextsearch',
    22 => 'files_fulltextsearch',
    23 => 'maps',
    24 => 'metadata',
    25 => 'music',
    26 => 'news',
    27 => 'ocdownloader',
    28 => 'registration',
    29 => 'spreed',
    30 => 'social',
    31 => 'talk_matterbridge',
    32 => 'tasks',
    33 => 'video_converter',
    34 => 'twofactor_nextcloud_notification',
    35 => 'talk_simple_poll',
    36 => 'files_retention',
    37 => 'ransomware_protection',
    38 => 'quota_warning',
    39 => 'imageconverter',
    40 => 'breezedark',
    41 => 'apporder',
    42 => 'appointments',
    43 => 'announcementcenter',
    44 => 'files_downloadactivity',
    45 => 'fulltextsearch_elasticsearch',
    46 => 'geoblocker',
    47 => 'files_trackdownloads',
    48 => 'cpanelmailsync',
    49 => 'facerecognition',
    50 => 'flowupload',
    51 => 'ojsxc',
    52 => 'carnet',
    53 => 'group_everyone',
    54 => 'podcast',
    55 => 'cms_pico',
    56 => 'files_antivirus',
    57 => 'deck',
    58 => 'duplicatefinder',
    59 => 'electronicsignatures',
    60 => 'quickaccesssorting',
    61 => 'files_accesscontrol',
    62 => 'files_automatedtagging',
    63 => 'guests',
    64 => 'files_linkeditor',
    65 => 'ncdownloader',
    66 => 'onlyoffice',
    67 => 'recognize',
    68 => 'scanner',
    69 => 'sharerenamer',
    70 => 'timemanager',
    71 => 'uppush',
    72 => 'approval',
    73 => 'external',
    74 => 'gestion',
    75 => 'integration_google',
    76 => 'mediadc',
    77 => 'phonetrack',
    78 => 'passman',
    79 => 'quicknotes',
    80 => 'files_snapshots',
    81 => 'twofactor_email',
    82 => 'unroundedcorners',
    83 => 'user_migration',
    84 => 'files_readmemd',
    85 => 'co2clock',
    86 => 'files_3d',
    87 => 'cfg_share_links',
    88 => 'transfer',
    89 => 'money',
    90 => 'files_archive',
    91 => 'camerarawpreviews',
    92 => 'files_zip',
    93 => 'groupfolders',
    94 => 'externalpassword',
    95 => 'snappymail',
    96 => 'pdfdraw',
    97 => 'sms_relentless',
    98 => 'sensorlogger',
    99 => 'folderplayer',
  ),
  'maintenance' => false,
  'loglevel' => 0,
  'updater.release.channel' => 'beta',
  'mail_smtpsecure' => 'ssl',
  'mail_smtpauthtype' => 'LOGIN',
  'has_rebuilt_cache' => true,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'ncd_admin_settings' => 
  array (
    'ncd_aria2_rpc_host' => '127.0.0.1',
    'focusVisibleAdded' => '',
    'ncd_aria2_rpc_port' => '6800',
    'ncd_aria2_rpc_token' => 'ncdownloader123',
    'ncd_aria2_binary' => '/usr/bin/aria2c',
    'disallow_aria2_settings' => '1',
  ),
  'global_aria2_config' => 
  array (
    'bt-max-peers' => '100',
  ),
  'memories.exiftool' => '/usr/share/nextcloud/apps/memories/bin-ext/exiftool-amd64-glibc',
  'memories.vod.path' => '/usr/share/nextcloud/apps/memories/bin-ext/go-vod-amd64',
  'memories.vod.ffmpeg' => '/usr/bin/ffmpeg',
  'memories.vod.ffprobe' => '/usr/bin/ffprobe',
  'enabledPreviewProviders' => 
  array (
    0 => 'OC\\Preview\\Image',
  ),
);

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

https://pastebin.com/Fcqtm4Xq

Bummmp :heart::heart:

SOLVED!
I was able to fix it by deleting the indices and running the fix indices command on CLI after the upgrade:

 occ db:add-missing-indices

MariaDB delete index query:

drop index sat
on oc_social_stream_dest

I had to drop the indexes of a few other tables as well. Same process.

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