Skip to content

Failed to decrypt the saved password #9258

@amirhossein-deriv

Description

@amirhossein-deriv

Describe the bug

We upgraded our pgAdmin to V9.3, now there are two kind of issues:

the saved password for one user gets error:
Failed to decrypt the saved password. Error: 'utf-8' codec can't decode byte 0xaf in position 1: invalid start byte

and

Failed to decrypt the saved password. Error: 'utf-8' codec can't decode byte Oxd5 in position 0: invalid continuation byte
to solve this issue regarding our online research we find these links helpful and based on them we cleared the passwords for all connections and setup them.

https://www.pgadmin.org/docs/pgadmin4/9.3/clear_saved_passwords.html
https://stackoverflow.com/questions/56526882/pgadmin-error-failed-to-decrypt-the-saved-password

We have the second issue that raised after the other one:
connection failed: connection to server at "xx.xx.xx.xx", port 5432 failed: fe_sendauth: no password supplied
To Reproduce

Steps to reproduce the behavior:

upgrade version 8.12 to 9.3
See the error
Expected behavior

Regarding the issue posted from older versions, it should be solved and don't raise again.

Error message

Failed to decrypt the saved password. Error: 'utf-8' codec can't decode byte 0xaf in position 1: invalid start byte

Failed to decrypt the saved password. Error: 'utf-8' codec can't decode byte Oxd5 in position 0: invalid continuation byte

Screenshots

Image Image Docker:

image: dpage/pgadmin4:9.3
Version: [e.g. 6.15]
Mode: [e.g Desktop or Server]
Browser: chrome
Package type: Container

sharing below our pgadmin info

Version 9.5
Application Mode Server
Commit a571490 2025-06-27
Python Version 3.12.11
Browser Chrome 139.0.0.0
Operating System Alpine Linux v3.22, Linux-5.10.0-35-cloud-amd64-x86_64-with
pgAdmin Database File /var/lib/pgadmin/pgadmin4.db
And this is our PgAdmin Docker compose file

version: '3.7'
services:
pgadmin:
image: dpage/pgadmin4:9.5
deploy:
replicas: 1
placement:
constraints: [node.role == manager]
resources:
limits:
memory: 4G
ports:
- 8001:80
environment:
- PGADMIN_DEFAULT_EMAIL=
- PGADMIN_DEFAULT_PASSWORD=
- PGADMIN_CONFIG_ENHANCED_COOKIE_PROTECTION=False
- PGADMIN_CONFIG_WTF_CSRF_CHECK_DEFAULT=False
volumes:
- type: bind
source: /data/pgadmin
target: /var/lib/pgadmin
- type: bind
source: /data/pgadmin/servers.json
target: /pgadmin/servers.json
please do let us know if anything else we can provide to help replicating this

unsolved lssue:
#8776
#5487

Metadata

Metadata

Labels

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions