Saml settings reset after reload/doesnt save

Hello,

Iam facing following issue:

Nextcloud version : 22.2.3
Operating system and version: Ubuntu 20.04
Apache or nginx version: nginx/1.18.0
PHP version: 8.0.13

The issue you are facing:

  • Cant configure SAML settings

If Iam trying to edit my settings its getting resetted everytime Iam reloading my browser (it says “saved”) I receive the output from Admin Logging while entering my config (attached config 1) and my config looks like attached config 2 after refreshing the browser…

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

Steps to replicate it:

  1. install app
  2. configure saml settings
  3. refresh tab → settings reset → no SAML login button

The output of your Nextcloud log in Admin > Logging:

Error	index	OneLogin\Saml2\Error: Invalid array settings: idp_entityId_not_found, idp_sso_not_found		2022-01-10T11:43:16+0100
Error	index	OneLogin\Saml2\Error: Invalid array settings: idp_entityId_not_found, idp_sso_not_found		2022-01-10T11:43:15+0100
Error	index	OneLogin\Saml2\Error: Invalid array settings: idp_entityId_not_found, idp_sso_not_found, idp_cert_or_fingerprint_not_found_and_required		2022-01-10T11:43:03+0100
Error	index	OneLogin\Saml2\Error: Invalid array settings: idp_entityId_not_found, idp_sso_not_found, idp_cert_or_fingerprint_not_found_and_required		2022-01-10T11:42:47+0100
Error	index	OneLogin\Saml2\Error: Invalid array settings: idp_entityId_not_found, idp_sso_not_found, idp_cert_or_fingerprint_not_found_and_required		2022-01-10T11:42:33+0100
Error	index	OneLogin\Saml2\Error: Invalid array settings: idp_entityId_not_found, idp_sso_not_found, idp_cert_or_fingerprint_not_found_and_required		2022-01-10T11:42:19+0100
Error	index	OneLogin\Saml2\Error: Invalid array settings: idp_entityId_not_found, idp_sso_not_found		2022-01-10T11:42:09+0100

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

<?php
$CONFIG = array (
  'instanceid' => 'ocybjdlkuzyj',
  'passwordsalt' => 'passwordsalt',
  'secret' => 'secret',
  'overwritehost' => 'domain.com',
  'trusted_domains' =>
  array (
    0 => 'domain.com',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '22.2.3.0',
  'overwrite.cli.url' => 'https://domain.com',
  'dbname' => 'nextcloud_db',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextclouduser',
  'dbpassword' => 'dbpassword',
  'installed' => true,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'default_phone_region' => 'DE',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/run/redis/redis.sock',
    'port' => 0,
    'dbindex' => 0,
    'timeout' => 1.5,
  ),
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'noreply',
  'mail_domain' => 'domain.com',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'smpthost',
  'mail_smtpport' => '465',
  'mail_smtpname' => 'smtpname',
  'mail_smtppassword' => 'smtppassword',
);

Best regards
LittleITworld

config1

no suggestions?

So I just ran into this problem and ended up restoring a backup of my database to recover. It looks like something broke in the latest Nextcloud versions, on the github they are moving the saml config in the db, possibly because of this very reason Move SAML configurations to a table of their own by blizzz · Pull Request #558 · nextcloud/user_saml · GitHub

I imagine if you don’t have a backup db you would need to manually edit your db to update the configs.

From the looks of things all the blocks on the update for NC23 are cleared and it’s just waiting on the devs to run it all through the system.

Seems like the error is still present.

I’m on Nextcloud 24 with a fresh install of user_saml 5.0.0.

Workaround for me was to downgrade user_saml to 4.1.1.