English
Troubleshooting
This guide covers troubleshooting:
E_ATLAS_NAPI_NOT_FOUNDE_INVALID_COLUMNwhereRaw()orjoinRaw()throwscursorPaginatemalformed cursorfindOrFailthrows- Migration warning about non-atomic execution
E_ATLAS_INSECURE_SSLMODE- TLS connection refused
pool timed out while waiting for an open connection
E_ATLAS_NAPI_NOT_FOUND
Cause: the platform package that carries atlas's binaries is not installed. The error is errors.E_ATLAS_NAPI_NOT_FOUND (code: 'E_ATLAS_NAPI_NOT_FOUND'), thrown by the first query compiled without the binary. The database driver comes from the same package; without it, the first connection throws E_ATLAS_DB_DRIVER_NOT_FOUND.
The message names the package for your machine, for example @c9up/atlas-linux-x64-gnu. The load error is the exception's cause.
Actions:
- reinstall dependencies with optional dependencies turned on (no
--no-optional, no--omit=optional) - if you install the package by hand, use the exact version of
@c9up/atlas - on Alpine (musl), the Linux packages target glibc and will not load
- if the message says there is no prebuilt binary, your platform is not built: atlas ships linux x64 and arm64, macOS x64 and arm64, and Windows x64
E_INVALID_COLUMN
Cause: unknown column for entity metadata.
Actions:
- verify
@Columndecorators - verify naming strategy assumptions (camelCase vs snake_case)
- validate dynamic column whitelist
whereRaw() or joinRaw() throws
Cause: Atlas strict mode enabled.
Actions:
- switch to structured query APIs (
whereExpr, join builders) - keep raw SQL only where absolutely required
cursorPaginate malformed cursor
Cause: invalid or tampered cursor payload.
Action:
- treat as client input error (
400)
findOrFail throws
Cause: row not found.
Action:
- use
findwhennullis acceptable - map not-found to HTTP
404
Migration warning about non-atomic execution
Cause: adapter lacks runInTransaction.
Actions:
- implement
runInTransaction(batch)in adapter - do not run production migrations without atomic adapter support
E_ATLAS_INSECURE_SSLMODE
Cause: the connection asks for sslmode=prefer or allow, in its URL or through PGSSLMODE. Both fall back to plaintext when TLS fails, without saying so.
Actions:
sslmode=disablefor a database on a network you controlsslmode=verify-fullwithsslrootcertotherwise (see Encrypted connections)
TLS connection refused
The message says which side refused:
not valid for name "…": the server's certificate does not name the host of the URL. Connect with a name the certificate holds.UnknownIssuer: the server's certificate is not signed bysslrootcert.requires a valid client certificateorUnknownCA: the server wants a client certificate (sslcert,sslkey) signed by the authority it trusts.Cannot read the TLS …,… is not a PEM file: the named file is missing or unreadable by the process.- a key that
is encrypted: decrypt it with theopenssl pkeycommand the message gives.
pool timed out while waiting for an open connection
Cause: the pool could not open its pool.min connections in time. The server kept refusing them, or did not answer. PostgreSQL at max_connections, or a proxy at its own session limit, refuses with too many connections and the pool retries until the timeout.
Actions:
- lower
pool.min/pool.max, or raise the server's limit - count the sessions every instance of the app opens: each pool connection holds one