End to end encryption for passwords cannot log in when 2 factor enabled. NC 20.0.4

Hello.

I was testing out the passwords feature for my nc instance and activated the end to end encryption for it. I entered my passphrase 2 times as requested and successfully installed the encryption. I also enabled 2-factor through nextcloud notifications. That works perfectly. I then logged out and back in to my user. When I go to the passwords app, it asks me for login, I enter the password and I am given an error that looks like this:

Content type mismatch: Expected application/json, got text/html; charset=UTF-8

And I am basically locked out of my passwords app. I tried firefox and phone browser(bromite), same thing,

When I remove the 2 factor auth (Nextcloud notification)
Then I am able to use the encryption password I set.

I am able to log in the main NC just fine. Only the passwords app has issue here.

The issue you are facing:
I am not able to log in to my passwords app after setting up end to end encryption and 2 factor authemtication.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Go to passwords app
  2. More -> Settings -> Security -> Enable End to end encryption (Complete process)
  3. Log out of NC and back in to reset session variables.
  4. Try to log in the passwords app and choose “Nextcloud notification” in the option below the password.

The output of your Nextcloud log in Admin > Logging:

Error	PHP	PHP Startup: Unable to load dynamic library 'apc.so' (tried: /usr/lib/php/modules/apc.so (/usr/lib/php/modules/apc.so: cannot open shared object file: No such file or directory), /usr/lib/php/modules/apc.so.so (/usr/lib/php/modules/apc.so.so: cannot open shared object file: No such file or directory)) at Unknown#0		2021-01-04T10:13:23+0400
Error	PHP	PHP Startup: Unable to load dynamic library 'apc.so' (tried: /usr/lib/php/modules/apc.so (/usr/lib/php/modules/apc.so: cannot open shared object file: No such file or directory), /usr/lib/php/modules/apc.so.so (/usr/lib/php/modules/apc.so.so: cannot open shared object file: No such file or directory)) at Unknown#0		2021-01-04T10:13:02+0400
Error	PHP	PHP Startup: Unable to load dynamic library 'apc.so' (tried: /usr/lib/php/modules/apc.so (/usr/lib/php/modules/apc.so: cannot open shared object file: No such file or directory), /usr/lib/php/modules/apc.so.so (/usr/lib/php/modules/apc.so.so: cannot open shared object file: No such file or directory)) at Unknown#0		2021-01-04T10:12:32+0400
Fatal	passwords	Failed to load api token for [my username here]		2021-01-04T10:03:50+0400
Error	passwords	OC\Authentication\Exceptions\InvalidTokenException: Token with ID 672 does not exist		2021-01-04T10:03:50+0400
Error	PHP	PHP Startup: Unable to load dynamic library 'apc.so' (tried: /usr/lib/php/modules/apc.so (/usr/lib/php/modules/apc.so: cannot open shared object file: No such file or directory), /usr/lib/php/modules/apc.so.so (/usr/lib/php/modules/apc.so.so: cannot open shared object file: No such file or directory)) at Unknown#0		2021-01-04T10:03:24+0400
Error	passwords	OCA\Passwords\Exception\ApiException: Too many failed login attempts		2021-01-04T10:02:53+0400
Fatal	passwords	Error "Too many failed login attempts" in OCA\Passwords\Controller\Api\SessionApiController::open		2021-01-04T10:02:53+0400
Error	PHP	PHP Startup: Unable to load dynamic library 'apc.so' (tried: /usr/lib/php/modules/apc.so (/usr/lib/php/modules/apc.so: cannot open shared object file: No such file or directory), /usr/lib/php/modules/apc.so.so (/usr/lib/php/modules/apc.so.so: cannot open shared object file: No such file or directory)) at Unknown#0		2021-01-04T10:02:22+0400
Error	PHP	PHP Startup: Unable to load dynamic library 'apc.so' (tried: /usr/lib/php/modules/apc.so (/usr/lib/php/modules/apc.so: cannot open shared object file: No such file or directory), /usr/lib/php/modules/apc.so.so (/usr/lib/php/modules/apc.so.so: cannot open shared object file: No such file or directory)) at Unknown#0		2021-01-04T10:02:19+0400
Error	PHP	PHP Startup: Unable to load dynamic library 'apc.so' (tried: /usr/lib/php/modules/apc.so (/usr/lib/php/modules/apc.so: cannot open shared object file: No such file or directory), /usr/lib/php/modules/apc.so.so (/usr/lib/php/modules/apc.so.so: cannot open shared object file: No such file or directory)) at Unknown#0		2021-01-04T10:01:18+0400
Error	passwords	OCA\Passwords\Exception\ApiException: Too many failed login attempts		2021-01-04T10:00:18+0400
Fatal	passwords	Error "Too many failed login attempts" in OCA\Passwords\Controller\Api\SessionApiController::open		2021-01-04T10:00:18+0400
Error	PHP	PHP Startup: Unable to load dynamic library 'apc.so' (tried: /usr/lib/php/modules/apc.so (/usr/lib/php/modules/apc.so: cannot open shared object file: No such file or directory), /usr/lib/php/modules/apc.so.so (/usr/lib/php/modules/apc.so.so: cannot open shared object file: No such file or directory)) at Unknown#0		2021-01-04T09:53:11+0400
Error	passwords	OCA\Passwords\Exception\ApiException: Too many failed login attempts		2021-01-04T09:45:53+0400
Fatal	passwords	Error "Too many failed login attempts" in OCA\Passwords\Controller\Api\SessionApiController::open		2021-01-04T09:45:53+0400
Error	PHP	PHP Startup: Unable to load dynamic library 'apc.so' (tried: /usr/lib/php/modules/apc.so (/usr/lib/php/modules/apc.so: cannot open shared object file: No such file or directory), /usr/lib/php/modules/apc.so.so (/usr/lib/php/modules/apc.so.so: cannot open shared object file: No such file or directory)) at Unknown#0		2021-01-04T09:45:18+0400
Error	PHP	PHP Startup: Unable to load dynamic library 'apc.so' (tried: /usr/lib/php/modules/apc.so (/usr/lib/php/modules/apc.so: cannot open shared object file: No such file or directory), /usr/lib/php/modules/apc.so.so (/usr/lib/php/modules/apc.so.so: cannot open shared object file: No such file or directory)) at Unknown#0		2021-01-04T09:45:17+0400
Error	PHP	PHP Startup: Unable to load dynamic library 'apc.so' (tried: /usr/lib/php/modules/apc.so (/usr/lib/php/modules/apc.so: cannot open shared object file: No such file or directory), /usr/lib/php/modules/apc.so.so (/usr/lib/php/modules/apc.so.so: cannot open shared object file: No such file or directory)) at Unknown#0		2021-01-04T09:44:05+0400
Error	PHP	PHP Startup: Unable to load dynamic library 'apc.so' (tried: /usr/lib/php/modules/apc.so (/usr/lib/php/modules/apc.so: cannot open shared object file: No such file or directory), /usr/lib/php/modules/apc.so.so (/usr/lib/php/modules/apc.so.so: cannot open shared object file: No such file or directory)) at Unknown#0		2021-01-04T09:43:40+0400
Error	PHP	PHP Startup: Unable to load dynamic library 'apc.so' (tried: /usr/lib/php/modules/apc.so (/usr/lib/php/modules/apc.so: cannot open shared object file: No such file or directory), /usr/lib/php/modules/apc.so.so (/usr/lib/php/modules/apc.so.so: cannot open shared object file: No such file or directory)) at Unknown#0		2021-01-04T09:42:05+0400
Fatal	passwords	Failed to load api token for [my username here]		2021-01-04T09:42:03+0400
Error	passwords	OC\Authentication\Exceptions\InvalidTokenException: Token with ID 668 does not exist		2021-01-04T09:42:03+0400
Error	passwords	OCA\Passwords\Exception\ApiException: Too many failed login attempts		2021-01-04T09:41:58+0400
Fatal	passwords	Error "Too many failed login attempts" in OCA\Passwords\Controller\Api\SessionApiController::open		2021-01-04T09:41:58+0400
Error	PHP	PHP Startup: Unable to load dynamic library 'apc.so' (tried: /usr/lib/php/modules/apc.so (/usr/lib/php/modules/apc.so: cannot open shared object file: No such file or directory), /usr/lib/php/modules/apc.so.so (/usr/lib/php/modules/apc.so.so: cannot open shared object file: No such file or directory)) at Unknown#0		2021-01-04T09:41:42+0400
Fatal	passwords	Failed to load api token for [my username here]		2021-01-04T09:41:39+0400
Error	passwords	OC\Authentication\Exceptions\InvalidTokenException: Token with ID 667 does not exist		2021-01-04T09:41:39+0400
Error	PHP	PHP Startup: Unable to load dynamic library 'apc.so' (tried: /usr/lib/php/modules/apc.so (/usr/lib/php/modules/apc.so: cannot open shared object file: No such file or directory), /usr/lib/php/modules/apc.so.so (/usr/lib/php/modules/apc.so.so: cannot open shared object file: No such file or directory)) at Unknown#0		2021-01-04T09:40:45+0400
Error	passwords	OCA\Passwords\Exception\ApiException: Too many failed login attempts		2021-01-04T09:39:42+0400
Fatal	passwords	Error "Too many failed login attempts" in OCA\Passwords\Controller\Api\SessionApiController::open		2021-01-04T09:39:42+0400
Error	PHP	PHP Startup: Unable to load dynamic library 'apc.so' (tried: /usr/lib/php/modules/apc.so (/usr/lib/php/modules/apc.so: cannot open shared object file: No such file or directory), /usr/lib/php/modules/apc.so.so (/usr/lib/php/modules/apc.so.so: cannot open shared object file: No such file or directory)) at Unknown#0		2021-01-04T09:38:13+0400
Fatal	passwords	Failed to load api token for [my username here]		2021-01-04T09:38:12+0400
Error	passwords	OC\Authentication\Exceptions\InvalidTokenException: Token with ID 666 does not exist		2021-01-04T09:38:12+0400
Error	passwords	OCA\Passwords\Exception\ApiException: Too many failed login attempts		2021-01-04T09:38:07+0400
Fatal	passwords	Error "Too many failed login attempts" in OCA\Passwords\Controller\Api\SessionApiController::open		2021-01-04T09:38:07+0400
Fatal	passwords	Failed to load api token for [my username here]		2021-01-04T09:36:52+0400
Error	passwords	OC\Authentication\Exceptions\InvalidTokenException: Token with ID 665 does not exist		2021-01-04T09:36:52+0400
Error	passwords	OCA\Passwords\Exception\ApiException: Too many failed login attempts		2021-01-04T09:36:39+0400
Fatal	passwords	Error "Too many failed login attempts" in OCA\Passwords\Controller\Api\SessionApiController::open		2021-01-04T09:36:39+0400
Fatal	passwords	Failed to load api token for [my username here]		2021-01-04T09:36:19+0400
Error	passwords	OC\Authentication\Exceptions\InvalidTokenException: Token with ID 664 does not exist		2021-01-04T09:36:19+0400
Error	passwords	OCA\Passwords\Exception\ApiException: Too many failed login attempts		2021-01-04T09:36:10+0400
Fatal	passwords	Error "Too many failed login attempts" in OCA\Passwords\Controller\Api\SessionApiController::open		2021-01-04T09:36:10+0400
Error	PHP	PHP Startup: Unable to load dynamic library 'apc.so' (tried: /usr/lib/php/modules/apc.so (/usr/lib/php/modules/apc.so: cannot open shared object file: No such file or directory), /usr/lib/php/modules/apc.so.so (/usr/lib/php/modules/apc.so.so: cannot open shared object file: No such file or directory)) at Unknown#0		2021-01-04T09:35:45+0400
Error	PHP	PHP Startup: Unable to load dynamic library 'apc.so' (tried: /usr/lib/php/modules/apc.so (/usr/lib/php/modules/apc.so: cannot open shared object file: No such file or directory), /usr/lib/php/modules/apc.so.so (/usr/lib/php/modules/apc.so.so: cannot open shared object file: No such file or directory)) at Unknown#0		2021-01-04T09:35:43+0400
Fatal	passwords	Failed to load api token for [my username here]		2021-01-04T09:35:39+0400
Error	passwords	OC\Authentication\Exceptions\InvalidTokenException: Token with ID 661 does not exist		2021-01-04T09:35:39+0400
Error	PHP	PHP Startup: Unable to load dynamic library 'apc.so' (tried: /usr/lib/php/modules/apc.so (/usr/lib/php/modules/apc.so: cannot open shared object file: No such file or directory), /usr/lib/php/modules/apc.so.so (/usr/lib/php/modules/apc.so.so: cannot open shared object file: No such file or directory)) at Unknown#0		2021-01-04T09:34:16+0400
Error	PHP	PHP Startup: Unable to load dynamic library 'apc.so' (tried: /usr/lib/php/modules/apc.so (/usr/lib/php/modules/apc.so: cannot open shared object file: No such file or directory), /usr/lib/php/modules/apc.so.so (/usr/lib/php/modules/apc.so.so: cannot open shared object file: No such file or directory)) at Unknown#0

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

<?php
$CONFIG = array (
  'instanceid' => 'yadayadayada',
  'passwordsalt' => 'yadayadayada',
  'secret' => 'yadayadayadayadayadayada',
  'trusted_domains' => 
  array (
    0 => 'yadayadayada',
    1 => 'yadayadayada',
  ),
  'datadirectory' => '/var/nextcloud',
  'dbtype' => 'mysql',
  'version' => '20.0.4.0',
  'overwrite.cli.url' => 'www.example.com',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'az',
  'dbpassword' => 'yadayadayada',
  'installed' => true,
  'overwritehost' => 'www.example.com',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 0,
  'defaultapp' => 'files',
  'app_install_overwrite' => 
  array (
    0 => 'documentserver_community',
    1 => 'drawio',
    2 => 'joplin',
  ),
  'updater.secret' => 'yadayadayada',
  'distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'filelocking.enabled' => 'true',
  'redis' => 
  array (
    'host' => '/run/redis/redis.sock',
    'port' => 0,
    'dbindex' => 0,
    'password' => 'secret',
    'timeout' => 1.5,
  ),
  'memcache.local' => '\\OC\\Memcache\\APCu',
);

The output of your Apache/nginx/system log in /var/log/____:
Log is very large. so here is a download link.
Yes that is the address don’t judge… XD

Installation information:

I have installed nextcloud through the AUR using yay on endevour os running the LTS arch kernel.

This is not a pressing matter however, having the ability to use 2 factor without locking myself out would be nice.

Please, let me know. if any additional info is needed.

Cheers