Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Could not validate entity smtpSettings." on API status page when PASSBOLT_PLUGINS_SMTP_SETTINGS_ENABLED=false #41

Open
fdevos-open opened this issue Sep 25, 2024 · 1 comment

Comments

@fdevos-open
Copy link

Hi,

I run Passbolt 4.9.1 server as a Docker container.

I want to disable SMTP configuration UI because I want to (re)configure as code the configuration on startup. So, I set PASSBOLT_PLUGINS_SMTP_SETTINGS_ENABLED=false environment variable as documented on https://www.passbolt.com/docs/hosting/configure/environment-reference/. SMTP configuration UI is well disabled.

But Passbolt API Status page could not be displayed anymore with this environment variable due to a "Could not validate entity smtpSettings." error.

https://myhost/healthcheck.json?api-version=v2 returns a JSON with the only smtpSettings.isEnabled property but the entity requires ["isEnabled", "areEndpointsDisabled", "errorMessage", "source", "isInDb"] properties (see https://github.com/passbolt/passbolt_styleguide/blob/v4.9.1/src/shared/models/entity/healthcheck/associations/smtpSettingsEntity.js#L34).

Healthcheck JSON :

{
    "header": {
        ...
    },
    "body": {
        ...
        "smtpSettings": {
            "isEnabled": false
        },
        ...
    }
}

Javascript stacktrace :

EntityValidationError: Could not validate entity smtpSettings.
    $ https://myhost/js/app/api-app.js?v=4.9.1:2
    getOrInitEntityValidationError https://myhost/js/app/api-app.js?v=4.9.1:2
    validateObject https://myhost/js/app/api-app.js?v=4.9.1:2
    validate https://myhost/js/app/api-app.js?v=4.9.1:2
    Qr https://myhost/js/app/api-app.js?v=4.9.1:2
    il https://myhost/js/app/api-app.js?v=4.9.1:2
    fetchHealthcheckData https://myhost/js/app/api-app.js?v=4.9.1:2
    componentDidMount https://myhost/js/app/api-app.js?v=4.9.1:2
    mo https://myhost/js/app/api-vendors.js?v=4.9.1:2
    $i https://myhost/js/app/api-vendors.js?v=4.9.1:2
    unstable_runWithPriority https://myhost/js/app/api-vendors.js?v=4.9.1:2
    zr https://myhost/js/app/api-vendors.js?v=4.9.1:2
    Oi https://myhost/js/app/api-vendors.js?v=4.9.1:2
    yi https://myhost/js/app/api-vendors.js?v=4.9.1:2
    Kr https://myhost/js/app/api-vendors.js?v=4.9.1:2
    unstable_runWithPriority https://myhost/js/app/api-vendors.js?v=4.9.1:2
    zr https://myhost/js/app/api-vendors.js?v=4.9.1:2
    Kr https://myhost/js/app/api-vendors.js?v=4.9.1:2
    Gr https://myhost/js/app/api-vendors.js?v=4.9.1:2
    fi https://myhost/js/app/api-vendors.js?v=4.9.1:2
    enqueueSetState https://myhost/js/app/api-vendors.js?v=4.9.1:2
    setState https://myhost/js/app/api-vendors.js?v=4.9.1:2
    componentDidMount https://myhost/js/app/api-app.js?v=4.9.1:2
    mo https://myhost/js/app/api-vendors.js?v=4.9.1:2
    $i https://myhost/js/app/api-vendors.js?v=4.9.1:2
    unstable_runWithPriority https://myhost/js/app/api-vendors.js?v=4.9.1:2
    zr https://myhost/js/app/api-vendors.js?v=4.9.1:2
    Oi https://myhost/js/app/api-vendors.js?v=4.9.1:2
    yi https://myhost/js/app/api-vendors.js?v=4.9.1:2
    Kr https://myhost/js/app/api-vendors.js?v=4.9.1:2
    unstable_runWithPriority https://myhost/js/app/api-vendors.js?v=4.9.1:2
    zr https://myhost/js/app/api-vendors.js?v=4.9.1:2
    Kr https://myhost/js/app/api-vendors.js?v=4.9.1:2
    Gr https://myhost/js/app/api-vendors.js?v=4.9.1:2
    fi https://myhost/js/app/api-vendors.js?v=4.9.1:2
    enqueueSetState https://myhost/js/app/api-vendors.js?v=4.9.1:2
    setState https://myhost/js/app/api-vendors.js?v=4.9.1:2
    initLocale https://myhost/js/app/api-app.js?v=4.9.1:2
    componentDidMount https://myhost/js/app/api-app.js?v=4.9.1:2
    mo https://myhost/js/app/api-vendors.js?v=4.9.1:2
    $i https://myhost/js/app/api-vendors.js?v=4.9.1:2
    unstable_runWithPriority https://myhost/js/app/api-vendors.js?v=4.9.1:2
    zr https://myhost/js/app/api-vendors.js?v=4.9.1:2
    Oi https://myhost/js/app/api-vendors.js?v=4.9.1:2
    yi https://myhost/js/app/api-vendors.js?v=4.9.1:2
    fi https://myhost/js/app/api-vendors.js?v=4.9.1:2
    Ji https://myhost/js/app/api-vendors.js?v=4.9.1:2
    ns https://myhost/js/app/api-vendors.js?v=4.9.1:2
    bi https://myhost/js/app/api-vendors.js?v=4.9.1:2
    ns https://myhost/js/app/api-vendors.js?v=4.9.1:2
    render https://myhost/js/app/api-vendors.js?v=4.9.1:2
    6605 https://myhost/js/app/api-app.js?v=4.9.1:2
    s https://myhost/js/app/api-app.js?v=4.9.1:2
    o https://myhost/js/app/api-app.js?v=4.9.1:2
    O https://myhost/js/app/api-app.js?v=4.9.1:2
    <anonymous> https://myhost/js/app/api-app.js?v=4.9.1:2
    <anonymous> https://myhost/js/app/api-app.js?v=4.9.1:2

Regards.

@Benj1er
Copy link
Member

Benj1er commented Sep 26, 2024

Hello @fdevos-open,

Thanks for your report.

A follow-up ticket was created on the internal tracker: PB-35690

Best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants