Error "StatusCode: 500" after update

Infos:

  • Used Zammad version: 5.1
  • Used Zammad installation type: (source, package, docker-compose, …): package
  • Operating system: Ubnuntu 16.4
  • Browser + version: Google Chrome 112.0.5615.138

Expected behavior:

  • Login windows should appear

Actual behavior:

  • StatusCode: 500
    Error ID *****: Please contact your administrator.

There is always a new ID when refreshing the web browser

Steps to reproduce the behavior:

  • Enter helpdesk (zammad) address

The current stable (latest) release of Zammad is 5.4.1.
You’re prune to security advisories, upgrade Zammad asap.

Nobody will be able to answer your question here.
The generated ID is unique to your instance and not a generic one.

The use the production.log to lookup the error ID. It will be followed by the cause.
If I’d had to guess it’s database migration fuck ups.

Hello,

We have already installed the latest version.
We still have the same issue Error ID n32eNJbn
There’s always a new Error ID when refreshing the login page. The previous ID is the last one.

Thank you

You need to search for the Error-ID in the production.log and hopefully there should be some information present about the error.

Thank you, but I don’t understand what’s wrong there…

Looks like the migration was not executed or not executed correctly.
So you could try to run the migration again.

You could also check the output of the following setting (execution could be different related to the installation):

zammad run rails r "pp Setting.get('auth_saml_credentials')"

It seems to be correct because this error has occured after updating to the latest version.

I’ve executed the command and the result is nil

Yes, this is the main problem then.
The auth_saml_credentials setting was added around 4 years ago, seems to be that the setting was removed manually or the migration in the past didn’t work (when the system is already that old, otherwise the initial installation was not correct).

To fix this problem you could try this:

zammad run rails r "Setting.create_if_not_exists(
  title:       __('SAML App Credentials'),
  name:        'auth_saml_credentials',
  area:        'Security::ThirdPartyAuthentication::SAML',
  description: __('Enables user authentication via SAML.'),
  options:     {
    form: [
      {
        display:     __('Display name'),
        null:        true,
        name:        'display_name',
        tag:         'input',
        placeholder: __('SAML'),
      },
      {
        display:     __('IDP SSO target URL'),
        null:        true,
        name:        'idp_sso_target_url',
        tag:         'input',
        placeholder: 'https://capriza.github.io/samling/samling.html',
      },
      {
        display:     __('IDP Single Logout target URL'),
        null:        true,
        name:        'idp_slo_service_url',
        tag:         'input',
        placeholder: 'https://capriza.github.io/samling/slo.html',
      },
      {
        display:     __('IDP certificate'),
        null:        true,
        name:        'idp_cert',
        tag:         'textarea',
        placeholder: '-----BEGIN CERTIFICATE-----\n...-----END CERTIFICATE-----',
      },
      {
        display:     __('IDP certificate fingerprint'),
        null:        true,
        name:        'idp_cert_fingerprint',
        tag:         'input',
        placeholder: 'E7:91:B2:E1:...',
      },
      {
        display:     __('Name Identifier Format'),
        null:        true,
        name:        'name_identifier_format',
        tag:         'input',
        placeholder: 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress',
      },
      {
        display:     __('UID Attribute Name'),
        null:        true,
        name:        'uid_attribute',
        tag:         'input',
        placeholder: '',
        help:        __('Attribute that uniquely identifies the user. If unset, the name identifier returned by the IDP is used.')
      },
      {
        display:  __('Your callback URL'),
        null:     true,
        name:     'callback_url',
        tag:      'auth_provider',
        provider: 'auth_saml',
      },
    ],
  },
  state:       {},
  preferences: {
    permission: ['admin.security'],
  },
  frontend:    false
)"

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