Skip to content

Error when exporting user: Could not export user information #344

@hyperlink-skylight

Description

@hyperlink-skylight

Error when exporting user.

0 bytes file is created with success message (GUI).

Nextcloud logfile says:
OCP\UserMigration\UserMigrationException: Could not export user information.

Trying to export an user with occ gives more information:

www-data@502c59455f42:~/html$ php occ user:export --types=none Stefan /tmp 
Exporting user information in user.json…

                                                                                                                        
 [ERROR] Could not export user information.                                                                             
                                                                                                                        

www-data@502c59455f42:~/html$ php occ user:export --types=none Stefan /tmp -vvv
Exporting user information in user.json…

An unhandled exception has been thrown:
TypeError: Symfony\Component\Console\Formatter\OutputFormatter::escapeTrailingBackslash(): Argument #1 ($text) must be of type string, array given, called in /var/www/html/3rdparty/symfony/console/Formatter/OutputFormatter.php on line 47 and defined in /var/www/html/3rdparty/symfony/console/Formatter/OutputFormatter.php:55
Stack trace:
#0 /var/www/html/3rdparty/symfony/console/Formatter/OutputFormatter.php(47): Symfony\Component\Console\Formatter\OutputFormatter::escapeTrailingBackslash(Array)
#1 /var/www/html/3rdparty/symfony/console/Style/SymfonyStyle.php(471): Symfony\Component\Console\Formatter\OutputFormatter::escape(Array)
#2 /var/www/html/3rdparty/symfony/console/Style/SymfonyStyle.php(72): Symfony\Component\Console\Style\SymfonyStyle->createBlock(Array, '[ERROR] ', 'fg=white;bg=red', ' ', true, true)
#3 /var/www/html/3rdparty/symfony/console/Style/SymfonyStyle.php(152): Symfony\Component\Console\Style\SymfonyStyle->block(Array, 'ERROR', 'fg=white;bg=red', ' ', true)
#4 /var/www/html/custom_apps/user_migration/lib/Command/Export.php(215): Symfony\Component\Console\Style\SymfonyStyle->error(Array)
#5 /var/www/html/3rdparty/symfony/console/Command/Command.php(255): OCA\UserMigration\Command\Export->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /var/www/html/core/Command/Base.php(177): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /var/www/html/3rdparty/symfony/console/Application.php(1009): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /var/www/html/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(OCA\UserMigration\Command\Export), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/html/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/html/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /var/www/html/console.php(100): OC\Console\Application->run()
#12 /var/www/html/occ(11): require_once('/var/www/html/c...')
#13 {main}

Any ideas what could cause the problem?


Here is my environment / system report:

Latest Nextcloud Docker image running on Raspberry Pi 4.
OS: Raspbian GNU/Linux 10 (buster) 32 bit arm
Model: Raspberry Pi 4 Model B Rev 1.1

Server configuration detail

Operating system: Linux 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l

Webserver: Apache/2.4.54 (Debian) (apache2handler)

Database: pgsql PostgreSQL 12.2 (Debian 12.2-2.pgdg100+1) on arm-unknown-linux-gnueabihf, compiled by gcc (Debian 8.3.0-6) 8.3.0, 32-bit

PHP version: 8.1.14

Modules loaded: Core, date, libxml, openssl, pcre, sqlite3, zlib, ctype, curl, dom, fileinfo, filter, ftp, hash, iconv, json, mbstring, SPL, session, PDO, pdo_sqlite, standard, posix, Reflection, Phar, SimpleXML, tokenizer, xml, xmlreader, xmlwriter, mysqlnd, apache2handler, apcu, bcmath, exif, gd, gmp, imagick, intl, ldap, memcached, pcntl, pdo_mysql, pdo_pgsql, redis, sodium, zip, Zend OPcache

Nextcloud version: 25.0.3 - 25.0.3.2

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from: unknown

Signing status

[]

List of activated apps
Enabled:
 - bookmarks: 12.0.0
 - calendar: 4.2.1
 - cloud_federation_api: 1.8.0
 - contacts: 5.0.2
 - contactsinteraction: 1.6.0
 - dashboard: 7.5.0
 - dav: 1.24.0
 - deck: 1.8.3
 - federatedfilesharing: 1.15.0
 - files: 1.20.1
 - files_pdfviewer: 2.6.0
 - files_rightclick: 1.4.0
 - files_sharing: 1.17.0
 - files_trashbin: 1.15.0
 - files_versions: 1.18.0
 - groupfolders: 13.1.0
 - health: 1.6.1
 - logreader: 2.10.0
 - lookup_server_connector: 1.13.0
 - maps: 0.2.4
 - music: 1.8.1
 - nextcloud_announcements: 1.14.0
 - notes: 4.6.0
 - notifications: 2.13.1
 - oauth2: 1.13.0
 - password_policy: 1.15.0
 - photos: 2.0.1
 - previewgenerator: 5.1.1
 - privacy: 1.9.0
 - provisioning_api: 1.15.0
 - ransomware_protection: 1.14.0
 - recommendations: 1.4.0
 - related_resources: 1.0.3
 - serverinfo: 1.15.0
 - settings: 1.7.0
 - support: 1.8.0
 - survey_client: 1.13.0
 - systemtags: 1.15.0
 - tasks: 0.14.5
 - text: 3.6.0
 - theming: 2.0.1
 - twofactor_backupcodes: 1.14.0
 - updatenotification: 1.15.0
 - user_migration: 2.0.1
 - user_status: 1.5.0
 - viewer: 1.9.0
 - weather_status: 1.5.0
 - workflowengine: 2.7.0
Disabled:
 - activity: 2.11.0
 - admin_audit
 - bruteforcesettings: 2.3.0
 - circles: 22.1.1
 - comments: 1.12.0
 - encryption
 - extract: 1.3.5
 - federation: 1.8.0
 - files_external
 - firstrunwizard: 2.7.0
 - mail: 2.2.2
 - news: 16.2.1
 - richdocumentscode_arm64
 - sharebymail: 1.8.0
 - suspicious_login: 4.1.0
 - twofactor_totp
 - user_ldap

Configuration (config/config.php)
{
    "htaccess.RewriteBase": "\/",
    "memcache.local": "\\OC\\Memcache\\APCu",
    "apps_paths": [
        {
            "path": "\/var\/www\/html\/apps",
            "url": "\/apps",
            "writable": false
        },
        {
            "path": "\/var\/www\/html\/custom_apps",
            "url": "\/custom_apps",
            "writable": true
        }
    ],
    "memcache.distributed": "\\OC\\Memcache\\Redis",
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "redis": {
        "host": "***REMOVED SENSITIVE VALUE***",
        "password": "***REMOVED SENSITIVE VALUE***",
        "port": 6379
    },
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "cloud",
        "cloud.fritz.box"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "pgsql",
    "version": "25.0.3.2",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "mail_smtpmode": "smtp",
    "mail_sendmailmode": "smtp",
    "mail_smtpsecure": "ssl",
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpauthtype": "LOGIN",
    "mail_smtpauth": 1,
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpport": "465",
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "maintenance": false,
    "default_language": "de",
    "default_locale": "de_DE",
    "default_phone_region": "DE",
    "logtimezone": "Europe\/Berlin",
    "skeletondirectory": "",
    "overwrite.cli.url": "https:\/\/cloud",
    "loglevel": 0,
    "has_rebuilt_cache": true,
    "overwriteprotocol": "https",
    "theme": "",
    "data-fingerprint": "5d0f200e8db5a197137e018d368e3df1",
    "preview_max_memory": "256"
}

Cron Configuration: Array
(
[backgroundjobs_mode] => cron
[lastcron] => 1674246602
)

External storages: files_external is disabled

Encryption: no

User-backends:

  • OC\User\Database

Browser: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:108.0) Gecko/20100101 Firefox/108.0

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions