Skip to content

An unhandled exception has been thrown when performing files:transfer-ownership #16462

@FeistyViking

Description

@FeistyViking

Steps to reproduce

  1. Create local user
  2. Generate shares relying on external storage file/folder
  3. Create new saml authorized user
  4. Transfer ownership of files and shares from local user to new saml authorized user

Expected behaviour

should transfer all files and shares sucessfully

Actual behaviour

Files transfer successfully but shares do not. Met with the below details

An unhandled exception has been thrown:
Error: Call to a member function getUID() on null in /var/www/nextcloud/lib/private/Share20/Manager.php:294
Stack trace:
#0 /var/www/nextcloud/lib/private/Share20/Manager.php(847): OC\Share20\Manager->generalCreateChecks(Object(OC\Share20\Share))
#1 /var/www/nextcloud/apps/files/lib/Command/TransferOwnership.php(282): OC\Share20\Manager->updateShare(Object(OC\Share20\Share))
#2 /var/www/nextcloud/apps/files/lib/Command/TransferOwnership.php(157): OCA\Files\Command\TransferOwnership->restoreShares(Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OCA\Files\Command\TransferOwnership->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /var/www/nextcloud/3rdparty/symfony/console/Application.php(901): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /var/www/nextcloud/3rdparty/symfony/console/Application.php(262): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Files\Command\TransferOwnership), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /var/www/nextcloud/3rdparty/symfony/console/Application.php(145): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /var/www/nextcloud/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /var/www/nextcloud/console.php(97): OC\Console\Application->run()
#9 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')

Server configuration detail

Operating system: Linux 4.15.0-54-generic #58-Ubuntu SMP Mon Jun 24 10:55:24 UTC 2019 x86_64

Webserver: Apache/2.4.29 (Ubuntu) (fpm-fcgi)

Database: pgsql PostgreSQL 10.9 (Ubuntu 10.9-0ubuntu0.18.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0, 64-bit

PHP version:

7.2.19-0ubuntu0.18.04.1
Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, sodium, session, standard, cgi-fcgi, json, PDO, xml, apcu, apc, bz2, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, gmp, iconv, igbinary, imagick, imap, intl, redis, ldap, exif, pdo_pgsql, pgsql, Phar, posix, readline, shmop, SimpleXML, smbclient, soap, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlwriter, xsl, zip, libsmbclient, Zend OPcache

Nextcloud version: 16.0.3 - 16.0.3.0

Updated from an older Nextcloud/ownCloud or fresh install: updated from 16.0.1

Where did you install Nextcloud from: using NextcloudVM

Signing status

Array
(
[core] => Array
(
[INVALID_HASH] => Array
(
[.user.ini] => Array
(
[expected] => 4843b3217e91f8536cb9b52700efb20300290292cf6286f92794d4cec99df286afeb7dd6c91b1be20bc55eda541eef230a5c5e7dcd46c189edd0ed1e80c6d3f5
[current] => 3fadb60f97666a1f66cf5ef4a4b4944f9326f6c7e6c2eae8b8b7f0a7ece705c67a99624c6ea56e4a6526ea9ac5611563b0df56b093c6f5f48c1ee2ff560d54cc
)

            )

    )

)

List of activated apps
Enabled:
 - accessibility: 1.2.0
 - activity: 2.9.1
 - admin_audit: 1.6.0
 - cloud_federation_api: 0.2.0
 - comments: 1.6.0
 - dav: 1.9.2
 - federatedfilesharing: 1.6.0
 - files: 1.11.0
 - files_accesscontrol: 1.6.0
 - files_antivirus: 2.1.1
 - files_excludedirs: 0.0.1
 - files_external: 1.7.0
 - files_pdfviewer: 1.5.0
 - files_rightclick: 0.13.0
 - files_sharing: 1.8.0
 - files_texteditor: 2.8.0
 - files_trashbin: 1.6.0
 - files_versions: 1.9.0
 - groupfolders: 4.0.4
 - impersonate: 1.3.0
 - issuetemplate: 0.5.0
 - logreader: 2.1.0
 - lookup_server_connector: 1.4.0
 - nextcloud_announcements: 1.5.0
 - notifications: 2.4.1
 - oauth2: 1.4.2
 - password_policy: 1.6.0
 - privacy: 1.0.0
 - provisioning_api: 1.6.0
 - serverinfo: 1.6.0
 - sharebymail: 1.6.0
 - survey_client: 1.4.0
 - suspicious_login: 1.0.0
 - systemtags: 1.6.0
 - theming: 1.7.0
 - twofactor_backupcodes: 1.5.0
 - twofactor_totp: 2.1.2
 - updatenotification: 1.6.0
 - user_external: 0.6.4
 - user_saml: 2.3.1
 - viewer: 1.0.0
 - workflowengine: 1.6.0
Disabled:
 - encryption
 - federation
 - files_videoplayer
 - firstrunwizard
 - gallery
 - recommendations
 - support
 - user_ldap

Configuration (config/config.php)
{
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "localhost",
        "***REMOVED SENSITIVE VALUE***",
        "***REMOVED SENSITIVE VALUE***",
        "***REMOVED SENSITIVE VALUE***"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "pgsql",
    "version": "16.0.3.0",
    "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpmode": "smtp",
    "log_rotate_size": "10485760",
    "memcache.local": "\\OC\\Memcache\\APCu",
    "filelocking.enabled": true,
    "memcache.distributed": "\\OC\\Memcache\\Redis",
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "redis": {
        "host": "***REMOVED SENSITIVE VALUE***",
        "port": 0,
        "timeout": 0.5,
        "dbindex": 0,
        "password": "***REMOVED SENSITIVE VALUE***"
    },
    "htaccess.RewriteBase": "\/",
    "loglevel": "1",
    "log_type": "file",
    "logfile": "\/mnt\/ncdata\/nextcloud.log",
    "logtimezone": "America\/Los_Angeles",
    "maintenance": false,
    "mail_smtpsecure": "tls",
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpport": "587",
    "skeletondirectory": "",
    "updater.release.channel": "production",
    "preview_max_filesize_image": 100,
    "theme": ""
}

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

Are you using encryption: false

Are you using an external user-backend, if yes which one: SSO and SAML authentication to Google

Client configuration

Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36

Operating system:

Logs

Web server error log
Insert your web server log here 
Nextcloud log
Insert your Nextcloud log here
Browser log

An unhandled exception has been thrown:
Error: Call to a member function getUID() on null in /var/www/nextcloud/lib/private/Share20/Manager.php:294
Stack trace:
#0 /var/www/nextcloud/lib/private/Share20/Manager.php(847): OC\Share20\Manager->generalCreateChecks(Object(OC\Share20\Share))
#1 /var/www/nextcloud/apps/files/lib/Command/TransferOwnership.php(282): OC\Share20\Manager->updateShare(Object(OC\Share20\Share))
#2 /var/www/nextcloud/apps/files/lib/Command/TransferOwnership.php(157): OCA\Files\Command\TransferOwnership->restoreShares(Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OCA\Files\Command\TransferOwnership->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /var/www/nextcloud/3rdparty/symfony/console/Application.php(901): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /var/www/nextcloud/3rdparty/symfony/console/Application.php(262): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Files\Command\TransferOwnership), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /var/www/nextcloud/3rdparty/symfony/console/Application.php(145): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /var/www/nextcloud/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /var/www/nextcloud/console.php(97): OC\Console\Application->run()
#9 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
#10 {main}root@artbox:/home/ncadmin# cd /mnt/ncdata/ahreha/

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending check for reproducibility or if it fits our roadmapbug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions