Nextcloud version (eg, 20.0.5): 22.2.0
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): 2.4.x
PHP version (eg, 7.4): 7.3
The issue you are facing:
When using the Google Integration App (or the one for Onedrive) to migrate data to nextcloud, all migrated data will become inaccesible with the error “bad signature”.
Opening the files using an editor reveals that for some reason they are already encrypted using the default encryption module but it doesnt work at all.
Did some searching and found out its related to the encryption (as usual everything breaks if you wanna be secure -.-) and that you can disable the signature check (not recommended at all tho). Now even after doing that I had no success loading the files. This time The error says “Empty string or invalid image” which I can confirm when looking at raw data. An imported document is now just “111111111” (idk if thats really better than no document at all bc it doesnt load). Anyone can tell me what im supposed to do?
Is this the first time you’ve seen this error? (Y/N): Yes, and hopefully the last time as well
Steps to replicate it:
- Install Google / OneDrive Integration
- Enable Server-side encryption
- Import data
- Be sad because it doesn’t open
The output of your Nextcloud log in Admin > Logging:
About 5k times the same line:
[webdav] Fatal: Bad Signature
GET /remote.php/dav/files/Clara/OneDrive%20import/Rechnungen/Rechnung_VK_2020_11091.pdf
from [My lovely IP] by Clara at 2021-10-21T09:41:52+00:00
One full error:
{"reqId":"EfbpYK01O8JyhxnMut7U","level":3,"time":"2021-10-21T16:15:14+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Error while running background job (class: OCA\\Maps\\BackgroundJob\\UpdatePhotoByFileJob, arguments: Array\n(\n [fileId] => 67815\n [userId] => Clara\n)\n)","userAgent":"--","version":"22.2.0.2","exception":{"Exception":"OCP\\Encryption\\Exceptions\\GenericEncryptionException","Message":"Bad Signature","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/encryption/lib/Crypto/Crypt.php","line":470,"function":"checkSignature","class":"OCA\\Encryption\\Crypto\\Crypt","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/encryption/lib/Crypto/Encryption.php","line":377,"function":"symmetricDecryptFileContent","class":"OCA\\Encryption\\Crypto\\Crypt","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Files/Stream/Encryption.php","line":519,"function":"decrypt","class":"OCA\\Encryption\\Crypto\\Encryption","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Files/Stream/Encryption.php","line":317,"function":"readCache","class":"OC\\Files\\Stream\\Encryption","type":"->"},{"function":"stream_read","class":"OC\\Files\\Stream\\Encryption","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Helper.php","line":259,"function":"fread"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/LocalTempFileTrait.php","line":76,"function":"streamCopy","class":"OC_Helper","type":"::"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/LocalTempFileTrait.php","line":48,"function":"toTmpFile","class":"OC\\Files\\Storage\\Wrapper\\Encryption","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php","line":787,"function":"getCachedFile","class":"OC\\Files\\Storage\\Wrapper\\Encryption","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":367,"function":"getLocalFile","class":"OC\\Files\\Storage\\Wrapper\\Encryption","type":"->"},{"file":"/var/www/nextcloud/apps/maps/lib/Service/PhotofilesService.php","line":377,"function":"getLocalFile","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/var/www/nextcloud/apps/maps/lib/Service/PhotofilesService.php","line":137,"function":"getExif","class":"OCA\\Maps\\Service\\PhotofilesService","type":"->"},{"file":"/var/www/nextcloud/apps/maps/lib/BackgroundJob/UpdatePhotoByFileJob.php","line":56,"function":"updateByFileNow","class":"OCA\\Maps\\Service\\PhotofilesService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/Job.php","line":79,"function":"run","class":"OCA\\Maps\\BackgroundJob\\UpdatePhotoByFileJob","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/QueuedJob.php","line":47,"function":"execute","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/var/www/nextcloud/cron.php","line":127,"function":"execute","class":"OCP\\BackgroundJob\\QueuedJob","type":"->"}],"File":"/var/www/nextcloud/apps/encryption/lib/Crypto/Crypt.php","Line":495,"Hint":"Bad Signature","CustomMessage":"Error while running background job (class: OCA\\Maps\\BackgroundJob\\UpdatePhotoByFileJob, arguments: Array\n(\n [fileId] => 67815\n [userId] => Clara\n)\n)"},"id":"617196d2edaa2"}
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'instanceid' => 'idk if I should keep this or not.',
'passwordsalt' => 'passwordsugar - lol',
'secret' => 'shhh dont tell anyone',
'trusted_domains' =>
array (
0 => 'cloud.cynthiaai.de',
),
'datadirectory' => '/var/www/nextcloud-data/',
'dbtype' => 'mysql',
'version' => '22.2.0.2',
'overwrite.cli.url' => 'http://cloud.cynthiaai.de',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'cool name',
'dbpassword' => 'cool password as well',
'installed' => true,
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'memcache.local' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'htaccess.RewriteBase' => '/',
'default_phone_region' => 'DE',
'auth.webauthn.enabled' => false,
'enable_previews' => true,
'enabledPreviewProviders' =>
array (
0 => 'OC\\Preview\\Image',
1 => 'OC\\Preview\\Movie',
2 => 'OC\\Preview\\TXT',
3 => 'OC\\Preview\\MP3',
4 => 'OC\\Preview\\MKV',
5 => 'OC\\Preview\\MP4',
6 => 'OC\\Preview\\AVI',
),
'app_install_overwrite' =>
array (
1 => 'drop_account',
2 => 'socialsharing_email',
3 => 'socialsharing_facebook',
4 => 'socialsharing_twitter',
5 => 'socialsharing_diaspora',
6 => 'hsts',
7 => 'ocsms',
),
'maintenance' => false,
'path' => '',
'ncd_yt_binary' => '/usr/local/bin/youtube-dl',
'ncd_aria2_binary' => '/usr/bin/aria2c',
'loglevel' => 2,
'knowledgebaseenabled' => false,
'theme' => '',
);
The output of your Apache/nginx/system log in /var/log/____
:
nothing regarding our issue.
Please help me out here as this instance is used by multiple people that rely on these integrations so that they dont have to manually port gb’s worth of data.