[GH-ISSUE #5679] [bug]: Backend fails to start with "password authentication failed for user" #2204

Closed
opened 2026-03-16 23:34:12 +03:00 by kerem · 1 comment
Owner

Originally created by @zeddD1abl0 on GitHub (Dec 10, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5679

Is there an existing issue for this?

  • I have searched existing issues and this bug hasn't been reported yet

Platform

Web App

Browser

Edge

Operating System

Linux

Bug Description

We automatically update these containers every weekend, and expect that a professional container doesn't fail due to some weird bug. The backend server updated 3 days ago (Sunday) and has now started failing with:

Backend Server | /dist/backend/dist/src/prisma/prisma.service.js:75 Backend Server | throw new Error(Database connection failed: ${error.message}); Backend Server | ^ Backend Server | Backend Server | Error: Database connection failed: password authentication failed for user "hoppscotch" Backend Server | at Proxy.onModuleInit (/dist/backend/dist/src/prisma/prisma.service.js:75:19) Backend Server | at process.processTicksAndRejections (node:internal/process/task_queues:105:5) Backend Server | at async Promise.all (index 0) Backend Server | at async callModuleInitHook (/dist/backend/node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs+common@11.1.9_class-transformer@0.5.1_class-validator@0.14._35aa21069415c61cc2ff03470cea104c/node_modules/@nestjs/core/hooks/on-module-init.hook.js:43:5) Backend Server | at async NestApplication.callInitHook (/dist/backend/node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs+common@11.1.9_class-transformer@0.5.1_class-validator@0.14._35aa21069415c61cc2ff03470cea104c/node_modules/@nestjs/core/nest-application-context.js:242:13) Backend Server | at async NestApplication.init (/dist/backend/node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs+common@11.1.9_class-transformer@0.5.1_class-validator@0.14._35aa21069415c61cc2ff03470cea104c/node_modules/@nestjs/core/nest-application.js:103:9) Backend Server | at async NestApplication.listen (/dist/backend/node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs+common@11.1.9_class-transformer@0.5.1_class-validator@0.14._35aa21069415c61cc2ff03470cea104c/node_modules/@nestjs/core/nest-application.js:175:13) Backend Server | at async bootstrap (/dist/backend/dist/src/main.js:118:5) Backend Server | Backend Server | Node.js v22.16.0 Exiting process because Backend Server exited with code 1

The environment variables haven't changed from 2025.10, which was working.

` "DATA_ENCRYPTION_KEY=${random_password.data-encryption-key.result}",

"DATABASE_URL=postgresql://${local.pgsql_hoppscotch_user}:${random_password.postgresql-hoppscotch.result}@${local.pgsql_hoppscotch_host}:5432/${local.pgsql_hoppscotch_name}"`

The error comes from:

Backend Server | Error from loadInfraConfiguration PrismaClientKnownRequestError: Backend Server | Invalid prisma.infraConfig.findMany()invocation in Backend Server | /dist/backend/dist/src/infra-config/helper.js:128:55 Backend Server | Backend Server | 125 async function loadInfraConfiguration() { Backend Server | 126 try { Backend Server | 127 const prisma = new prisma_service_1.PrismaService(); Backend Server | → 128 const infraConfigs = await prisma.infraConfig.findMany( Backend Server | Authentication failed against the database server, the provided database credentials forhoppscotchare not valid Backend Server | at $r.handleRequestError (/dist/backend/node_modules/.pnpm/@prisma+client@7.0.0_prisma@7.0.0_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__re_8b204abed5db195acbd08f0ddfd72130/node_modules/@prisma/client/runtime/client.js:65:7347) Backend Server | at $r.handleAndLogRequestError (/dist/backend/node_modules/.pnpm/@prisma+client@7.0.0_prisma@7.0.0_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__re_8b204abed5db195acbd08f0ddfd72130/node_modules/@prisma/client/runtime/client.js:65:6642) Backend Server | at $r.request (/dist/backend/node_modules/.pnpm/@prisma+client@7.0.0_prisma@7.0.0_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__re_8b204abed5db195acbd08f0ddfd72130/node_modules/@prisma/client/runtime/client.js:65:6349) Backend Server | at process.processTicksAndRejections (node:internal/process/task_queues:105:5) Backend Server | at async a (/dist/backend/node_modules/.pnpm/@prisma+client@7.0.0_prisma@7.0.0_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__re_8b204abed5db195acbd08f0ddfd72130/node_modules/@prisma/client/runtime/client.js:75:5816) Backend Server | at async loadInfraConfiguration (/dist/backend/dist/src/infra-config/helper.js:128:30) Backend Server | at async Injector.instantiateClass (/dist/backend/node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs+common@11.1.9_class-transformer@0.5.1_class-validator@0.14._35aa21069415c61cc2ff03470cea104c/node_modules/@nestjs/core/injector/injector.js:424:37) Backend Server | at async callback (/dist/backend/node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs+common@11.1.9_class-transformer@0.5.1_class-validator@0.14._35aa21069415c61cc2ff03470cea104c/node_modules/@nestjs/core/injector/injector.js:70:34) Backend Server | at async Injector.resolveConstructorParams (/dist/backend/node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs+common@11.1.9_class-transformer@0.5.1_class-validator@0.14._35aa21069415c61cc2ff03470cea104c/node_modules/@nestjs/core/injector/injector.js:170:24) Backend Server | at async Injector.loadInstance (/dist/backend/node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs+common@11.1.9_class-transformer@0.5.1_class-validator@0.14._35aa21069415c61cc2ff03470cea104c/node_modules/@nestjs/core/injector/injector.js:75:13) { Backend Server | code: 'P1000', Backend Server | meta: { Backend Server | modelName: 'InfraConfig', Backend Server | driverAdapterError: DriverAdapterError: AuthenticationFailed Backend Server | at PrismaPgAdapter.onError (/dist/backend/node_modules/.pnpm/@prisma+adapter-pg@7.0.0/node_modules/@prisma/adapter-pg/dist/index.js:693:11) Backend Server | at PrismaPgAdapter.performIO (/dist/backend/node_modules/.pnpm/@prisma+adapter-pg@7.0.0/node_modules/@prisma/adapter-pg/dist/index.js:688:12) Backend Server | at process.processTicksAndRejections (node:internal/process/task_queues:105:5) Backend Server | at async PrismaPgAdapter.queryRaw (/dist/backend/node_modules/.pnpm/@prisma+adapter-pg@7.0.0/node_modules/@prisma/adapter-pg/dist/index.js:608:30) Backend Server | at async /dist/backend/node_modules/.pnpm/@prisma+client@7.0.0_prisma@7.0.0_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__re_8b204abed5db195acbd08f0ddfd72130/node_modules/@prisma/client/runtime/client.js:11:23732 Backend Server | at async mr (/dist/backend/node_modules/.pnpm/@prisma+client@7.0.0_prisma@7.0.0_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__re_8b204abed5db195acbd08f0ddfd72130/node_modules/@prisma/client/runtime/client.js:11:23571) Backend Server | at async e.interpretNode (/dist/backend/node_modules/.pnpm/@prisma+client@7.0.0_prisma@7.0.0_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__re_8b204abed5db195acbd08f0ddfd72130/node_modules/@prisma/client/runtime/client.js:11:41866) Backend Server | at async e.interpretNode (/dist/backend/node_modules/.pnpm/@prisma+client@7.0.0_prisma@7.0.0_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__re_8b204abed5db195acbd08f0ddfd72130/node_modules/@prisma/client/runtime/client.js:11:43464) Backend Server | at async e.run (/dist/backend/node_modules/.pnpm/@prisma+client@7.0.0_prisma@7.0.0_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__re_8b204abed5db195acbd08f0ddfd72130/node_modules/@prisma/client/runtime/client.js:11:40736) Backend Server | at async e.execute (/dist/backend/node_modules/.pnpm/@prisma+client@7.0.0_prisma@7.0.0_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__re_8b204abed5db195acbd08f0ddfd72130/node_modules/@prisma/client/runtime/client.js:57:670) { Backend Server | cause: [Object] Backend Server | } Backend Server | }, Backend Server | clientVersion: '7.0.0' Backend Server | }

I'm not sure what else to look for to fix this issue. There's no changes to the documentation from what I could find...

Deployment Type

Self-hosted (on-prem deployment)

Version

Hoppscotch Enterprise Backend Latest (v2025.11.1)

Originally created by @zeddD1abl0 on GitHub (Dec 10, 2025). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5679 ### Is there an existing issue for this? - [x] I have searched existing issues and this bug hasn't been reported yet ### Platform Web App ### Browser Edge ### Operating System Linux ### Bug Description We automatically update these containers every weekend, and expect that a professional container doesn't fail due to some weird bug. The backend server updated 3 days ago (Sunday) and has now started failing with: `Backend Server | /dist/backend/dist/src/prisma/prisma.service.js:75 Backend Server | throw new Error(`Database connection failed: ${error.message}`); Backend Server | ^ Backend Server | Backend Server | Error: Database connection failed: password authentication failed for user "hoppscotch" Backend Server | at Proxy.onModuleInit (/dist/backend/dist/src/prisma/prisma.service.js:75:19) Backend Server | at process.processTicksAndRejections (node:internal/process/task_queues:105:5) Backend Server | at async Promise.all (index 0) Backend Server | at async callModuleInitHook (/dist/backend/node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs+common@11.1.9_class-transformer@0.5.1_class-validator@0.14._35aa21069415c61cc2ff03470cea104c/node_modules/@nestjs/core/hooks/on-module-init.hook.js:43:5) Backend Server | at async NestApplication.callInitHook (/dist/backend/node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs+common@11.1.9_class-transformer@0.5.1_class-validator@0.14._35aa21069415c61cc2ff03470cea104c/node_modules/@nestjs/core/nest-application-context.js:242:13) Backend Server | at async NestApplication.init (/dist/backend/node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs+common@11.1.9_class-transformer@0.5.1_class-validator@0.14._35aa21069415c61cc2ff03470cea104c/node_modules/@nestjs/core/nest-application.js:103:9) Backend Server | at async NestApplication.listen (/dist/backend/node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs+common@11.1.9_class-transformer@0.5.1_class-validator@0.14._35aa21069415c61cc2ff03470cea104c/node_modules/@nestjs/core/nest-application.js:175:13) Backend Server | at async bootstrap (/dist/backend/dist/src/main.js:118:5) Backend Server | Backend Server | Node.js v22.16.0 Exiting process because Backend Server exited with code 1 ` The environment variables haven't changed from 2025.10, which was working. ` "DATA_ENCRYPTION_KEY=${random_password.data-encryption-key.result}", "DATABASE_URL=postgresql://${local.pgsql_hoppscotch_user}:${random_password.postgresql-hoppscotch.result}@${local.pgsql_hoppscotch_host}:5432/${local.pgsql_hoppscotch_name}"` The error comes from: `Backend Server | Error from loadInfraConfiguration PrismaClientKnownRequestError: Backend Server | Invalid `prisma.infraConfig.findMany()` invocation in Backend Server | /dist/backend/dist/src/infra-config/helper.js:128:55 Backend Server | Backend Server | 125 async function loadInfraConfiguration() { Backend Server | 126 try { Backend Server | 127 const prisma = new prisma_service_1.PrismaService(); Backend Server | → 128 const infraConfigs = await prisma.infraConfig.findMany( Backend Server | Authentication failed against the database server, the provided database credentials for `hoppscotch` are not valid Backend Server | at $r.handleRequestError (/dist/backend/node_modules/.pnpm/@prisma+client@7.0.0_prisma@7.0.0_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__re_8b204abed5db195acbd08f0ddfd72130/node_modules/@prisma/client/runtime/client.js:65:7347) Backend Server | at $r.handleAndLogRequestError (/dist/backend/node_modules/.pnpm/@prisma+client@7.0.0_prisma@7.0.0_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__re_8b204abed5db195acbd08f0ddfd72130/node_modules/@prisma/client/runtime/client.js:65:6642) Backend Server | at $r.request (/dist/backend/node_modules/.pnpm/@prisma+client@7.0.0_prisma@7.0.0_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__re_8b204abed5db195acbd08f0ddfd72130/node_modules/@prisma/client/runtime/client.js:65:6349) Backend Server | at process.processTicksAndRejections (node:internal/process/task_queues:105:5) Backend Server | at async a (/dist/backend/node_modules/.pnpm/@prisma+client@7.0.0_prisma@7.0.0_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__re_8b204abed5db195acbd08f0ddfd72130/node_modules/@prisma/client/runtime/client.js:75:5816) Backend Server | at async loadInfraConfiguration (/dist/backend/dist/src/infra-config/helper.js:128:30) Backend Server | at async Injector.instantiateClass (/dist/backend/node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs+common@11.1.9_class-transformer@0.5.1_class-validator@0.14._35aa21069415c61cc2ff03470cea104c/node_modules/@nestjs/core/injector/injector.js:424:37) Backend Server | at async callback (/dist/backend/node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs+common@11.1.9_class-transformer@0.5.1_class-validator@0.14._35aa21069415c61cc2ff03470cea104c/node_modules/@nestjs/core/injector/injector.js:70:34) Backend Server | at async Injector.resolveConstructorParams (/dist/backend/node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs+common@11.1.9_class-transformer@0.5.1_class-validator@0.14._35aa21069415c61cc2ff03470cea104c/node_modules/@nestjs/core/injector/injector.js:170:24) Backend Server | at async Injector.loadInstance (/dist/backend/node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs+common@11.1.9_class-transformer@0.5.1_class-validator@0.14._35aa21069415c61cc2ff03470cea104c/node_modules/@nestjs/core/injector/injector.js:75:13) { Backend Server | code: 'P1000', Backend Server | meta: { Backend Server | modelName: 'InfraConfig', Backend Server | driverAdapterError: DriverAdapterError: AuthenticationFailed Backend Server | at PrismaPgAdapter.onError (/dist/backend/node_modules/.pnpm/@prisma+adapter-pg@7.0.0/node_modules/@prisma/adapter-pg/dist/index.js:693:11) Backend Server | at PrismaPgAdapter.performIO (/dist/backend/node_modules/.pnpm/@prisma+adapter-pg@7.0.0/node_modules/@prisma/adapter-pg/dist/index.js:688:12) Backend Server | at process.processTicksAndRejections (node:internal/process/task_queues:105:5) Backend Server | at async PrismaPgAdapter.queryRaw (/dist/backend/node_modules/.pnpm/@prisma+adapter-pg@7.0.0/node_modules/@prisma/adapter-pg/dist/index.js:608:30) Backend Server | at async /dist/backend/node_modules/.pnpm/@prisma+client@7.0.0_prisma@7.0.0_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__re_8b204abed5db195acbd08f0ddfd72130/node_modules/@prisma/client/runtime/client.js:11:23732 Backend Server | at async mr (/dist/backend/node_modules/.pnpm/@prisma+client@7.0.0_prisma@7.0.0_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__re_8b204abed5db195acbd08f0ddfd72130/node_modules/@prisma/client/runtime/client.js:11:23571) Backend Server | at async e.interpretNode (/dist/backend/node_modules/.pnpm/@prisma+client@7.0.0_prisma@7.0.0_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__re_8b204abed5db195acbd08f0ddfd72130/node_modules/@prisma/client/runtime/client.js:11:41866) Backend Server | at async e.interpretNode (/dist/backend/node_modules/.pnpm/@prisma+client@7.0.0_prisma@7.0.0_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__re_8b204abed5db195acbd08f0ddfd72130/node_modules/@prisma/client/runtime/client.js:11:43464) Backend Server | at async e.run (/dist/backend/node_modules/.pnpm/@prisma+client@7.0.0_prisma@7.0.0_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__re_8b204abed5db195acbd08f0ddfd72130/node_modules/@prisma/client/runtime/client.js:11:40736) Backend Server | at async e.execute (/dist/backend/node_modules/.pnpm/@prisma+client@7.0.0_prisma@7.0.0_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__re_8b204abed5db195acbd08f0ddfd72130/node_modules/@prisma/client/runtime/client.js:57:670) { Backend Server | cause: [Object] Backend Server | } Backend Server | }, Backend Server | clientVersion: '7.0.0' Backend Server | } ` I'm not sure what else to look for to fix this issue. There's no changes to the documentation from what I could find... ### Deployment Type Self-hosted (on-prem deployment) ### Version Hoppscotch Enterprise Backend Latest (v2025.11.1)
kerem 2026-03-16 23:34:12 +03:00
Author
Owner

@zeddD1abl0 commented on GitHub (Dec 10, 2025):

This is resolved through URL escaping the password. Not mentioned in the Hoppscotch documentation, but mentioned in Prisma:

Special characters For MySQL, PostgreSQL and CockroachDB you must [percentage-encode special characters](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding) in any part of your connection URL - including passwords. For example, p@$$w0rd becomes p%40%24%24w0rd.

<!-- gh-comment-id:3635037980 --> @zeddD1abl0 commented on GitHub (Dec 10, 2025): This is resolved through URL escaping the password. Not mentioned in the Hoppscotch documentation, but mentioned in Prisma: `Special characters For MySQL, PostgreSQL and CockroachDB you must [percentage-encode special characters](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding) in any part of your connection URL - including passwords. For example, p@$$w0rd becomes p%40%24%24w0rd.`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#2204
No description provided.