404 Error - User Does Not Exist After Migrating from MariaDB to PostgreSQL

Hello,

I followed the official tutorial to migrate my database from MariaDB to PostgreSQL. After completing the migration and restarting the server. The log in works perfectly but after logging in I’m redirected to the password page which is completely empty and I get this error in the chrome console (same result on another browser):

data:{code: 404, body: ''}
message:"The user does not exist."
name:"PassboltApiFetchError"
stack:"PassboltApiFetchError: The user does not exist.
    at $e.parseResponseJson (chrome-extension://didegimhafipceonhjepacocaffmoppf/serviceWorker/index.js:2:41316)
    at async Ns.get (chrome-extension://didegimhafipceonhjepacocaffmoppf/serviceWorker/index.js:2:137080)
    at async vo.findOne (chrome-extension://didegimhafipceonhjepacocaffmoppf/serviceWorker/index.js:2:212403)
    at async vo.getOrFindMe (chrome-extension://didegimhafipceonhjepacocaffmoppf/serviceWorker/index.js:2:212193)
    at async Gp._exec (chrome-extension://didegimhafipceonhjepacocaffmoppf/serviceWorker/index.js:2:476079)
    at async _.<anonymous> (chrome-extension://didegimhafipceonhjepacocaffmoppf/serviceWorker/index.js:2:477096)"

Checklist
I have read intro post: About the Installation Issues category

I have read the tutorials, help and searched for similar issues
I follow this tutorial How to configure Passbolt with Postgresql (experimental)

I provide relevant information about my server (component names and versions, etc.)
I use Passbolt with docker (image passbolt/passbolt:4.9.1-1-ce-non-root)
Mariadb (10.6.4)
Postgres (16.4)

I provide a copy of my logs and healthcheck

passbolt datacheck --hide-success-details

Everything is PASS

passbolt migrate_postgres

using migration paths

  • /etc/passbolt/Migrations
    using seed paths
    using environment default
    using adapter pgsql
    using database passbolt-preprod
    ordering by creation time

== 20211121231300 V340MigrateASCIIFieldsEncoding: migrating
== 20211121231300 V340MigrateASCIIFieldsEncoding: migrated 2.2398s

== 20211121231301 V340MigrateASCIIFieldsEncodingPro: migrating
== 20211121231301 V340MigrateASCIIFieldsEncodingPro: migrated 0.0149s

== 20211122732400 V350ConvertIdFieldsToUuidFields: migrating
== 20211122732400 V350ConvertIdFieldsToUuidFields: migrated 0.4594s

All Done. Took 2.7250s
Passbolt can now be used with Postgres.

passbolt healthcheck

Environment

[PASS] PHP version 8.2.20.
[PASS] PHP version is 8.1 or above.
[PASS] PCRE compiled with unicode support.
[PASS] Mbstring extension is installed.
[PASS] Intl extension is installed.
[PASS] GD or Imagick extension is installed.
[PASS] The temporary directory and its content are writable and not executable.
[PASS] The logs directory and its content are writable.

Config files

[PASS] The application config file is present
[WARN] The passbolt config file is missing in /etc/passbolt/
[HELP] Copy /etc/passbolt/passbolt.default.php to /etc/passbolt/passbolt.php
[HELP] The passbolt config file is not required if passbolt is configured with environment variables

Core config

[PASS] Cache is working.
[PASS] Debug mode is off.
[PASS] Unique value set for security.salt
[PASS] Full base url is set to https://
[PASS] App.fullBaseUrl validation OK.
[PASS] /healthcheck/status is reachable.

SSL Certificate

[PASS] SSL peer certificate validates.
[PASS] Hostname is matching in SSL certificate.
[PASS] Not using a self-signed certificate.

SMTP settings

[PASS] The SMTP Settings plugin is enabled.
[PASS] SMTP Settings coherent. You may send a test email to validate them.
[PASS] The SMTP Settings source is: database.
[WARN] The SMTP Settings plugin endpoints are enabled.
[HELP] It is recommended to disable the plugin endpoints.
[HELP] Set the PASSBOLT_SECURITY_SMTP_SETTINGS_ENDPOINTS_DISABLED environment variable to true.
[HELP] Or set passbolt.security.smtpSettings.endpointsDisabled to true in /etc/passbolt/passbolt.php.
[PASS] No custom SSL configuration for SMTP server.

JWT Authentication

[PASS] The JWT Authentication plugin is enabled.
[FAIL] The /etc/passbolt/jwt/ directory should not be writable.
[HELP] You can try:
[HELP] sudo chown -Rf root:www-data /etc/passbolt/jwt/
[HELP] sudo chmod 750 /etc/passbolt/jwt/
[HELP] sudo chmod 640 /etc/passbolt/jwt/jwt.key
[HELP] sudo chmod 640 /etc/passbolt/jwt/jwt.pem
[PASS] A valid JWT key pair was found.

GPG Configuration

[PASS] PHP GPG Module is installed and loaded.
[PASS] The environment variable GNUPGHOME is set to /var/lib/passbolt/.gnupg.
[PASS] The directory /var/lib/passbolt/.gnupg containing the keyring is writable by the webserver user.
[PASS] The server OpenPGP key is not the default one.
[PASS] The public key file is defined in /etc/passbolt/passbolt.php and readable.
[PASS] The private key file is defined in /etc/passbolt/passbolt.php and readable.
[PASS] The server key fingerprint matches the one defined in /etc/passbolt/passbolt.php.
[PASS] The server public key defined in the /etc/passbolt/passbolt.php (or environment variables) is in the keyring.
[PASS] There is a valid email id defined for the server key.
[PASS] The public key can be used to encrypt a message.
[PASS] The private key can be used to sign a message.
[PASS] The public and private keys can be used to encrypt and sign a message.
[PASS] The private key can be used to decrypt a message.
[PASS] The private key can be used to decrypt and verify a message.
[PASS] The public key can be used to verify a signature.
[PASS] The server public key format is Gopengpg compatible.
[PASS] The server private key format is Gopengpg compatible.

Application configuration

[PASS] Using latest passbolt version (4.9.1).
[FAIL] Passbolt is not configured to force SSL use.
[HELP] Set passbolt.ssl.force to true in /etc/passbolt/passbolt.php.
[PASS] App.fullBaseUrl is set to HTTPS.
[PASS] Selenium API endpoints are disabled.
[PASS] Search engine robots are told not to index content.
[INFO] The Self Registration plugin is enabled.
[INFO] Registration is closed, only administrators can add users.
[PASS] The deprecated self registration public setting was not found in /etc/passbolt/passbolt.php.
[PASS] Host availability will be checked.
[PASS] Serving the compiled version of the javascript app.
[WARN] Some email notifications are disabled by the administrator.
[PASS] The database schema is up to date.

Database

[PASS] The application is able to connect to the database
[PASS] 51 tables found.
[PASS] Some default content is present.

[FAIL] 2 error(s) found. Hang in there!

The result of the healthcheck is the same as before the migration.

passbolt cleanup

Cleanup shell (fix mode)

2024-11-13 10:19:27 error: [PDOException] SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: character = uuid
LINE 1: …" LEFT JOIN “folders” “Folders” ON “Folders”.“id” = "Permiss…
^
HINT: No operator matches the given name and argument types. You might need to add explicit type casts. in /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Database/Statement/StatementDecorator.php on line 191

In the Passbolt logs, I see this error:

{IP} - - [13/Nov/2024:10:38:13 +0000] "GET /users/{my-user-id}.json?api-version=v2&contain%5Bprofile%5D=1&contain%5Baccount_recovery_user_setting%5D=1 HTTP/1.1" 404 367 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"

I describe the steps I have taken to trouble shoot the problem
Create a new db on postgres to see if it works with a new db → yes

I describe the steps on how to reproduce the issue
Use pgloader to migrate the db from Mariadb to Postgres

Thanks for your help