Upgrade to 10.0.4 creates Error: ProviderException - Parent of share should be unique


Ubuntu 16.04

Steps to reproduce

  1. Upgrade to 10.0.4 using apt-get upgrade
  2. Upgrade fails

Expected behaviour

Migration should run through without errors

Actual behaviour

WebUI shows an error page, nobody is able to login, migrations wont finish successfully.

Upgrade can't be fixed via:

www-data@cloud:~/owncloud$ php occ maintenance:repair
ownCloud 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
 - Repair mime types
 - Detect file cache entries with path that does not match parent-child relationships
     - WARNING: The file cache contains entries where the parent id does not point to any existing entry for the following storage numeric ids: 4
     - WARNING: Please run `occ files:scan --all --repair` to repair all affected storages
 - Generate ETags for file where no ETag is present.
     - ETags have been fixed for 0 files/folders.
 - Clean tags and favorites
     - 0 tags of deleted users have been removed.
     - 0 tags for delete files have been removed.
     - 0 tag entries for deleted tags have been removed.
     - 0 tags with no entries have been removed.
 - Drop old database tables
 28/28 [============================] 100%
 - Drop old background jobs
 - Remove getetag entries in properties table
     - Removed 0 unneeded "{DAV:}getetag" entries from properties table.
 - Repair outdated OCS IDs
 - Repair invalid shares
 - Remove old share propagation app entries
 - Move user avatars outside the homes to the new location
  52/253 [=====>----------------------]  20%
  Parent of share should be unique          

maintenance:repair [--include-expensive]

Github issue

Server configuration

Operating system: Ubuntu 16.04

Web server: apache

Database: mysql Ver 15.1 Distrib 10.0.31-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

PHP version: 7.0.22

ownCloud version: (see ownCloud admin page)

Updated from an older ownCloud or fresh install: upgraded via apt-get upgrade

Where did you install ownCloud from: owncloud from: http://download.owncloud.org/download/repositories/stable/Ubuntu_16.04/ via apt

Signing status (ownCloud 9.0 and above): not sure what that is

Login as admin user into your ownCloud and access 
paste the results into https://gist.github.com/ and puth the link here.

-> That does not work as I can not login.

The content of config/config.php:

www-data@cloud:~/owncloud$ cat config/config.php 
$CONFIG = array (
  'debug' => false,
  'updatechecker' => false,
  'instanceid' => 'foobar',
  'passwordsalt' => 'foobar',
  'secret' => 'foobar',
  'trusted_domains' => 
  array (
    0 => 'cloud.foobar.com',
  'datadirectory' => '/var/www/owncloud/data',
  'overwrite.cli.url' => 'https://cloud.foobar.com',
  'dbtype' => 'mysql',
  'version' => '',
  'dbname' => 'owncloud',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'owncloud',
  'dbpassword' => 'foobar',
  'logtimezone' => 'UTC',
  'installed' => true,
  'maintenance' => true,
  'loglevel' => 2,

List of activated apps:

www-data@cloud:~/owncloud$ php occ app:list
ownCloud 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
  - activity: 2.3.6
  - comments: 0.3.0
  - configreport: 0.1.1
  - dav: 0.3.2
  - federatedfilesharing: 0.3.1
  - federation: 0.1.0
  - files: 1.5.1
  - files_external: 0.7.1
  - files_pdfviewer: 0.8.2
  - files_sharing: 0.10.1
  - files_texteditor: 2.2.1
  - files_trashbin: 0.9.1
  - files_videoplayer: 0.9.8
  - market: 0.2.3
  - notifications: 0.3.2
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - templateeditor: 0.1
  - updatenotification: 0.2.1
  - encryption
  - external
  - files_versions
  - firstrunwizard
  - theme-example
  - user_external

Are you using external storage, if yes which one: no

Are you using encryption: no

Are you using an external user-backend, if yes which one: no

Client configuration

Browser: Chromium 63.0.3239.84 Built on Ubuntu , running on Ubuntu 16.04

Operating system: Ubuntu 16.04


Web server error log

Nothing relevant in apache's access or error.log

ownCloud log (data/owncloud.log)

Nothing relevant

Fix is described here: https://github.com/owncloud/core/issues/27990