Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hartsberger opened this issue Jan 20, 2023 · 12 comments
Open

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

hartsberger opened this issue Jan 20, 2023 · 12 comments
Assignees
Labels
dependencies pending fix Waiting for a fix on one of our dependencies

Comments

@hartsberger
Copy link

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

@styt
Copy link

styt commented Feb 4, 2023

Hi, I have the similar issue. Trying to run export and gui says successful but no file is created.
Also running NC 25 but in a docker container.
This used to work in NC 24.

@Pytal
Copy link
Member

Pytal commented Feb 7, 2023

Could you provide the full nextcloud.log contents @hartsberger?

@hartsberger
Copy link
Author

Hi @Pytal

here is the relevant content during the time the export command from above is executed:

{"reqId":"Wr4XUAwTThggD5aPAnWD","level":1,"time":"2023-02-07T16:04:10+01:00","remoteAddr":"","user":"--","app":"related_resources","method":"","url":"--","message":"Could not resolve OCA\\Circles\\CirclesManager! Class \"OCA\\Circles\\CirclesManager\" does not exist","userAgent":"--","version":"25.0.3.2","data":{"app":"related_resources"}}
{"reqId":"Wr4XUAwTThggD5aPAnWD","level":0,"time":"2023-02-07T16:04:10+01:00","remoteAddr":"","user":"--","app":"serverDI","method":"","url":"--","message":"The requested alias \"SystemConfig\" is deprecated. Please request \"OC\\SystemConfig\" directly. This alias will be removed in a future Nextcloud version.","userAgent":"--","version":"25.0.3.2","data":{"app":"serverDI"}}
{"reqId":"Wr4XUAwTThggD5aPAnWD","level":3,"time":"2023-02-07T16:04:11+01:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Array to string conversion at /var/www/html/3rdparty/symfony/console/Formatter/OutputFormatter.php#45","userAgent":"--","version":"25.0.3.2","exception":{"Exception":"Error","Message":"Array to string conversion at /var/www/html/3rdparty/symfony/console/Formatter/OutputFormatter.php#45","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[2,"Array to string conversion","/var/www/html/3rdparty/symfony/console/Formatter/OutputFormatter.php",45]},{"file":"/var/www/html/3rdparty/symfony/console/Formatter/OutputFormatter.php","line":45,"function":"preg_replace","args":["/([^\\\\]?)</","$1\\<",["/var/www/html/custom_apps/user_migration/lib/Service/UserMigrationService.php",190,"exportUserInformation","OCA\\UserMigration\\Service\\UserMigrationService","->",[{"__class__":"OC\\User\\User"},{"__class__":"OCA\\UserMigration\\TempExportDestination"},{"__class__":"Symfony\\Component\\Console\\Style\\SymfonyStyle"}]]]},{"file":"/var/www/html/3rdparty/symfony/console/Style/SymfonyStyle.php","line":471,"function":"escape","class":"Symfony\\Component\\Console\\Formatter\\OutputFormatter","type":"::","args":[["/var/www/html/custom_apps/user_migration/lib/Service/UserMigrationService.php",190,"exportUserInformation","OCA\\UserMigration\\Service\\UserMigrationService","->",[{"__class__":"OC\\User\\User"},{"__class__":"OCA\\UserMigration\\TempExportDestination"},{"__class__":"Symfony\\Component\\Console\\Style\\SymfonyStyle"}]]]},{"file":"/var/www/html/3rdparty/symfony/console/Style/SymfonyStyle.php","line":72,"function":"createBlock","class":"Symfony\\Component\\Console\\Style\\SymfonyStyle","type":"->","args":[[["/var/www/html/custom_apps/user_migration/lib/Service/UserMigrationService.php",190,"exportUserInformation","OCA\\UserMigration\\Service\\UserMigrationService","->",[{"__class__":"OC\\User\\User"},{"__class__":"OCA\\UserMigration\\TempExportDestination"},{"__class__":"Symfony\\Component\\Console\\Style\\SymfonyStyle"}]],["/var/www/html/custom_apps/user_migration/lib/Command/Export.php",206,"export","OCA\\UserMigration\\Service\\UserMigrationService","->",[{"__class__":"OCA\\UserMigration\\TempExportDestination"},{"__class__":"OC\\User\\User"},null,{"__class__":"Symfony\\Component\\Console\\Style\\SymfonyStyle"}]],["/var/www/html/3rdparty/symfony/console/Command/Command.php",255,"execute","OCA\\UserMigration\\Command\\Export","->",[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/core/Command/Base.php",177,"run","Symfony\\Component\\Console\\Command\\Command","->",[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/3rdparty/symfony/console/Application.php",1009,"run","OC\\Core\\Command\\Base","->",[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/3rdparty/symfony/console/Application.php",273,"doRunCommand","Symfony\\Component\\Console\\Application","->",[{"__class__":"OCA\\UserMigration\\Command\\Export"},{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/3rdparty/symfony/console/Application.php",149,"doRun","Symfony\\Component\\Console\\Application","->",[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/lib/private/Console/Application.php",213,"run","Symfony\\Component\\Console\\Application","->",[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/console.php",100,"run","OC\\Console\\Application","->",[]],["/var/www/html/occ",11,["/var/www/html/console.php"],"require_once"]],"[ERROR] ","fg=white;bg=red"," ",true,true]},{"file":"/var/www/html/3rdparty/symfony/console/Style/SymfonyStyle.php","line":152,"function":"block","class":"Symfony\\Component\\Console\\Style\\SymfonyStyle","type":"->","args":[[["/var/www/html/custom_apps/user_migration/lib/Service/UserMigrationService.php",190,"exportUserInformation","OCA\\UserMigration\\Service\\UserMigrationService","->",[{"__class__":"OC\\User\\User"},{"__class__":"OCA\\UserMigration\\TempExportDestination"},{"__class__":"Symfony\\Component\\Console\\Style\\SymfonyStyle"}]],["/var/www/html/custom_apps/user_migration/lib/Command/Export.php",206,"export","OCA\\UserMigration\\Service\\UserMigrationService","->",[{"__class__":"OCA\\UserMigration\\TempExportDestination"},{"__class__":"OC\\User\\User"},null,{"__class__":"Symfony\\Component\\Console\\Style\\SymfonyStyle"}]],["/var/www/html/3rdparty/symfony/console/Command/Command.php",255,"execute","OCA\\UserMigration\\Command\\Export","->",[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/core/Command/Base.php",177,"run","Symfony\\Component\\Console\\Command\\Command","->",[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/3rdparty/symfony/console/Application.php",1009,"run","OC\\Core\\Command\\Base","->",[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/3rdparty/symfony/console/Application.php",273,"doRunCommand","Symfony\\Component\\Console\\Application","->",[{"__class__":"OCA\\UserMigration\\Command\\Export"},{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/3rdparty/symfony/console/Application.php",149,"doRun","Symfony\\Component\\Console\\Application","->",[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/lib/private/Console/Application.php",213,"run","Symfony\\Component\\Console\\Application","->",[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/console.php",100,"run","OC\\Console\\Application","->",[]],["/var/www/html/occ",11,["/var/www/html/console.php"],"require_once"]],"ERROR","fg=white;bg=red"," ",true]},{"file":"/var/www/html/custom_apps/user_migration/lib/Command/Export.php","line":215,"function":"error","class":"Symfony\\Component\\Console\\Style\\SymfonyStyle","type":"->","args":[[["/var/www/html/custom_apps/user_migration/lib/Service/UserMigrationService.php",190,"exportUserInformation","OCA\\UserMigration\\Service\\UserMigrationService","->",[{"__class__":"OC\\User\\User"},{"__class__":"OCA\\UserMigration\\TempExportDestination"},{"__class__":"Symfony\\Component\\Console\\Style\\SymfonyStyle"}]],["/var/www/html/custom_apps/user_migration/lib/Command/Export.php",206,"export","OCA\\UserMigration\\Service\\UserMigrationService","->",[{"__class__":"OCA\\UserMigration\\TempExportDestination"},{"__class__":"OC\\User\\User"},null,{"__class__":"Symfony\\Component\\Console\\Style\\SymfonyStyle"}]],["/var/www/html/3rdparty/symfony/console/Command/Command.php",255,"execute","OCA\\UserMigration\\Command\\Export","->",[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/core/Command/Base.php",177,"run","Symfony\\Component\\Console\\Command\\Command","->",[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/3rdparty/symfony/console/Application.php",1009,"run","OC\\Core\\Command\\Base","->",[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/3rdparty/symfony/console/Application.php",273,"doRunCommand","Symfony\\Component\\Console\\Application","->",[{"__class__":"OCA\\UserMigration\\Command\\Export"},{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/3rdparty/symfony/console/Application.php",149,"doRun","Symfony\\Component\\Console\\Application","->",[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/lib/private/Console/Application.php",213,"run","Symfony\\Component\\Console\\Application","->",[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/console.php",100,"run","OC\\Console\\Application","->",[]],["/var/www/html/occ",11,["/var/www/html/console.php"],"require_once"]]]},{"file":"/var/www/html/3rdparty/symfony/console/Command/Command.php","line":255,"function":"execute","class":"OCA\\UserMigration\\Command\\Export","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/core/Command/Base.php","line":177,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":1009,"function":"run","class":"OC\\Core\\Command\\Base","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":273,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->","args":[{"__class__":"OCA\\UserMigration\\Command\\Export"},{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":149,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/lib/private/Console/Application.php","line":213,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/console.php","line":100,"function":"run","class":"OC\\Console\\Application","type":"->","args":[]},{"file":"/var/www/html/occ","line":11,"args":["/var/www/html/console.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}

After I saw the message regarding the circles app I enabled it.
But it did not work. Only the message regarding the circles app is gone.

{"reqId":"u0NaNJO7y3BGqlfJ0k8H","level":0,"time":"2023-02-07T16:33:43+01:00","remoteAddr":"","user":"--","app":"serverDI","method":"","url":"--","message":"The requested alias \"SystemConfig\" is deprecated. Please request \"OC\\SystemConfig\" directly. This alias will be removed in a future Nextcloud version.","userAgent":"--","version":"25.0.3.2","data":{"app":"serverDI"}}
{"reqId":"u0NaNJO7y3BGqlfJ0k8H","level":3,"time":"2023-02-07T16:33:43+01:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Array to string conversion at /var/www/html/3rdparty/symfony/console/Formatter/OutputFormatter.php#45","userAgent":"--","version":"25.0.3.2","exception":{"Exception":"Error","Message":"Array to string conversion at /var/www/html/3rdparty/symfony/console/Formatter/OutputFormatter.php#45","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[2,"Array to string conversion","/var/www/html/3rdparty/symfony/console/Formatter/OutputFormatter.php",45]},{"file":"/var/www/html/3rdparty/symfony/console/Formatter/OutputFormatter.php","line":45,"function":"preg_replace","args":["/([^\\\\]?)</","$1\\<",["/var/www/html/custom_apps/user_migration/lib/Service/UserMigrationService.php",190,"exportUserInformation","OCA\\UserMigration\\Service\\UserMigrationService","->",[{"__class__":"OC\\User\\User"},{"__class__":"OCA\\UserMigration\\TempExportDestination"},{"__class__":"Symfony\\Component\\Console\\Style\\SymfonyStyle"}]]]},{"file":"/var/www/html/3rdparty/symfony/console/Style/SymfonyStyle.php","line":471,"function":"escape","class":"Symfony\\Component\\Console\\Formatter\\OutputFormatter","type":"::","args":[["/var/www/html/custom_apps/user_migration/lib/Service/UserMigrationService.php",190,"exportUserInformation","OCA\\UserMigration\\Service\\UserMigrationService","->",[{"__class__":"OC\\User\\User"},{"__class__":"OCA\\UserMigration\\TempExportDestination"},{"__class__":"Symfony\\Component\\Console\\Style\\SymfonyStyle"}]]]},{"file":"/var/www/html/3rdparty/symfony/console/Style/SymfonyStyle.php","line":72,"function":"createBlock","class":"Symfony\\Component\\Console\\Style\\SymfonyStyle","type":"->","args":[[["/var/www/html/custom_apps/user_migration/lib/Service/UserMigrationService.php",190,"exportUserInformation","OCA\\UserMigration\\Service\\UserMigrationService","->",[{"__class__":"OC\\User\\User"},{"__class__":"OCA\\UserMigration\\TempExportDestination"},{"__class__":"Symfony\\Component\\Console\\Style\\SymfonyStyle"}]],["/var/www/html/custom_apps/user_migration/lib/Command/Export.php",206,"export","OCA\\UserMigration\\Service\\UserMigrationService","->",[{"__class__":"OCA\\UserMigration\\TempExportDestination"},{"__class__":"OC\\User\\User"},[],{"__class__":"Symfony\\Component\\Console\\Style\\SymfonyStyle"}]],["/var/www/html/3rdparty/symfony/console/Command/Command.php",255,"execute","OCA\\UserMigration\\Command\\Export","->",[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/core/Command/Base.php",177,"run","Symfony\\Component\\Console\\Command\\Command","->",[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/3rdparty/symfony/console/Application.php",1009,"run","OC\\Core\\Command\\Base","->",[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/3rdparty/symfony/console/Application.php",273,"doRunCommand","Symfony\\Component\\Console\\Application","->",[{"__class__":"OCA\\UserMigration\\Command\\Export"},{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/3rdparty/symfony/console/Application.php",149,"doRun","Symfony\\Component\\Console\\Application","->",[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/lib/private/Console/Application.php",213,"run","Symfony\\Component\\Console\\Application","->",[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/console.php",100,"run","OC\\Console\\Application","->",[]],["/var/www/html/occ",11,["/var/www/html/console.php"],"require_once"]],"[ERROR] ","fg=white;bg=red"," ",true,true]},{"file":"/var/www/html/3rdparty/symfony/console/Style/SymfonyStyle.php","line":152,"function":"block","class":"Symfony\\Component\\Console\\Style\\SymfonyStyle","type":"->","args":[[["/var/www/html/custom_apps/user_migration/lib/Service/UserMigrationService.php",190,"exportUserInformation","OCA\\UserMigration\\Service\\UserMigrationService","->",[{"__class__":"OC\\User\\User"},{"__class__":"OCA\\UserMigration\\TempExportDestination"},{"__class__":"Symfony\\Component\\Console\\Style\\SymfonyStyle"}]],["/var/www/html/custom_apps/user_migration/lib/Command/Export.php",206,"export","OCA\\UserMigration\\Service\\UserMigrationService","->",[{"__class__":"OCA\\UserMigration\\TempExportDestination"},{"__class__":"OC\\User\\User"},[],{"__class__":"Symfony\\Component\\Console\\Style\\SymfonyStyle"}]],["/var/www/html/3rdparty/symfony/console/Command/Command.php",255,"execute","OCA\\UserMigration\\Command\\Export","->",[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/core/Command/Base.php",177,"run","Symfony\\Component\\Console\\Command\\Command","->",[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/3rdparty/symfony/console/Application.php",1009,"run","OC\\Core\\Command\\Base","->",[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/3rdparty/symfony/console/Application.php",273,"doRunCommand","Symfony\\Component\\Console\\Application","->",[{"__class__":"OCA\\UserMigration\\Command\\Export"},{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/3rdparty/symfony/console/Application.php",149,"doRun","Symfony\\Component\\Console\\Application","->",[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/lib/private/Console/Application.php",213,"run","Symfony\\Component\\Console\\Application","->",[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/console.php",100,"run","OC\\Console\\Application","->",[]],["/var/www/html/occ",11,["/var/www/html/console.php"],"require_once"]],"ERROR","fg=white;bg=red"," ",true]},{"file":"/var/www/html/custom_apps/user_migration/lib/Command/Export.php","line":215,"function":"error","class":"Symfony\\Component\\Console\\Style\\SymfonyStyle","type":"->","args":[[["/var/www/html/custom_apps/user_migration/lib/Service/UserMigrationService.php",190,"exportUserInformation","OCA\\UserMigration\\Service\\UserMigrationService","->",[{"__class__":"OC\\User\\User"},{"__class__":"OCA\\UserMigration\\TempExportDestination"},{"__class__":"Symfony\\Component\\Console\\Style\\SymfonyStyle"}]],["/var/www/html/custom_apps/user_migration/lib/Command/Export.php",206,"export","OCA\\UserMigration\\Service\\UserMigrationService","->",[{"__class__":"OCA\\UserMigration\\TempExportDestination"},{"__class__":"OC\\User\\User"},[],{"__class__":"Symfony\\Component\\Console\\Style\\SymfonyStyle"}]],["/var/www/html/3rdparty/symfony/console/Command/Command.php",255,"execute","OCA\\UserMigration\\Command\\Export","->",[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/core/Command/Base.php",177,"run","Symfony\\Component\\Console\\Command\\Command","->",[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/3rdparty/symfony/console/Application.php",1009,"run","OC\\Core\\Command\\Base","->",[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/3rdparty/symfony/console/Application.php",273,"doRunCommand","Symfony\\Component\\Console\\Application","->",[{"__class__":"OCA\\UserMigration\\Command\\Export"},{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/3rdparty/symfony/console/Application.php",149,"doRun","Symfony\\Component\\Console\\Application","->",[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/lib/private/Console/Application.php",213,"run","Symfony\\Component\\Console\\Application","->",[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]],["/var/www/html/console.php",100,"run","OC\\Console\\Application","->",[]],["/var/www/html/occ",11,["/var/www/html/console.php"],"require_once"]]]},{"file":"/var/www/html/3rdparty/symfony/console/Command/Command.php","line":255,"function":"execute","class":"OCA\\UserMigration\\Command\\Export","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/core/Command/Base.php","line":177,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":1009,"function":"run","class":"OC\\Core\\Command\\Base","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":273,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->","args":[{"__class__":"OCA\\UserMigration\\Command\\Export"},{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":149,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/lib/private/Console/Application.php","line":213,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/var/www/html/console.php","line":100,"function":"run","class":"OC\\Console\\Application","type":"->","args":[]},{"file":"/var/www/html/occ","line":11,"args":["/var/www/html/console.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}

@come-nc
Copy link
Collaborator

come-nc commented Feb 14, 2023

@hartsberger Could you apply the change in #353 and run again with -vvv ? This should show the actual error.

@hartsberger
Copy link
Author

Hi @come-nc,
here is the occ output:

www-data@502c59455f42:~/html$ php occ user:export --types=none Stefan /tmp -vvv
Exporting user information in user.json…
                                                                                                                        
 [ERROR] #0 /var/www/html/custom_apps/user_migration/lib/Service/UserMigrationService.php(190):                         
         OCA\UserMigration\Service\UserMigrationService->exportUserInformation(Object(OC\User\User),                    
         Object(OCA\UserMigration\TempExportDestination), Object(Symfony\Component\Console\Style\SymfonyStyle))         
         #1 /var/www/html/custom_apps/user_migration/lib/Command/Export.php(206):                                       
         OCA\UserMigration\Service\UserMigrationService->export(Object(OCA\UserMigration\TempExportDestination),        
         Object(OC\User\User), Array, Object(Symfony\Component\Console\Style\SymfonyStyle))                             
         #2 /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))                                                        
         #3 /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))                                                        
         #4 /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))                                                        
         #5 /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))     
         #6 /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))                                                        
         #7 /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))                                                        
         #8 /var/www/html/console.php(100): OC\Console\Application->run()                                               
         #9 /var/www/html/occ(11): require_once('/var/www/html/c...')                                                   
         #10 {main}                                                                                                     
                                                                                                                        
 [ERROR] Could not export user information.                                                                             

and the nextcloud logfile:

{"reqId":"TeALOKV3MeC0q5HbnrRH","level":0,"time":"2023-02-14T19:00:36+01:00","remoteAddr":"","user":"--","app":"serverDI","method":"","url":"--","message":"The requested alias \"SystemConfig\" is deprecated. Please request \"OC\\SystemConfig\" directly. This alias will be removed in a future Nextcloud version.","userAgent":"--","version":"25.0.3.2","data":{"app":"serverDI"}}

@come-nc
Copy link
Collaborator

come-nc commented Feb 20, 2023

@hartsberger Sorry about that, can you try https://github.com/nextcloud/user_migration/pull/364/files instead? (replace $e->getTraceAsString() by "$e")

This should finally show what the root cause is.

@hartsberger
Copy link
Author

Hi @come-nc,
here is the new occ output:

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

                                                                                                                        
 [ERROR] TypeError: Unsupported operand types: array & float in                                                         
         /var/www/html/3rdparty/deepdiver/zipstreamer/src/Count64.php:121                                               
         Stack trace:                                                                                                   
         #0 /var/www/html/3rdparty/deepdiver/zipstreamer/src/ZipStreamer.php(387):                                      
         ZipStreamer\pack64le(Object(ZipStreamer\Lib\Count64_32))                                                       
         #1 /var/www/html/3rdparty/deepdiver/zipstreamer/src/ZipStreamer.php(396):                                      
         ZipStreamer\ZipStreamer->buildZip64ExtendedInformationField(0, 0)                                              
         #2 /var/www/html/3rdparty/deepdiver/zipstreamer/src/ZipStreamer.php(343):                                      
         ZipStreamer\ZipStreamer->buildLocalFileHeader('user.json', NULL, 8, 0, 0, 0, false, 0)                         
         #3 /var/www/html/3rdparty/deepdiver/zipstreamer/src/ZipStreamer.php(212):                                      
         ZipStreamer\ZipStreamer->beginFile('user.json', false, NULL, NULL, 8, 0)                                       
         #4 /var/www/html/custom_apps/user_migration/lib/ExportDestination.php(65):                                     
         ZipStreamer\ZipStreamer->addFileFromStream(Resource id #1270, 'user.json')                                     
         #5 /var/www/html/custom_apps/user_migration/lib/Service/UserMigrationService.php(277):                         
         OCA\UserMigration\ExportDestination->addFileContents('user.json', '{"uid":"Stefan"...')                        
         #6 /var/www/html/custom_apps/user_migration/lib/Service/UserMigrationService.php(190):                         
         OCA\UserMigration\Service\UserMigrationService->exportUserInformation(Object(OC\User\User),                    
         Object(OCA\UserMigration\TempExportDestination), Object(Symfony\Component\Console\Style\SymfonyStyle))         
         #7 /var/www/html/custom_apps/user_migration/lib/Command/Export.php(206):                                       
         OCA\UserMigration\Service\UserMigrationService->export(Object(OCA\UserMigration\TempExportDestination),        
         Object(OC\User\User), Array, Object(Symfony\Component\Console\Style\SymfonyStyle))                             
         #8 /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))                                                        
         #9 /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))                                                        
         #10 /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))                                                        
         #11 /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))     
         #12 /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))                                                        
         #13 /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))                                                        
         #14 /var/www/html/console.php(100): OC\Console\Application->run()                                              
         #15 /var/www/html/occ(11): require_once('/var/www/html/c...')                                                  
         #16 {main}                                                                                                     
                                                                                                                        
         Next OCP\UserMigration\UserMigrationException: Failed to add content in user.json in archive in                
         /var/www/html/custom_apps/user_migration/lib/ExportDestination.php:69                                          
         Stack trace:                                                                                                   
         #0 /var/www/html/custom_apps/user_migration/lib/Service/UserMigrationService.php(277):                         
         OCA\UserMigration\ExportDestination->addFileContents('user.json', '{"uid":"Stefan"...')                        
         #1 /var/www/html/custom_apps/user_migration/lib/Service/UserMigrationService.php(190):                         
         OCA\UserMigration\Service\UserMigrationService->exportUserInformation(Object(OC\User\User),                    
         Object(OCA\UserMigration\TempExportDestination), Object(Symfony\Component\Console\Style\SymfonyStyle))         
         #2 /var/www/html/custom_apps/user_migration/lib/Command/Export.php(206):                                       
         OCA\UserMigration\Service\UserMigrationService->export(Object(OCA\UserMigration\TempExportDestination),        
         Object(OC\User\User), Array, Object(Symfony\Component\Console\Style\SymfonyStyle))                             
         #3 /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))                                                        
         #4 /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))                                                        
         #5 /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))                                                        
         #6 /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))     
         #7 /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))                                                        
         #8 /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))                                                        
         #9 /var/www/html/console.php(100): OC\Console\Application->run()                                               
         #10 /var/www/html/occ(11): require_once('/var/www/html/c...')                                                  
         #11 {main}                                                                                                     
                                                                                                                        
         Next OCP\UserMigration\UserMigrationException: Could not export user information. in                           
         /var/www/html/custom_apps/user_migration/lib/Service/UserMigrationService.php:279                              
         Stack trace:                                                                                                   
         #0 /var/www/html/custom_apps/user_migration/lib/Service/UserMigrationService.php(190):                         
         OCA\UserMigration\Service\UserMigrationService->exportUserInformation(Object(OC\User\User),                    
         Object(OCA\UserMigration\TempExportDestination), Object(Symfony\Component\Console\Style\SymfonyStyle))         
         #1 /var/www/html/custom_apps/user_migration/lib/Command/Export.php(206):                                       
         OCA\UserMigration\Service\UserMigrationService->export(Object(OCA\UserMigration\TempExportDestination),        
         Object(OC\User\User), Array, Object(Symfony\Component\Console\Style\SymfonyStyle))                             
         #2 /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))                                                        
         #3 /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))                                                        
         #4 /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))                                                        
         #5 /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))     
         #6 /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))                                                        
         #7 /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))                                                        
         #8 /var/www/html/console.php(100): OC\Console\Application->run()                                               
         #9 /var/www/html/occ(11): require_once('/var/www/html/c...')                                                   
         #10 {main}                                                                                                     
                                                                                                                        

                                                                                                                        
 [ERROR] Could not export user information.                                                                             

and the nextcloud logfile:

{"reqId":"9qJsHIKCjNhH1P3KETTU","level":1,"time":"2023-02-21T13:07:35+01:00","remoteAddr":"","user":"--","app":"related_resources","method":"","url":"--","message":"Could not resolve OCA\\Circles\\CirclesManager! Class \"OCA\\Circles\\CirclesManager\" does not exist","userAgent":"--","version":"25.0.3.2","data":{"app":"related_resources"}}
{"reqId":"9qJsHIKCjNhH1P3KETTU","level":0,"time":"2023-02-21T13:07:35+01:00","remoteAddr":"","user":"--","app":"serverDI","method":"","url":"--","message":"The requested alias \"SystemConfig\" is deprecated. Please request \"OC\\SystemConfig\" directly. This alias will be removed in a future Nextcloud version.","userAgent":"--","version":"25.0.3.2","data":{"app":"serverDI"}}

@come-nc
Copy link
Collaborator

come-nc commented Feb 21, 2023

@hartsberger Are you on 32bits?
Looking at the trace I think this is a bug from DeepDiver1975/PHPZipStreamer#4 on 32bits.
It does if ("Count64_32" == get_class($data)) { but the get_class will now return the class name with the namespace.

Can you try this patch:

diff --git a/deepdiver/zipstreamer/src/Count64.php b/deepdiver/zipstreamer/src/Count64.php
index a7a0fef1..5f881f5f 100644
--- a/deepdiver/zipstreamer/src/Count64.php
+++ b/deepdiver/zipstreamer/src/Count64.php
@@ -113,7 +113,7 @@ function unpack32le($data) {
  */
 function pack64le($data) {
   if (is_object($data)) {
-    if ("Count64_32" == get_class($data)) {
+    if (Count64_32::class === get_class($data)) {
       $value = $data->_getValue();
       $hiBytess = $value[0];
       $loBytess = $value[1];

Or this one:

diff --git a/deepdiver/zipstreamer/src/Count64.php b/deepdiver/zipstreamer/src/Count64.php
index a7a0fef1..311378aa 100644
--- a/deepdiver/zipstreamer/src/Count64.php
+++ b/deepdiver/zipstreamer/src/Count64.php
@@ -113,7 +113,7 @@ function unpack32le($data) {
  */
 function pack64le($data) {
   if (is_object($data)) {
-    if ("Count64_32" == get_class($data)) {
+    if ($data instanceof Count64_32) {
       $value = $data->_getValue();
       $hiBytess = $value[0];
       $loBytess = $value[1];

@hartsberger
Copy link
Author

Hi @come-nc,

yes, I am on Raspberry Pi 32 bit arm.

I used the first patch and the command succeeded:

www-data@502c59455f42:~/html$ php occ user:export --types=none Stefan /tmp -vvv
Exporting user information in user.json…
Exporting settings in settings.json…
Exporting versions in versions.json…
Skip non-selected migrator: calendar
Skip non-selected migrator: contacts
Skip non-selected migrator: trashbin
Skip non-selected migrator: account
Skip non-selected migrator: files
Export saved in /tmp/Stefan_2023-02-21_18-12-09.zip

and the nextcloud logfile:

{"reqId":"BCQGQvbyK75ZZyOgdRIw","level":1,"time":"2023-02-21T19:12:08+01:00","remoteAddr":"","user":"--","app":"related_resources","method":"","url":"--","message":"Could not resolve OCA\\Circles\\CirclesManager! Class \"OCA\\Circles\\CirclesManager\" does not exist","userAgent":"--","version":"25.0.3.2","data":{"app":"related_resources"}}
{"reqId":"BCQGQvbyK75ZZyOgdRIw","level":0,"time":"2023-02-21T19:12:08+01:00","remoteAddr":"","user":"--","app":"serverDI","method":"","url":"--","message":"The requested alias \"SystemConfig\" is deprecated. Please request \"OC\\SystemConfig\" directly. This alias will be removed in a future Nextcloud version.","userAgent":"--","version":"25.0.3.2","data":{"app":"serverDI"}}

Even via gui it works now.

Thank you

@come-nc
Copy link
Collaborator

come-nc commented Feb 23, 2023

Thank you, I will open a PR upstream then

@come-nc
Copy link
Collaborator

come-nc commented Feb 23, 2023

@solracsf
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies pending fix Waiting for a fix on one of our dependencies
Projects
None yet
Development

No branches or pull requests

5 participants