Neon Local fails with HTTP 412 on reveal_password API for default role
I'm using Neon Local via Docker and encountered an issue where the container fails to start due to a 412 error when calling the
reveal_password
API for a role like hibohiboo66+hasura
.
The error output is:
requests.exceptions.HTTPError: 412 Client Error: Precondition Failed for url: https://console.neon.tech/api/v2/projects/...
{"message":"storing passwords is not enabled for the project"}
The affected role is automatically created when I use my email address hibohiboo66+hasura@gmail.com
to create the project.
It seems reveal_password
does not support custom roles (or roles that have passwords not stored by Neon), but Neon Local attempts to fetch it anyway. This leads to failure on start-up.
neon-local-1 | Watching /scripts/.git/HEAD for changes...
neon-local-1 | Generating self-signed certificate...
neon-local-1 | Certificate request self-signature ok
neon-local-1 | subject=CN=localhost, O=DO NOT TRUST, OU=Neon Local self-signed cert
neon-local-1 | No state file found.
neon-local-1 | Exception in thread Thread-1 (start_reloader_loop):
neon-local-1 | Traceback (most recent call last):
neon-local-1 | File "/scripts/app/neon.py", line 96, in get_database_owner_password
neon-local-1 | response.raise_for_status()
neon-local-1 | File "/usr/lib/python3.12/site-packages/requests/models.py", line 1024, in raise_for_status
neon-local-1 | raise HTTPError(http_error_msg, response=self)
neon-local-1 | requests.exceptions.HTTPError: 412 Client Error: Precondition Failed1 Reply
rare-sapphireOP•4mo ago
I created a new Neon project, and this time the reveal_password API no longer returns a 412 error. I'm not yet sure if the API is working as expected, but at least it's no longer failing at that point. Thanks to everyone who looked into it!