A Hidden Character Mystery

This morning I was set out to refresh my geldata knowledge, I attempted to set up Geldata using Docker, following the official documentation. My initial Docker command was: docker run --name gel -p 5650:5650 -e GEL_SERVER_PORT=5650 -e GEL_SERVER_PASSWORD=learn123 -e GEL_SERVER_TLS_CERT_MODE=generate_self_signed -e GEL_SERVER_USER​=learn -e GEL_SERVER_DEFAULT_BRANCH=learn geldata/gel However, I consistently encountered an authentication error: ERROR gel_tokio::raw::connection] Connection error: AuthenticationError: authentication failed gel error: Connection error: AuthenticationError: authentication failed After troubleshooting for 90 minutes, I experimented with a modified command, replacing GEL_SERVER with EDGEDB_SERVER: docker run --name gel -p 5650:5650 -e EDGEDB_SERVER_PORT=5650 -e EDGEDB_SERVER_PASSWORD=learn123 -e EDGEDB_SERVER_TLS_CERT_MODE=generate_self_signed -e EDGEDB_SERVER_USER=learn -e EDGEDB_SERVER_DEFAULT_BRANCH=learn geldata/gel This command unexpectedly succeeded. I then reverted back to using GEL_SERVER with the same values: docker run --name gel -p 5650:5650 -e GEL_SERVER_PORT=5650 -e GEL_SERVER_PASSWORD=learn123 -e GEL_SERVER_TLS_CERT_MODE=generate_self_signed -e GEL_SERVER_USER=learn -e GEL_SERVER_DEFAULT_BRANCH=learn geldata/gel This also worked, which was puzzling. To understand the mystery, I asked ChatGPT. It identified a potential issue: a zero-width space character in the GEL_SERVER_USER environment variable of my initial command. To visualize this, consider the following lines: GEL_SERVER_USER=learn GEL_SERVER_USER​=learn ChatGPT remommended using a extension like the Gremlins in vscode, the zero-width space in the second line becomes apparent. This hidden character was causing the authentication failure. I knew that copying text from internet can have such issues, but it has been a very while since I last encountered such an issue, however zero-width space character is a new learning.

Mar 22, 2025 - 06:59
 0
A Hidden Character Mystery

This morning I was set out to refresh my geldata knowledge, I attempted to set up Geldata using Docker, following the official documentation. My initial Docker command was:

docker run --name gel -p 5650:5650 -e GEL_SERVER_PORT=5650 -e GEL_SERVER_PASSWORD=learn123 -e GEL_SERVER_TLS_CERT_MODE=generate_self_signed -e GEL_SERVER_USER​=learn -e GEL_SERVER_DEFAULT_BRANCH=learn geldata/gel

However, I consistently encountered an authentication error:

ERROR gel_tokio::raw::connection] Connection error: AuthenticationError: authentication failed
gel error: Connection error: AuthenticationError: authentication failed

After troubleshooting for 90 minutes, I experimented with a modified command, replacing GEL_SERVER with EDGEDB_SERVER:

docker run --name gel -p 5650:5650 -e EDGEDB_SERVER_PORT=5650 -e EDGEDB_SERVER_PASSWORD=learn123 -e EDGEDB_SERVER_TLS_CERT_MODE=generate_self_signed -e EDGEDB_SERVER_USER=learn -e EDGEDB_SERVER_DEFAULT_BRANCH=learn geldata/gel

This command unexpectedly succeeded. I then reverted back to using GEL_SERVER with the same values:

docker run --name gel -p 5650:5650 -e GEL_SERVER_PORT=5650 -e GEL_SERVER_PASSWORD=learn123 -e GEL_SERVER_TLS_CERT_MODE=generate_self_signed -e GEL_SERVER_USER=learn -e GEL_SERVER_DEFAULT_BRANCH=learn geldata/gel

This also worked, which was puzzling.

To understand the mystery, I asked ChatGPT. It identified a potential issue: a zero-width space character in the GEL_SERVER_USER environment variable of my initial command.

To visualize this, consider the following lines:

GEL_SERVER_USER=learn
GEL_SERVER_USER​=learn

ChatGPT remommended using a extension like the Gremlins in vscode, the zero-width space in the second line becomes apparent. This hidden character was causing the authentication failure.

I knew that copying text from internet can have such issues, but it has been a very while since I last encountered such an issue, however zero-width space character is a new learning.