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

import failing (?) #343

Open
gitwittidbit opened this issue Jan 18, 2023 · 10 comments
Open

import failing (?) #343

gitwittidbit opened this issue Jan 18, 2023 · 10 comments

Comments

@gitwittidbit
Copy link

Hi,

I have successfully exported a user's files and transferred the archive over to a new instance of NC.

Importing is taking a couple of minutes. While it is still processing (wheel spinning in GUI), an error message pops up in the upper right corner saying (something like) "Error getting user's config". Some time later, the import dialogue tells me that the import was completed successfully.

However, this is not the case. The allegedly imported files are nowhere to be found.

The NC log (accessible through the GUI) does not contain any information on the failed import. But there is an entry from an earlier try (that failed the same way):

`OCA\Settings\UserMigration\AccountMigratorException: Failed to import profile config

/var/www/html/custom_apps/user_migration/lib/Service/UserMigrationService.php - line 250:

OCA\Settings\UserMigration\AccountMigrator->import(OC\User\User {}, OCA\UserMigr ... {}, Symfony\Comp ... {})

/var/www/html/custom_apps/user_migration/lib/BackgroundJob/UserImportJob.php - line 100:

OCA\UserMigration\Service\UserMigrationService->import(OCA\UserMigr ... {}, OC\User\User {})

/var/www/html/lib/public/BackgroundJob/Job.php - line 78:

OCA\UserMigration\BackgroundJob\UserImportJob->run([ 1])

/var/www/html/lib/public/BackgroundJob/QueuedJob.php - line 58:

OCP\BackgroundJob\Job->start(OC\BackgroundJob\JobList {})

/var/www/html/lib/public/BackgroundJob/QueuedJob.php - line 48:

OCP\BackgroundJob\QueuedJob->start(OC\BackgroundJob\JobList {})

/var/www/html/cron.php - line 152:

OCP\BackgroundJob\QueuedJob->execute(OC\BackgroundJob\JobList {}, OC\Log {})`

Is there something going on in the background and after a couple of hours the import will have gone through? Or is something amiss?

Thanks!

@Pytal
Copy link
Member

Pytal commented Jan 18, 2023

Could you provide your full nextcloud.log file @gitwittidbit?

@gitwittidbit
Copy link
Author

So here goes...

This would have been the first try:

{"reqId":"pLQs562PSSGnmzy8QuLS","level":3,"time":"2023-01-18T20:39:41+00:00","remoteAddr":"","user":"--","app":"user_migration","method":"","url":"--","message":"Failed to import profile config","userAgent":"--",">

And this the second one:

{"reqId":"rrDQ4RNg1y6Zgj1FF5qn","level":3,"time":"2023-01-18T21:08:11+00:00","remoteAddr":"","user":"--","app":"user_migration","method":"","url":"--","message":"Failed to import profile config","userAgent":"--",">

I also found another entry in the GUI log (presumably for the second try), which reads exactly like the first one that I posted yesterday.

@Pytal
Copy link
Member

Pytal commented Jan 20, 2023

Could you paste the full nextcloud.log file here? We'll need more than the two lines to debug this

@gitwittidbit
Copy link
Author

The whole log is 105MB...

@Pytal
Copy link
Member

Pytal commented Jan 23, 2023

In that case could you provide the 10 lines before and after the "Failed to import profile config" lines?

@pajades
Copy link

pajades commented Mar 4, 2023

I am having this import issue as well. This is the expanded error entry from the nextcloud log:

[user_migration] Error: ValueError: Invalid or uninitialized Zip object at <<closure>>

0. /var/www/nextcloud/lib/private/Archive/ZIP.php line 172
   ZipArchive->getFromName()
1. /var/www/nextcloud/apps/user_migration/lib/ImportSource.php line 56
   OC\Archive\ZIP->getFile()
2. /var/www/nextcloud/apps/user_migration/lib/ImportSource.php line 147
   OCA\UserMigration\ImportSource->getFileContents()
3. /var/www/nextcloud/apps/user_migration/lib/Service/UserMigrationService.php line 232
   OCA\UserMigration\ImportSource->getMigratorVersions()
4. /var/www/nextcloud/apps/user_migration/lib/BackgroundJob/UserImportJob.php line 100
   OCA\UserMigration\Service\UserMigrationService->import()
5. /var/www/nextcloud/lib/public/BackgroundJob/Job.php line 78
   OCA\UserMigration\BackgroundJob\UserImportJob->run()
6. /var/www/nextcloud/lib/public/BackgroundJob/QueuedJob.php line 58
   OCP\BackgroundJob\Job->start()
7. /var/www/nextcloud/lib/public/BackgroundJob/QueuedJob.php line 48
   OCP\BackgroundJob\QueuedJob->start()
8. /var/www/nextcloud/cron.php line 152
   OCP\BackgroundJob\QueuedJob->execute() 

Additional information.... The export file that returned the error above was over 2GB and included all of the files.
I performed another export, EXCLUDING the files, resulting in a 5.1MB export file, and THAT one imported with no errors.

@come-nc
Copy link
Collaborator

come-nc commented Mar 6, 2023

Additional information.... The export file that returned the error above was over 2GB and included all of the files. I performed another export, EXCLUDING the files, resulting in a 5.1MB export file, and THAT one imported with no errors.

Is that on 32bit? 32bit PHP is known to have trouble with file sizes above 2GB so maybe that’s it?

@pajades
Copy link

pajades commented Mar 6, 2023

Is that on 32bit? 32bit PHP is known to have trouble with file sizes above 2GB so maybe that’s it?

php 8.1, 64-bit.

@come-nc
Copy link
Collaborator

come-nc commented Mar 9, 2023

Weird, that was my best bet. Both instances are on 64bits?

Can you try again with latest version 3.0.0 just in case? Which Nextcloud version do you use?

@pajades
Copy link

pajades commented Mar 9, 2023

Yes. both instances are 64-bit, but different versions (7.4 old vs. 8.1 new).
I was successful in migrating the user when I omitted the "Files" from the backup.
I rsync'd the 'files' separately and ran an occ files:scan for the user on the new instance and moved on.

Could it have anything to do with the export file size? I had no issue with the smaller exports, only with the ONE 2.4G export.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants