Server-Side Encryption: OC_DEFAULT_MODULE not exist after Upgrade from 28.0.1.1 to 28.0.3.2

Nextcloud version (eg, 20.0.5): 28.0.3.2
Operating system and version (eg, Ubuntu 20.04): Linux 6.6.1-1.el8.elrepo
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4
PHP version (eg, 7.4): 8.2.16

The issue you are facing:

After upgrading (which was without errors) it’s not possible to upload or download files anymore. Even in the web interface, files could not be opened, uploaded, or downloaded. Error message is:

Error during upload: Encryption not ready: Default encryption module not loaded.

This is also shown in the log files. I use other apps to connect to Nextcloud as well, which show encryption error.

I have Server-Side Encryption enabled, yet the web GUI shows it’s disabled. The command line says that server-side encryption is enabled. I also have home storage encryption enabled.

When running command occ encryption:encrypt-all, it stops with message:

In Manager.php line 199:
Default enryption module not loaded.

I restarted php with no impact.

In a user account I could see files are present. In the admin account it shows no files, yet I could see them when I login to the server with ftp.

There is a message in the log that says:

"message":"Encryption module defined in \"files/Templates/Readme.md\" not loaded!

This message or alterations of it comes up often in the logs.

Calendar could be accessed from android, but not from my Ubuntu desktop. But might be a different issue. Who knows?

How do I get the default encryption module loaded?

Is this the first time you’ve seen this error? Y

Steps to replicate it:

Can’t tell as I don’t have another instance of Nextcloud running anywhere.

The output of your Nextcloud log in Admin > Logging:

Error	webdav	
ModuleDoesNotExistsException
Module with ID: OC_DEFAULT_MODULE does not exist.

Error	no app in context	
Encryption module defined in "files/Templates/Readme.md" not loaded!

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'instanceid' => 'sensitive_data_removed',
  'passwordsalt' => 'sensitive_data_removed',
  'secret' => 'sensitive_data_removed',
  'trusted_domains' => 
  array (
    0 => 'subdomain.domain.com',
  ),
  'datadirectory' => '/pathto/data',
  'dbtype' => 'mysql',
  'version' => '28.0.3.2',
  'overwrite.cli.url' => 'https://subdomain.domain.com',
  'htaccess.RewriteBase' => '/',
  'dbname' => 'sensitive_data_removed',
  'dbhost' => 'localhost:3306',
  'dbport' => '',
  'dbtableprefix' => 'prefix_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'sensitive_data_removed',
  'dbpassword' => 'sensitive_data_removed',
  'installed' => true,
  'auth.bruteforce.protection.enabled' => true,
  'htaccess.IgnoreFrontController' => false,
  'default_phone_region' => 'DE',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'filelocking.enabled' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
    'dbindex' => 0,
    'timeout' => 1.5,
  ),
  'theme' => '',
  'loglevel' => 0,
  'debug' => false,
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_from_address' => 'webmaster',
  'mail_domain' => 'domain.com',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'sensitive_data_removed',
  'mail_smtpport' => '465',
  'mail_smtpname' => 'sensitive_data_removed',
  'mail_smtppassword' => 'sensitive_data_removed',
  'twofactor_enforced' => 'true',
  'twofactor_enforced_groups' => 
  array (
    0 => 'admin',
    1 => 'Users',
  ),
  'twofactor_enforced_excluded_groups' => 
  array (
  ),
  'has_rebuilt_cache' => true,
  'maintenance' => false,
);

Hmm.

What installation method are you using for Nextcloud? What update process did you follow?

Can you run an integrity check? e.g. occ integrity:check-core and see if anything comes up?

Hi,
I can’t remember how I had installed Nextcloud, but I think it was through the command line.
Updates are always done through command line as follows:

/pathtonextcloud/updater/updater.phar --no-interaction
occ upgrade
occ maintenance:mode --off
occ db:add-missing-indices
occ db:add-missing-columns
occ db:convert-filecache-bigint => this one often does nothing)

This process worked for the last three or four updates perfectly.

Running the command occ integrity:check-core only brought up two files:
htaccess hash is changed, which is correct as I adjusted the Content Security Policy lately. The same is true for the hash of lib/public/AppFramework/Http/ContentSecurityPolicy.php as I changed things there as well.

Though, nothing that relates to the server-side encryption.

The log only shows:
“Encryption not ready: Default encryption module not loaded” when I try to upload a file. The file isn’t even added unencrypted, as the log file says.

And I could not run the update again as it says I already run the latest version.

Is the encryption app still shown as enabled under occ app:list?

Yes, it is listed as being enabled. But the Web GUI shows disabled.

But not in the Web UI under Apps, correct? There “Default encryption module” is enabled?

Yes, under Apps it’s also displayed as enabled.
Under Administration Settings > Security is displays disabled.

1 Like

I faced the same problem. It happening in case if encryption was successfully enabled on UI and after disabled on ui. In this case it’s not possible to enable it again and uploading is not working

Still the same with me. Can’t upload, download or view files on the server. I wonder how to get the default encryption module loaded. This is what the system says, it’s not loaded.

1 Like

Same problem on initial enabling of the server side encryption.

Nextcloud 28.0.3

I am looking forward to suggestions!! :pray:

I kind of solved my issue working from the hypothesis that the web admin interface is the culprit. So:

  1. I rolled back to the state before attempting encryption;
  2. Did the encryption from occ: Manual
1 Like

@Milen_Ivanov, great, you found a solution for yourself.

I used occ commands several times with no avail. Might be, that my situation is different as I had encryption enabled before updating to 28.0.3.

As it seems, no one has an idea of how to help me solve the problem. Thus, I wait for another update in the hope this will solve the issue.

1 Like

Doesn’t anyone has an idea how to get this Default Encryption Module loaded?
I couldn’t believe that nobody has.

And it starts frustrating me that it does not work, as it ruins my workflows. I need to share files with other businesses, but can’t upload them to my Nextcloud instance as of the encryption module not being loaded.

I just discovered that in User Settings > Security there is a message under Basic encryption module which says “Encryption App is enabled, but your keys are not initialized. Please log-out and log-in again.”

Since the problem started, I had been logging in and out so many times, this shouldn’t come up. Also, the encryption keys aren’t changed, they are still in the same place on the server as before the update.

As a workaround, I have disabled encryption and decrypted all files on my server. That wasn’t what I like to do, but I need to use Nextcloud for my workflows.

I’m still interested in a solution about getting encryption to work again. Both on the server-side and for the user home directories. I may try to encrypt everything again the next days, if I have time to do so. I’ll post my results here.

Anyone having an idea?

Thanks!

Updating to Version 28.0.4 seems to have solved the encryption issue.
However, after reading a lot about encryption in Nextcloud and the problems it creates to my workflows if the encryption does not work, I decided to disable it completely.
Alternatively, I still could send encrypted files to the Nextcloud instance.

Thanks for all the help and of course, thanks to all the developers who have created and are maintaining such a great solution.

All the Best!

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.